Video thumbnails

Install ffmpeg package

You need to install ffmpeg package to let the video thumbnail work correctly:

Ubuntu 16.04

  1. # Install ffmpeg
  2. apt-get install ffmpeg
  3. # Now we need to install some modules
  4. pip install pillow moviepy

Centos 7

  1. # We need to activate the epel repos
  2. yum -y install epel-release
  3. rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
  4. # Then update the repo and install ffmpeg
  5. yum -y install ffmpeg ffmpeg-devel
  6. # Now we need to install some modules
  7. pip install pillow moviepy

Debian Jessie

  1. # Add backports repo to /etc/apt/sources.list
  2. # e.g. the following repo works (June 2017)
  3. deb http://httpredir.debian.org/debian jessie-backports main non-free
  4. deb-src http://httpredir.debian.org/debian jessie-backports main non-free
  5. # Then update the repo and install ffmpeg
  6. apt-get update
  7. apt-get install ffmpeg
  8. # Now we need to install some modules
  9. pip install pillow moviepy

Configure Seafile to create thumbnails

Now configure accordingly in seahub_settings.py

  1. # Enable or disable thumbnail for video. ffmpeg and moviepy should be installed first.
  2. # For details, please refer to https://manual.seafile.com/deploy/video_thumbnails.html
  3. # NOTE: since version 6.1
  4. ENABLE_VIDEO_THUMBNAIL = True
  5. # Use the frame at 5 second as thumbnail
  6. THUMBNAIL_VIDEO_FRAME_TIME = 5
  7. # Absolute filesystem path to the directory that will hold thumbnail files.
  8. THUMBNAIL_ROOT = '/haiwen/seahub-data/thumbnail/thumb/'