Skip to main content

Transcoding support for Plone video files, using collective.transcode.daemon

Project description

collective.transcode.* or transcode.star for short, is a suite of modules that provide transcoding services to Plone sites.

Both the naming scheme and the basic design priciples were inspired by collective.blog.star. Namely:

  • Be modular. Not everyone wants everything your software has to offer.

  • Be flexible. Don’t assume that people want to use your software in one way.

  • Be simplistic. If there is a simple way of doing it, do it that way.

  • Be Ploneish. Plone already has 90% of what we need built in. Use it.

It works out of the box with standard Plone Files, providing transcoding services to web friendly formats (mp4, ogv) when uploading video content. Additionally, a jpeg thumbnail is being extracted from the 5th second of the videos and a flowplayer viewlet pointing to the produced mp4 file will be displayed inside the IAboveContentBody viewlet manager when transcoding is complete.

Transcode.star can be easily configured through the Plone Control Panel to work with any custom AT content type, as long as there is a File field in the schema. In the Transcode Settings panel you can enter a new line in the supported portal types, following the format customPortalType:fileFieldName where customPortalType the name of your portal_type and fileFieldName the name of the file field that you need transcoding for.

Support for Dexterity content types is planned for the coming versions.

For the transcoding to work you need to start the transcodedaemon instance provided in the buildout.

If your transcoding needs are high, you can configure several transcode daemons in a load balanced setup. Transcode.star will select the daemon with the minimum transcoding queue length.

All communication between transcode.star and transcode.daemon is encrypted using symmetric encryption by the pycrypto module so that the transcode server(s) transcode videos sent by the Plone site only, preventing abuse by third parties. Also extra care has been taken to transcode videos in private state (typical senario for a Plone site, when users upload a file) by using the same secure channel.

Requirements

Apart from what is assembled by the buildout, the following dependencies must be installed manually for the transcoding scripts to work:

  • ffmpeg with x264 support

  • ffmpeg2theora

In Ubuntu 10.04 you can install the above using the following commands:

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list \
http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list
sudo apt-get --quiet update && sudo apt-get --yes --quiet \
--allow-unauthenticated install medibuntu-keyring
sudo apt-get --quiet update
sudo aptitude install build-essential libavcodec-unstripped-52 ffmpeg \
ffmpeg2theora

Installation

Plone 4.0

python2.6 bootstrap.py
./bin/buildout

Plone 3.3.5

python2.4 bootstrap.py -c buildout-p3.cfg
./bin/buildout -c buildout-p3.cfg

Usage

Start the transcode daemon:

./bin/transcodedaemon start # or fg to start it in the foreground

Start Zope:

./bin/instance start

Add a new Plone site, go to the Install Products Form and install transcode.star A new control panel screen called “Transcode Settings” will be available. You can use it to configure the supported profiles, the supported mime_types and the portal_types and respective fields that you need transcoding for. If you have changed the secret key in your buildout make sure you enter the new key here as well.

Then simply add a new object (File by default) and upload a file with a mimetype in the supported mimetypes. If you are running transcodedaemon and zope in the foreground you will be able to see the transcoding process taking place. When the transcoding is complete, refresh your content type’s view page and you should see a flowplayer instance above your content loaded with the mp4 version of your video.

For production deployments make sure you change the secret key in buildout.cfg and in the Transcode Settings Panel.

Also, when using in production make sure that the transcoded files are served directly by Apache instead of Twisted.

Credits

Contributors

  • Dimitris Moraitis, unweb.me

  • Christos Psaltis, unweb.me

  • Markos Gogoulos, unweb.me

  • Mike Muzurakis, unweb.me

  • Anna Helme, sagaponic.net

  • Giacomo Spettoli, redomino.com

  • Rok Garbas, garbas.si

Changelog

0.16 (2012-04-11)

  • move embed favicon code to embed.pt [clopy]

  • open unisubs share link in new tab [clopy]

0.15 (2012-03-28)

  • Fix subtitle selection on embedded videos [clopy]

  • Add ‘view on original site logo’ for embeded videos [mgogoulos]

0.14 (2012-01-05)

  • add video/x-matroska to supported mimetypes [dimo]

  • improve embed view display & fix embed dimensions [dimo]

  • warn when skipping transcoding due to unsupported mimetype [dimo]

  • embed view should use the dimensions of the parent iframe [dimo]

  • look for thumbnail in content type first [dimo]

0.13 (2011-12-21)

  • preload video metadata, fixes universal subtitles widget display issue [dimo]

0.12 (2011-12-18)

  • improve embed view styling [dimo]

0.11 (2011-12-17)

  • bug fix in controlpanel’s interface [giacomos]

  • moved repo to github [garbas]

  • use html5/mediaelementjs for video playback, drop flowplayer [dimo, clopy, cpsaltis]

  • update buildout, transcoding scripts, add ffmpeg [cpsaltis, dimo]

  • enable switching to hi/low quality [dimo, clopy]

  • provide embed code [dimo, clopy]

  • track transcoding progress [dimo]

  • support opensubtitles [dimo, clopy]

0.10 (2011-05-10)

  • update bootstrap.py [dimo]

0.9 (2011-03-29)

  • pin plone.app.registry to 1.0b2 in Plone 3 buildout - thanks to Daniel Marks for reporting [dimo]

0.8 (2011-03-10)

  • add option to specify transcode profiles when adding jobs to transcode tool

  • remove of unused html5 options

0.7 (2010-11-25)

  • Remove PasteScript dependency from setup.py which was causing problems in dependent packages [dimo]

  • use transcode daemon 0.7

0.6 (2010-10-21)

  • use transcode daemon 0.6, prevents possible pycrypto version conflict [dimo]

0.5 (2010-10-09)

  • delete transcoded video files when the respective content objects are deleted from the portal [clopy, dimo]

  • prevent deletion of TranscodeTool on reinstallation in Plone 3.x [clopy]

  • collective.transcode.burnstation support [clopy, dimo, cpsaltis, provetza]

0.4 (2010-08-04)

  • use transcode.daemon 0.4 and simplify the buildout [dimo]

0.3 (2010-07-31)

  • workaround for plone.app.blob issue with unicode filenames [dimo]

  • fix forced retranscoding for pending requests [dimo]

0.2 (2010-07-23)

  • First public release [dimo]

Download

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.transcode.star-0.16.zip (51.3 kB view details)

Uploaded Source

File details

Details for the file collective.transcode.star-0.16.zip.

File metadata

File hashes

Hashes for collective.transcode.star-0.16.zip
Algorithm Hash digest
SHA256 bc65c5439052f08c47018c703a2d5ea6adfbe7f8857b91288b98eff3f092dc7e
MD5 43449a16c48b6636ce9aeff1d1031763
BLAKE2b-256 27dc8cd2b81be127ded3654d0ef63be9c2a9caf63895fa4567d9a9f9424c2ca6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page