Adobe Flash © Compatible Multimedia Encoding Using Open Source Software
Created By David Childers
www.scvi.net
Sponsored By
Broadcasting World www.broadcastingworld.net
Creative Common License Copyright July 2009, David Childers, unless otherwise stated. This body of work is released under the AttributionShareAlike version 3.0, Creative Common License. You may freely distribute or modify this work for commercial or non commercial purposes. If you choose to modify this work, you are required to comply with the AttributionShareAlike version 3.0, Creative Common License requirements. These requirements include: You must attribute any derivatives of this work to David Childers. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For the complete legal code, please refer here: www.creativecommons.org/licenses/bysa/3.0/legalcode
Foreword This guide was created to provide the multimedia enthusiast with the information and resources necessary for encoding of Adobe Flash © compatible multimedia. This information and software can be used with all operating systems. (BSD, Linux, Windows, Macintosh) I would like to thank Scarlet Coker for providing assistance with the editing of the manuscript and to James Davey at Broadcasting World for allowing me the opportunity to create this handbook. It is my sincere hope that the reader finds this information a valuable resource. Que todos os seus sonhos e desejos se tornem realidade, querida Patricia. David Childers www.scvi.net July, 2009 Sustaining Member
Society Motion Picture and Television Engineers
Enlightenment Is Not Imagining Figures Of Light But Making The Darkness Conscious. Carl Gustav Jung
Required software. FFmpeg is a complete, crossplatform solution to record, convert and stream audio and video. http:// www.ffmpeg.org Additional software libraries that are required. GPL H.264 video codec encoder. ( libx264 ) http:// www.videolan.org/developers/x264.html GPL MPEG4 and MPEG2 AAC audio codec encoder. ( libfaac ) http:// www.audiocoding.com/faac.html GPL MP3 audio codec encoder. ( libmp3lame ) http:// lame.sourceforge.net Adobe Flash © supports both the ON2 VP6 and H.264 video codec. There are currently no GPL video encoder software packages available for the VP6 video codec. Adobe Flash © also supports both the MP3 and AAC audio codecs. There are GPL audio encoder software packages available for both the MP3 and AAC audio codecs. AAC provides superior performance and greater audio quality at lower encoded bandwidth rates. Installation of FFmpeg. Download and compile the FFmpeg software package. Download and compile the additional encoder library software packages as required. Enable the FFmpeg software to use the additional encoder library software packages. enablelibmp3lame enablelibfaac enablelibfaad NOTE Please see the installation information and requirements for your particular operating system. Converting a existing video file into Adobe Flash © compatible format. Command line : # ffmpeg i movie name.avi acodec aac ar 22050 ab 64 f flv vcodec h264 s 320x240 pass 2 b 256 r 20 y jules.flv i : Input file name and file format of file to be transcoded acodec : Audio codec used to encode the file with. ar : Audio sampling rate in Hz. ab : Audio bit rate in kbit/s. f : Format to transcode movie to. vcodec : Video codec used to encode the file with. s : Video output size. This is given as vertical and horizontal pixel size. pass : Number of passes used in the video encoding process. b : Video bit rate in kbit/s. r : Video frame rate. y : Output file name and format of the finished file.
NOTE The aspect ratio can be used in lieu of s for determining the video output size. aspect : Video aspect ratio ( Such as 4:3 or 8:6 ) It is important that the original video file to be transcoded is the highest quality possible. Attempting to transcode video that has poor video / audio qualities or is out of audio / video sync will result in a very poorly converted multimedia file. Optimizing FFmpeg for transcoding multimedia files. When configuring FFmpeg to transcode video, a balance must be made between the video bit rate, frame rate and the video output size to achieve a quality product. Large video output size : high bit rate high frame rate Small video output : low bit rate low frame rate http://rob.opendot.cl/index.php/usefulstuff/ffmpegx264encodingguide/ It is recommended that the AAC audio codec be used for encoding. This codec provides greater quality at lower bandwidth. Suggested AAC encoding bit rates for general voice are 32 Kbs and 64 Kbs for multimedia content that includes music. NOTE It is important to remember that providing video on demand content can use a very large amount of bandwidth, depending on the popularity of the video content being made available. You can get an indication of bandwidth that will be used by placing a few multimedia content files for viewing and then observe the web host bandwidth logs. FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV). It can calculate a lot of meta data, insert an onMetaData tag, cut FLV files, add cue points (onCuePoint), show the FLV structure and print meta data information in XML or YAML. http://rubyforge.org/projects/flvtool2 Playing multiple Adobe Flash © files. A XML file can be created to render a playlist of Adobe Flash © files. Creating a XML file of multiple Adobe Flash © files.
Installation Information for various operating systems. FFmpeg Linux Man Page ( Complete command line syntax for FFmpeg. ) http:// linux.die.net/man/1/ffmpeg
Installation of FFmpeg on FreeBSD. http://lokedupont.info/wordpress/?p=3 Installation of FFmpeg on Ubuntu Linux. http://www.elctech.com/articles/installingffmpegwithfaacandx264encodersfromsourceonubuntu Installation of FFmpeg on Debian Linux. http:// tream0.org/2008/01/installffmpegondebianetch.html Installation of FFmpeg on Macintosh and Windows. http://richardleggett.co.uk/blog/index.php/2009/05/19/compiling_ffmpeg_statically_osx_win Open Source Or Free Embedded Flash Players. http://www.flowplayer.org http://www.longtailvideo.com http://www.mcmediaplayer.com http://www.youtubeflashplayer.com http://www.macdev.net/blog/index.php It is also possible to use the Mencoder open source encoding software to create Adobe Flash © multimedia. Using Mencoder to encode Adobe Flash © using H.264 and AAC. http://blog.massanti.com/2008/01/01/encodingh264aacpluswithmencoderforflash http://en.gentoowiki.com/wiki/HOWTO_Mencoder_Introduction_Guide http://linux.die.net/man/1/mencoder