Outsourcing Consulting News
Case Study: Video Editor Tool and Audio Recording development
Audio recording and overlay functionality (recording live microphone audio content) was one of the important and nontrivial features we were focusing on during the project. The non triviality is caused by the fact that the microphone has no connection to the Sound api so you can't leverage any of the Sound features to work with the mic.
As Flash technology doesn't allow recording audio on a local machine (as a separate audio file), we have setup the following procedure to record audio stream to mp3 file:
FlashPlayer gets audio stream from microphone
The stream is then sent using Adobe's RTMP* protocol to Red5 server** and then getting encoded to FLV format.
The FLV audio is getting transcoded using FFMPEG video converter compiled with NellyMoser codec.
* Real Time Messaging Protocol is a proprietary protocol developed by Adobe Systems for streaming audio, video and data over the Internet, between a Flash player and a server.
** Red5 is a free, open source Java implementation of a Flash Media Server
Video Editor Tool: Video Download
Downloading the mashed video in mp4 format was another bottleneck we faced in the project (the user would need to be able to open video clips with any standard PC software).
Mashed video, in fact, is an XML file that combines multiple sources of video, audio, transitions, effects, etc. The only way to get a result is to convert its mp4 rtmpe stream into video-formatted file.
All known downloading applications require installation on the client side, so we found a way around it:
The server software is mostly written in PHP and utilizes many open source UNIX applications and libraries to render mashes into true video formats for downloading,
We've installed the software and configured all necessary dependencies on Amazon's Elastic Compute Cloud web service;
Job data is sent to the server through a REST interface.
The server encodes uploaded videos into lower resolution image sequences and soundtracks for optimal performance within the editor, but still use the higher resolution assets when outputting the final video.
MovieMasher turns XML and raw media assets(JPEG images and mp3 audio files) into a video file, and then transfers it to Amazon's Simple Storage Service (which is itself scalable).
Once encoding process is complete, the video is getting available for the end user via URL (Amazon S3)
Tools and Technologies
- Movie Masher Server;
- Movie Masher's flash applets that provide front-end tools for common video editing;
- Red5 media server;
- Nellymoser codec, ffmpeg video converter
- Amazon EC2 i S3;
- Apache web server;
- PHP with the following modules: PEAR, curl, symphony, PDO
PEAR modules: Archive/Tar, HTTP/Request, Log;
- Java, Apache Ant