Django Videothumbs Save

Adds support for a video field in Django. This field will auto generate thumbnails for the uploaded video.

Project README


Auto generate video thumbnails on the fly.

NOTE: This is only a proof of concept at this point. And is not recommended for use in a production setting just yet.


pip install Django==1.3 # or newer
pip install PIL

# ffmepg (Debian)
sudo apt-get install ffmpeg

# Mac
# Download ffmpegX and follow instructions on how to install.
# Then symlink the ffmpeg binary so that a terminal shell can find it.
sudo ln -s /Applications/ /usr/local/bin/


pip install django-videothumbs


git clone;
cd django-videothumbs;
sudo python install;


  • Arguments:

    • upload_to
      • Path where the videos and thumbnails will be stored. The defining path will contain 2 subfolders, thumbnails and videos.
    • sizes
      • A List of tuples containing width and height coordinates to size a video frame to.
    • auto_crop
      • During generation, if height and width of a thumbnail are the same the option to crop is available. True by default.
  • Retrieval:

    • To retrieve the video URL:
    • To retrieve thumbnails URL's just append the dimensions:

    from videothumbs.fields import VideoThumbnailField

    class HomeVideo(models.Model): video = VideoThumbnailField(upload_to='home_videos', sizes=((80,80),))


  • Write unit tests.
  • Performance testing.
  • Add video validation.
  • Add better error handling.
  • Remove the need to call subprocess for generating thumbnails.
  • Add an admin widget to regenerate a thumbnail or generate a thumbnail at a specific frame.
Open Source Agenda is not affiliated with "Django Videothumbs" Project. README Source: macmichael01/django-videothumbs
Open Issues
Last Commit
7 years ago

Open Source Agenda Badge

Open Source Agenda Rating