mtron
October 20th, 2006, 01:00 AM
Since Adobe finally released the beta of the Flash Player 9 some days ago, it's finally time for me to digg in this stuff ;)
The Version 7 was totally unuseable, the video and audio sync was totally broken, firefox crashed quite often, the cpu went up to over 80 %... but now it seems ok, so let's start to create a flash movie. :D
First you need an unrestricted version of ffmpeg:
you need to get the svn version (http://ffmpeg.mplayerhq.hu/download.html) and compile it for yourself, cause the ubuntu 6.06 build has no lame & xvid encoding enabled, or get my package here (http://michael.hoertnagl.googlepages.com/ffmpeg_31.cvs20061020-ubuntu1_i386.deb).
My compiling options:
FFmpeg version SVN-r6738, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --extra-cflags=-fomit-frame-pointer --enable-xvid --enable-pp --enable-vorbis --enable-libogg --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame --enable-faadbin --enable-faad --enable-faac --enable-xvid --prefix=/usr --enable-gpl
ffmpeg SVN-r6738
built on Oct 20 2006 00:29:57, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
libavutil version: 49.0.1
libavcodec version: 51.20.0
libavformat version: 50.6.0
now get the latest release from FLVtool2 (http://rubyforge.org/frs/?group_id=1096)
It's a ruby script which adds metadata to the FLV file to make the progress bar work and letting you skip between bits of the file. The install is easy, just follow the README.
The source video file in this example ("input.mpg") is a DVB-S Transport Stream (generic PES Container 720x576) , recorded with mythtv and converted to a MPG2 video with ProjectX (http://sourceforge.net/projects/project-x).
ok. it's time to fire up a terminal and start the encoding with ffmpeg
ffmpeg -y -i input.mpg -r 20 -s 360x288 -deinterlace -ar 22050 output.flv
Next we need to add the metadata to the flv movie:
cat output.flv | flvtool2 -U stdin final.flv
Now we have the finished seek-able flv movie. You can test it with mplayer (seeking doesn't work with mplayer though). To embed it in a webpage, grab yourself a copy of the very good "flvplayer (http://pyg.keonox.com/tests/flash_flv_player/flvplayer.swf)", written by joern wijering, and place it in the same directory as the webpage you plan to embed the movie
here is the html code:
<object type="application/x-shockwave-flash" width="360" height="288" wmode="transparent"
data="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true">
<param name="movie" value="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true" />
<param name="wmode" value="transparent" />
</object>
E Voila :KS Have fun!
Sources for this howto:
- Flash FLV Player (http://pyg.keonox.com/tests/flash_flv_player/) by jeroen wijering
- FLVtool2 documentation (http://inlet-media.de/)
- convert mpg - flv in myth (http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_using_flash_ video)
- ffmpeg documentation (http://ffmpeg.mplayerhq.hu/documentation.html)
The Version 7 was totally unuseable, the video and audio sync was totally broken, firefox crashed quite often, the cpu went up to over 80 %... but now it seems ok, so let's start to create a flash movie. :D
First you need an unrestricted version of ffmpeg:
you need to get the svn version (http://ffmpeg.mplayerhq.hu/download.html) and compile it for yourself, cause the ubuntu 6.06 build has no lame & xvid encoding enabled, or get my package here (http://michael.hoertnagl.googlepages.com/ffmpeg_31.cvs20061020-ubuntu1_i386.deb).
My compiling options:
FFmpeg version SVN-r6738, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --extra-cflags=-fomit-frame-pointer --enable-xvid --enable-pp --enable-vorbis --enable-libogg --enable-dc1394 --enable-libgsm --disable-debug --enable-mp3lame --enable-faadbin --enable-faad --enable-faac --enable-xvid --prefix=/usr --enable-gpl
ffmpeg SVN-r6738
built on Oct 20 2006 00:29:57, gcc: 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
libavutil version: 49.0.1
libavcodec version: 51.20.0
libavformat version: 50.6.0
now get the latest release from FLVtool2 (http://rubyforge.org/frs/?group_id=1096)
It's a ruby script which adds metadata to the FLV file to make the progress bar work and letting you skip between bits of the file. The install is easy, just follow the README.
The source video file in this example ("input.mpg") is a DVB-S Transport Stream (generic PES Container 720x576) , recorded with mythtv and converted to a MPG2 video with ProjectX (http://sourceforge.net/projects/project-x).
ok. it's time to fire up a terminal and start the encoding with ffmpeg
ffmpeg -y -i input.mpg -r 20 -s 360x288 -deinterlace -ar 22050 output.flv
Next we need to add the metadata to the flv movie:
cat output.flv | flvtool2 -U stdin final.flv
Now we have the finished seek-able flv movie. You can test it with mplayer (seeking doesn't work with mplayer though). To embed it in a webpage, grab yourself a copy of the very good "flvplayer (http://pyg.keonox.com/tests/flash_flv_player/flvplayer.swf)", written by joern wijering, and place it in the same directory as the webpage you plan to embed the movie
here is the html code:
<object type="application/x-shockwave-flash" width="360" height="288" wmode="transparent"
data="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true">
<param name="movie" value="flvplayer.swf?file=movies/final.flv&autoStart=false&showFs=true" />
<param name="wmode" value="transparent" />
</object>
E Voila :KS Have fun!
Sources for this howto:
- Flash FLV Player (http://pyg.keonox.com/tests/flash_flv_player/) by jeroen wijering
- FLVtool2 documentation (http://inlet-media.de/)
- convert mpg - flv in myth (http://www.mythtv.org/wiki/index.php/Stream_mythtv_recordings_from_mythweb_using_flash_ video)
- ffmpeg documentation (http://ffmpeg.mplayerhq.hu/documentation.html)