sunshine_august
10th September 2009, 17:07
hi:
I used the following line to convert an avi file to flv:
ffmpeg.exe -i fengyun.avi -acodec libfaac -ac 2 -ab 16k -vcodec libx264 -coder 1 -g 250 -keyint_min 25 -sc_threshold 40 -bf 3 -b_strategy 1 -partitions +parti8x8+parti4x4+par
tp8x8+partb8x8 -directpred 1 -flags +loop -deblockalpha 0 -deblockbeta 0 -flags2 +fastpskip+wpred-dct8x8 -me_method hex -me_range 16 -subq 6 -trellis 1 -b 300k -qcomp 0.6 -i_q
factor 0.71 -qmin 10 -qmax 51 -qdiff 4 -r 29.97 -s 640x480 -y fengyun.flv
The interestring thing is that, this cmd run successfully, and I use the mediainfo.exe to check the flv file:
Format : Flash Video
File size : 2.50 MiB
Duration : 1mn 0s
Overall bit rate : 345 Kbps
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Muxing mode : Container profile=Unknown@3.0
Duration : 1mn 0s
Bit rate : 293 Kbps
Nominal bit rate : 300 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 2.35
Frame rate : 29.970 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.032
Writing library : x264 core 72
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=0 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=32 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=300 / ratetol=13.3 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.41 / aq=1:1.00
Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Duration : 1mn 0s
Bit rate : 15.6 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 44.1 KHz
Resolution : 16 bits
It seems that indeed ffmpeg can mux h264 and AAC into flv container. But can flv container be used for h.264 && AAC ? Originally I think f4v is the right container for h.264 && AAC, not flv.
I used the following line to convert an avi file to flv:
ffmpeg.exe -i fengyun.avi -acodec libfaac -ac 2 -ab 16k -vcodec libx264 -coder 1 -g 250 -keyint_min 25 -sc_threshold 40 -bf 3 -b_strategy 1 -partitions +parti8x8+parti4x4+par
tp8x8+partb8x8 -directpred 1 -flags +loop -deblockalpha 0 -deblockbeta 0 -flags2 +fastpskip+wpred-dct8x8 -me_method hex -me_range 16 -subq 6 -trellis 1 -b 300k -qcomp 0.6 -i_q
factor 0.71 -qmin 10 -qmax 51 -qdiff 4 -r 29.97 -s 640x480 -y fengyun.flv
The interestring thing is that, this cmd run successfully, and I use the mediainfo.exe to check the flv file:
Format : Flash Video
File size : 2.50 MiB
Duration : 1mn 0s
Overall bit rate : 345 Kbps
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Muxing mode : Container profile=Unknown@3.0
Duration : 1mn 0s
Bit rate : 293 Kbps
Nominal bit rate : 300 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 2.35
Frame rate : 29.970 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.032
Writing library : x264 core 72
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.0:0.0 / mixed_ref=0 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=32 / keyint=250 / keyint_min=25 / scenecut=40 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=300 / ratetol=13.3 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.41 / aq=1:1.00
Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Duration : 1mn 0s
Bit rate : 15.6 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 44.1 KHz
Resolution : 16 bits
It seems that indeed ffmpeg can mux h264 and AAC into flv container. But can flv container be used for h.264 && AAC ? Originally I think f4v is the right container for h.264 && AAC, not flv.