Blog信息 |
blog名称: 日志总数:1304 评论数量:2242 留言数量:5 访问次数:7576447 建立时间:2006年5月29日 |

| |
[视频处理]Encoding video to FLV format 软件技术
lhwork 发表于 2007/2/5 10:41:37 |
This page provides some info about how to convert a video file into Macromedia's FLV format. FLV is a video file format with advanced capabilities including progressive download. FLV requires a Flash Player version 7 (or newer) to be installed in the client browser.
Video Encoding with Open Source tools
You can encode FLV files using ffmpeg. You need to compile ffmpeg with amr and lame enabled. To do this first download ffmpeg latest version and then download AMR codecs from 3gpp. (This release/series worked for me, together with ffmpeg-0.4.9-p20051216. Thanks for the tips from Tina.) To build ffmpeg do following:
Exract ffmpeg package, go to the ffmpeg libavcodec directory and mkdir amr amr_float amrwb_float
extract 26073-5xx.zip to amr directory
extract 26104-5xx.zip to amr_float directory
extract 26236-5xx.zip to amrwb_float
./configure --enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-mp3lame
make & install
FLV metadata can be injected using flvtool2.
To convert a movie file (.mp4 .mov .mpg .3gp .mpeg .wmv .avi) to FLV, do following:
ffmpeg -i movie.[avi] -s 320x240 -ar 44100 -r 12 movie.flv
cat movie.flv | flvtool2 -U stdin movie.flv
The flvtool2 command above add the video duration into the FLV's metadata. FlowPlayer reads the duration information from the FLV and displays it. You can also use flvtool2 to tag cue points into the FLV. Cue points can be used to enhance the support for long videos.
Video Encoding on Windows
For encoding on Windows I recommend a free tool called Riva FLV Encoder. This tool is available at Riva Web site. Starting from version 2.0 it support FLV version 1.1 which contains the required timing information. Without the timing information, FlowPlayer's scrub bar and progress tracking do not work.
There are also several commercial encoding applications that are capable of producing FLV. This whitepaper describes the FLV format and also lists several tools that can be used to generate FLV video files. Probably the most popular of these encoding applications is called Sorenson Squeeze. More information is available at sorenson.com. SWF Encoding can also be done using Sorenson Squeeze.
Video encoding on MacffmpeX is a Mac fronted for ffmpeg. They have a nice page about encoding FLV. |
|
|