Sharing and handling media files in a professional context often requires expensive software packages. For the EBU P/SCAIE project, a platform was required that could handle an abundance of professional file formats, arbitrary large file sizes and which did not pose restrictions on the metadata format used. As there was no such software available, we decided to build a custom web-based platform, based on loosely coupled open source components.
This paper explains the architecture of the resulting platform. With a minimum of custom code, we have created a powerful platform that meets our requirements. This integration, described in this paper, is of use to organizations wishing to build their own media platform using open source components.
5. creation, distribution and management of media contentA Media Sharing Platform Built With Open Source Software
6. VRT and VRT-medialab Some of our projects… EBU EC-M Scaie Media Exchange platform Media sharing platform with ground truth metadata to train and test media analysis tools MediaLoep Media search engine which employs subtitles and news anchor texts to enhance the search. MediaMap Use of user-generated content in a professional context. A Media Sharing Platform Built With Open Source Software
7. Need for Media Asset Management All these projects required media management functionality Upload – Store – Download media Transcode high-res to low-res, create thumbnails, … Metadata / Search A Media Sharing Platform Built With Open Source Software
14. How to link all the tools together?A Media Sharing Platform Built With Open Source Software
15. A Flexible Data model As every research project employs its own specific metadata, MAMMIE’s data model should be very generic. A unique ID A number of linked mediastreams A number of linked XMLmetadatastreams A Media Sharing Platform Built With Open Source Software
16. A Flexible Data model Fedora Commons implements this data model. REST interface to create, read, delete an object or its data streams. A data stream is a link to media or embedded XML More advanced features available in Fedora (not used)SOAP, RDF, transformations using web-services, versioning, ... A Media Sharing Platform Built With Open Source Software
17. A Flexible Data model: Search Apache Solr is used to search the objects. The Fedora Gsearch plug-in will handle the synchronization. Fedora Object Solr Document <xml><datastream1> … </datastream1><datastream2> … </datastream2> … </xml> <xml><title> … </title><description> … </description><hires> … </hires> … </xml> XSLT configured per application A Media Sharing Platform Built With Open Source Software
21. How to link all the tools together?A Media Sharing Platform Built With Open Source Software
22. Uploading and Downloading media Restrictions firewall shouldn’t block -> HTTP huge files (> 2GB) -> no default HTML form in-browser upload -> Silverlight / Flash / Java plug-in Silverlight Upload Component http://silverlightfileupld.codeplex.com/ A Media Sharing Platform Built With Open Source Software
23. Uploading and Downloading media A Silverlight component splits the file in chunks and does a regular HTTP upload per chunk. On the server, a Java servlet accepts these uploads and reassembles the file. A Media Sharing Platform Built With Open Source Software
24. regular HTTP DOWNLOAD uploadservlet downloadservlet Uploading and Downloading media A servlet is also used to download the file. The download can start as soon as the upload has started! .progress file contains upload byte position and the file size A Media Sharing Platform Built With Open Source Software
28. How to link all the tools together?A Media Sharing Platform Built With Open Source Software
29. Transcoding media FFmpeg, Mplayer and Flvtool2 are used to transcode the media files and generate keyframes. original media, as uploaded (e.g., MXF DV25, D10) low-res Flash video (*.flv) keyframes (*.jpg) FFmpeg and Flvtool2 Mplayer2 A Media Sharing Platform Built With Open Source Software
33. How to link all the tools together?A Media Sharing Platform Built With Open Source Software
34. Linking everything together We employ a message queue to trigger new tasks at the end of a completed task. RabbitMQ is used as the message broker, it is an open-source implementation of the Advanced Message Queuing Protocol (AMQP). A message has a “routing key” and some payload: A Media Sharing Platform Built With Open Source Software
35. Linking everything together Each task has a queue that subscribes to messages with a certain routing key: Task aproduces messages Exchange routesmessage usingrouting key Queue stores andforwards messages Task b and cconsumes messages b upload.complete a X c transcode.complete Message Broker A Media Sharing Platform Built With Open Source Software
36. Consecutive messages create a workflow upload.complete Add a data stream to Fedora objectand Start transcoding of media file upload servlet lowres.complete Add a (low-res) data stream to Fedora object fedorahandler transcoderhandler A Media Sharing Platform Built With Open Source Software
37. Task framework implementation The tasks are implemented using Ruby A configuration file defines which messages (routing keys) trigger which tasks A Ruby framework parses the configuration file and configures the task queues in RabbitMQ defmanualStartTranscode(msg) system(“ffmpeg –i #{msg[‘filename’]} …”) end mapping: manualStartTranscode: transcode.manualstart startFlashVideo: flashvideo.manualstart A Media Sharing Platform Built With Open Source Software
41. How to link all the tools together?A Media Sharing Platform Built With Open Source Software
42. Future work Improvement is still possible Error handling can be better… Scaling to different machines and stress testing Start transcoding during upload A Media Sharing Platform Built With Open Source Software
43. Conclusions It’s open-source! All tools used are open-source Limited amount of custom code It’s Flexible! Shot segmentation, metadata transformation, FTP ingest, … and other tasks were effortlessly integrated. New applications can use the MAMMIE regardless of the metadata model / media formats they employ. More info? karel.braeckman@vrt.be A Media Sharing Platform Built With Open Source Software
45. Transcoding media Several tools are used for transcoding professional input formats to browser proxies. flv video using FFmpeg + flvtool2H264 video using FFmpeg Keyframes using Mplayer MXF D10 MXF DV25 A Media Sharing Platform Built With Open Source Software
46. Example of a task require'abstractListener' require'pp' classListenerFFmpeg<AbstractListener definitialize(handlers,extraconfig)#load the passed params in instance params … end defmanualStartTranscode(msg) system(“ffmpeg –i #{msg[‘filename’]} …”) end … end (simplified) implementationof the task. A Media Sharing Platform Built With Open Source Software
47. listener_ffmpeg: ruby_class: ListenerFFMpeg config: mam_repo: /home/repo/ … mapping: uploadCompleted: uploadid.complete manualStartThumb: thumbnail.manualstart manualStartTranscode: transcode.manualstart startFlashVideo: flashvideo.manualstart Example of a configuration file Name of theRuby class whichcontains the tasks routing key which will start task Method of Ruby class = a task A Media Sharing Platform Built With Open Source Software