django-videothumbs

Videos need thumbnails too
Download

django-videothumbs Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Chris McMichael
  • Publisher web site:
  • https://github.com/macmichael01/

django-videothumbs Tags


django-videothumbs Description

django-videothumbs is a Django app that auto generates 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.REQUIREMENTSpip install Django==1.3 # or newerpip 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/ffmpegX.app/Contents/Resources/ffmpeg /usr/local/bin/INSTALLATIONpip install django-videothumbsORgit clone https://github.com/macmichael01/django-videothumbs;cd django-videothumbs;sudo python setup.py install;USAGE 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: my_object.video.url To retrieve thumbnails URL's just append the dimensions: my_object.video.url_125x125 my_object.video.url_300x200 from videothumbs.fields import VideoThumbnailField class HomeVideo(models.Model): video = VideoThumbnailField(upload_to='home_videos', sizes=((80,80),))Product's homepage


django-videothumbs Related Software