I am using this simple ffmpeg command to convert to .flv
the sound is o.k. but not great how can I improve it,
I have seen somewhere that libfaac is not the best audio codec.
Code:
Output:Code:ffmpeg -i test.mp4 -sameq -acodec libfaac -s 480x320 test.flv
link to the files http://wiziwiz.com/test.htmlCode:$ ffmpeg -i test.mp4 -sameq -acodec libfacc -s 480x320 test.flv FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Duration: 00:01:57.36, start: 0.000000, bitrate: 2672 kb/s Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2513 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 157 kb/s Unknown encoder 'libfacc' [richie@web1 testing]$ ffmpeg -i test.mp4 -sameq -acodec libfaac -s 480x320 test.flv FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Duration: 00:01:57.36, start: 0.000000, bitrate: 2672 kb/s Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2513 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 157 kb/s Output #0, flv, to 'test.flv': Metadata: encoder : Lavf52.64.2 Stream #0.0(und): Video: flv, yuv420p, 480x320 [PAR 32:27 DAR 16:9], q=2-31, 200 kb/s, 1k tbn, 30 tbc Stream #0.1(und): Audio: libfaac, 44100 Hz, stereo, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 3518 fps= 97 q=0.0 Lsize= 56871kB time=117.28 bitrate=3972.3kbits/s dup=0 drop=1 video:55815kB audio:917kB global headers:0kB muxing overhead 0.245238%![]()
+ Reply to Thread
Results 1 to 30 of 32
-
Last edited by richiedood; 1st Jul 2011 at 18:12.
-
The default aac bitrate is set to 64 kbps which is very low. Try this...
Code:ffmpeg -i test.mp4 -sameq -acodec libfaac -ab 192k -s 480x320 test.flv
You can also higher the sample frequency to -ar 48000
Code:ffmpeg -i test.mp4 -sameq -acodec libfaac -ab 192k -ar 48000 -s 480x320 test.flv
-
WOW - thanks Chris sounds perfect at -ab 256k -ar 48000 !
while I was running this though I noticed the file size is 3 times larger.
I think this is to do with the -sameq part of the command.
is there a magic formula for nice quality.... -b ? -
Yes it has! You can see in your log that the source is reported as 2672 kbps and FFmpeg reports 3972 kbps for the output.
You should then take of -sameq and try e.g. -b 2000k. You can also add this to improve quality ...
Code:-vcodec flv -b 2000k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4 -trellis 1
-
Hi Chris,
That looks a little complicated,
I amended my command to
Code:ffmpeg -i test.mp4 -vcodec flv -b 2000k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4 -trellis 1 sunday.flv
original file size about 39 mb and the file size is reduced to about 29mb, impressively good quality however the background is looking a bit pixelated or "blocky" what can I tweek to improve the visual quality of the video?
please explain some of the variables in the command (tried to research them in http://www.ffmpeg.org/ffmpeg-doc.htm)
Thanks again nearly there,
-
The commands I suggested were meant as an addition to your existing command line to improve video quality.
With your current command line, you have to add the audio commands and output frame size of your original command line like...
Code:ffmpeg -i test.mp4 -vcodec flv -b 2000k -g 160 -cmp 3 -subcmp 3 -mbd 2 -flags aic+cbp+mv0+mv4 -trellis 1 -acodec libfaac -ab 192k -ar 48000 -s 480x320 sunday.flv
-
you'll get significantly better video quality and compression using h.264 ; you can access x264 through ffmpeg or x264 cli
neroaac produces significantly better results than libfaac. You can access it through a free CLI encoder from Nero, and mux with ffmpeg. Flv container isn't necessary, .mp4 streams fine with flash and you're using Jw player which works fine as well
I realize that this was just a "test" example, but when possible, try to copy the streams instead. For example, your original mp4 already had AAC audio , -acodec copy would have been faster, better quality and smaller filesize. This way you don't incur generation loss with lossy encoding -
I understand the about the better quality of h.264 and nero, I am already using .mp4 conversions, also -acodec copy won't work for all types of file input.
I am trying to tweek the .flv output as best I can whilst saving on file size - due to the way my sites automated code (php) is set up...
Now the sound is fine, and using -b 3000 has improved the pixelation
Next thing I want to be able to do is not to resize but scale down to 720 px wide without loosing original aspect ratio... -
I am trying to tweek the .flv output as best I can whilst saving on file size - due to the way my sites automated code (php) is set up...
3000kbps for 480x320 is absurd . You can easily cut the size by more than 1/2 by using h.264 and still get better quality.
Next thing I want to be able to do is not to resize but scale down to 720 px wide without loosing original aspect ratio
720x404 will give you 1.78 AR, but some people like to stick to mod16 resolutions. The closest one would be 720x400 -
thanks for that,
thought .flv was h264...
o.k. so I have changed the command to
[CODE]
ffmpeg -i test.mp4 -vcodec libx264 -vpre slow -acodec libfaac -ab 256k -ar 48000 -s 720x400 mon2.flv/CODE]
really low file size....great!
the quality is not that great - how do I tweek to improve for best video quality?
really I want to use this command for all sorts of file types and sizes there must be a way to scale without using set a width and hight? -
what was the resulting bitrate ?
specify a crf value like -crf 22
lower values result in higher quality, larger filesizes, you might use in the range 16-24
I don't know of a way to automatically scale properly , because what if the input video has a 4:3 AR, or a 2.35:1 AR ? . What if it's some other combination ? You would have to code some script to compensate for that, otherwise they will be distorted. -
thanks that really works,
Code:$ ffmpeg -i test.mp4 -vcodec libx264 -vpre slow -crf 22 FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 test.mp4: No such file or directory [richie@web1 ~]$ -acodec libfaac -ab 256k -ar 48000 -s 720x400 mon2.flv -bash: -acodec: command not found [richie@web1 ~]$ cd /sites/vidmeup.com/www/testing [richie@web1 testing]$ [richie@web1 testing]$ ffmpeg -i test.mp4 -vcodec libx264 -vpre slow -crf 22 -acodec libfaac -ab 256k -ar 48000 -s 720x400 mon2.flv FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 4 2010 15:35:31 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isomavc1 Duration: 00:01:57.36, start: 0.000000, bitrate: 2672 kb/s Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2513 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc Stream #0.1(und): Audio: aac, 44100 Hz, stereo, s16, 157 kb/s File 'mon2.flv' already exists. Overwrite ? [y/N] y [libx264 @ 0xf0801d0]using SAR=80/81 [libx264 @ 0xf0801d0]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0xf0801d0]profile High, level 3.0 [libx264 @ 0xf0801d0]264 - core 107 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00 Output #0, flv, to 'mon2.flv': Metadata: encoder : Lavf52.64.2 Stream #0.0(und): Video: libx264, yuv420p, 720x400 [PAR 80:81 DAR 16:9], q=10-51, 200 kb/s, 1k tbn, 30 tbc Stream #0.1(und): Audio: libfaac, 48000 Hz, stereo, s16, 256 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 3518 fps= 14 q=-1.0 Lsize= 20996kB time=117.27 bitrate=1466.7kbits/s dup=0 drop=1 video:18466kB audio:2370kB global headers:0kB muxing overhead 0.769443% [libx264 @ 0xf0801d0]frame I:16 Avg QP:18.41 size: 22805 [libx264 @ 0xf0801d0]frame P:1291 Avg QP:22.77 size: 9135 [libx264 @ 0xf0801d0]frame B:2211 Avg QP:25.90 size: 3053 [libx264 @ 0xf0801d0]consecutive B-frames: 10.5% 7.8% 24.6% 57.1% [libx264 @ 0xf0801d0]mb I I16..4: 24.9% 59.6% 15.5% [libx264 @ 0xf0801d0]mb P I16..4: 3.7% 10.0% 2.0% P16..4: 34.2% 17.8% 11.2% 0.0% 0.0% skip:21.1% [libx264 @ 0xf0801d0]mb B I16..4: 0.3% 0.9% 0.3% B16..8: 39.3% 9.4% 2.9% direct: 3.3% skip:43.6% L0:33.8% L1:49.6% BI:16.6% [libx264 @ 0xf0801d0]8x8 transform intra:63.0% inter:71.2% [libx264 @ 0xf0801d0]direct mvs spatial:99.9% temporal:0.1% [libx264 @ 0xf0801d0]coded y,uvDC,uvAC intra: 60.1% 67.2% 30.3% inter: 19.1% 21.3% 1.9% [libx264 @ 0xf0801d0]i16 v,h,dc,p: 25% 26% 9% 41% [libx264 @ 0xf0801d0]i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 8% 10% 9% 9% 13% 12% 14% 11% 15% [libx264 @ 0xf0801d0]i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 9% 9% 8% 15% 13% 14% 10% 14% [libx264 @ 0xf0801d0]i8c dc,h,v,p: 45% 24% 17% 14% [libx264 @ 0xf0801d0]Weighted P-Frames: Y:4.4% [libx264 @ 0xf0801d0]ref P L0: 61.5% 15.8% 13.7% 4.2% 3.4% 1.2% 0.1% [libx264 @ 0xf0801d0]ref B L0: 91.2% 6.3% 1.9% 0.6% [libx264 @ 0xf0801d0]ref B L1: 96.9% 3.1% [libx264 @ 0xf0801d0]kb/s:1289.93
will start a new thread re: auto scale -
There are avisynth functions that calculate this (autoresizing with borders to keep AR), but it looks like you are on a linux box. Maybe you can borrow some of the code, or run it in wine
http://forum.doom9.org/showthread.php?t=157872 -
yes I am on linux and converting for web not dvd
I am not familiar with avisynth...
my new thread https://forum.videohelp.com/threads/336384-ffmpeg-automatic-scaling-possible?p=2089401#post2089401
merci beaucoup -
what is -vpre slow by the way it seems to be slowing the conversion down?
-
That's the preset.
Use a faster preset if you want faster. The faster the preset, the more options are turned off (lower quality for a given filesize, but faster encode times)
If you really want to tweak the settings you can read about the CLI options (they are slightly different for ffmpeg libx264 than x264 CLI)
http://mewiki.project357.com/wiki/X264_Settings -
I have upgraded my ffmpeg to most recent and changed the command code slightly all good now
I have got a "slipping" sound issue though -sort of breaking up trying to catch up...just a bit.
it just seems to be this .mov file and its the same in different players.
Code:ffmpeg -i VID.mov -vcodec libx264 -preset fast -crf 23 -threads 0 -vf scale="720:trunc(ow/a/2)*2" -acodec libfaac -aq 100 wed4.flv
Code:ffmpeg -i VID.mov -vcodec libx264 -preset fast -crf 23 -threads 0 -vf scale="720:trunc(ow/a/2)*2" -acodec libfaac -aq 100 wed4.flv ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 29 2011 13:47:11 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libopenjpeg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-swscale libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1e151400] max_analyze_duration 5000000 reached at 5013333 Seems stream 0 codec frame rate differs from container frame rate: 5000.00 (5000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2011-06-29 20:36:34 Duration: 00:01:39.37, start: 0.000000, bitrate: 17989 kb/s Stream #0.0(eng): Video: h264 (Main), yuv420p, 1440x1080, 17672 kb/s, PAR 4:3 DAR 16:9, 25 fps, 25 tbr, 2500 tbn, 5k tbc Metadata: creation_time : 2011-06-29 20:36:34 Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 313 kb/s Metadata: creation_time : 2011-06-29 20:36:34 Stream #0.2(eng): Data: tmcd / 0x64636D74 Metadata: creation_time : 2011-06-29 20:36:34 [buffer @ 0x1e1758e0] w:1440 h:1080 pixfmt:yuv420p tb:1/1000000 sar:4/3 sws_param: [scale @ 0x1e196fa0] w:1440 h:1080 fmt:yuv420p -> w:720 h:538 fmt:yuv420p flags:0x4 [libx264 @ 0x1e158420] using SAR=4/3 [libx264 @ 0x1e158420] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0x1e158420] profile High, level 3.0 [libx264 @ 0x1e158420] 264 - core 115 r2008 4c552d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, flv, to 'wed4.flv': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2011-06-29 20:36:34 encoder : Lavf53.4.0 Stream #0.0(eng): Video: libx264, yuv420p, 720x538 [PAR 4:3 DAR 480:269], q=2-31, 200 kb/s, 1k tbn, 25 tbc Metadata: creation_time : 2011-06-29 20:36:34 Stream #0.1(eng): Audio: libfaac, 48000 Hz, stereo, s16, 64 kb/s Metadata: creation_time : 2011-06-29 20:36:34 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help frame= 2484 fps= 50 q=-1.0 Lsize= 14920kB time=00:01:39.28 bitrate=1231.1kbits/s video:12999kB audio:1795kB global headers:0kB muxing overhead 0.853988% frame I:59 Avg QP:20.53 size: 22467 [libx264 @ 0x1e158420] frame P:1676 Avg QP:24.42 size: 6453 [libx264 @ 0x1e158420] frame B:749 Avg QP:27.24 size: 1561 [libx264 @ 0x1e158420] consecutive B-frames: 54.1% 14.7% 6.6% 24.5% [libx264 @ 0x1e158420] mb I I16..4: 20.2% 61.2% 18.6% [libx264 @ 0x1e158420] mb P I16..4: 6.8% 11.7% 2.1% P16..4: 23.9% 9.7% 4.3% 0.0% 0.0% skip:41.4% [libx264 @ 0x1e158420] mb B I16..4: 1.0% 1.9% 0.4% B16..8: 10.6% 3.8% 0.5% direct: 5.0% skip:76.9% L0:36.5% L1:49.8% BI:13.7% [libx264 @ 0x1e158420] 8x8 transform intra:57.3% inter:72.4% [libx264 @ 0x1e158420] coded y,uvDC,uvAC intra: 47.8% 54.1% 20.0% inter: 13.8% 13.4% 1.2% [libx264 @ 0x1e158420] i16 v,h,dc,p: 34% 43% 4% 19% [libx264 @ 0x1e158420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 20% 21% 5% 7% 7% 7% 6% 7% [libx264 @ 0x1e158420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 23% 16% 5% 8% 7% 7% 5% 5% [libx264 @ 0x1e158420] i8c dc,h,v,p: 57% 20% 16% 7% [libx264 @ 0x1e158420] Weighted P-Frames: Y:2.0% UV:1.4% [libx264 @ 0x1e158420] ref P L0: 83.1% 16.9% [libx264 @ 0x1e158420] ref B L0: 88.8% 11.2% [libx264 @ 0x1e158420] ref B L1: 97.6% 2.4% [libx264 @ 0x1e158420] kb/s:1071.65
-
Hi Chris,
think you are right I have reverted to original settings and now it hass a stuttering audio and on on one play lost sound all together
Code:ffmpeg -i VID.mov -vcodec libx264 -preset fast -crf 23 -threads 0 -vf scale="720:trunc(ow/a/2)*2" -acodec libfaac -ab 256k -ar 48000 wed5.flv
-
It seems to also work on vorbis audio, but then with higher values (read 60 somewhere). Can't find anything about aac except that it doesn't work and leads to the 64kbps default?
If you only have it on a particular source, it might be a broken encoder? -
Last edited by Chris K; 30th Jun 2011 at 06:21.
-
I am back to where I started lol -
I am using x264 that improved the video quality and very happy
so what is the best now for my audio...? -
I don't know if x264 in flv container supports other than aac audio. Others can probably help here.
EDIT:
Seems to also support mp3 and a few others that are not really applicable here.
http://en.wikipedia.org/wiki/Flash_Video (see table below).
There's nothing against aac and if you have the issue only with a particular source, it's a FFmpeg decoding problem and changing the audio codec won't probably help.Last edited by Chris K; 30th Jun 2011 at 06:53.
-
hmm it works for this other .mov
Code:ffmpeg -i another.mov -vcodec libx264 -preset fast -crf 23 -threads 0 -vf scale="720:trunc(ow/a/2)*2" -acodec libfaac -ab 256k -ar 48000 thurs.flv ffmpeg version 0.8, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 29 2011 13:47:11 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libopenjpeg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-swscale libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 600.00 (600/1) -> 12.00 (12/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'another.mov': Metadata: creation_time : 2001-02-19 16:45:54 title : QuickTime Sample Movie title-eng : QuickTime Sample Movie copyright : © Apple Computer, Inc. 2001 copyright-eng : © Apple Computer, Inc. 2001 Duration: 00:00:05.00, start: 0.000000, bitrate: 131 kb/s Stream #0.0(eng): Video: svq1, yuv410p, 190x240, 97 kb/s, 12 fps, 12 tbr, 600 tbn, 600 tbc Metadata: creation_time : 2001-02-19 16:45:54 Stream #0.1(eng): Audio: qdm2, 22050 Hz, 2 channels, s16, 32 kb/s Metadata: creation_time : 2001-02-19 16:45:54 Incompatible pixel format 'yuv410p' for codec 'libx264', auto-selecting format 'yuv420p' [buffer @ 0x1f579020] w:190 h:240 pixfmt:yuv410p tb:1/1000000 sar:0/1 sws_param: [scale @ 0x1f57c280] w:190 h:240 fmt:yuv410p -> w:720 h:908 fmt:yuv420p flags:0x4 [libx264 @ 0x1f572760] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 [libx264 @ 0x1f572760] profile High, level 3.1 [libx264 @ 0x1f572760] 264 - core 115 r2008 4c552d8 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=12 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, flv, to 'thurs.flv': Metadata: creation_time : 2001-02-19 16:45:54 title : QuickTime Sample Movie title-eng : QuickTime Sample Movie copyright : © Apple Computer, Inc. 2001 copyright-eng : © Apple Computer, Inc. 2001 encoder : Lavf53.4.0 Stream #0.0(eng): Video: libx264, yuv420p, 720x908, q=2-31, 200 kb/s, 1k tbn, 12 tbc Metadata: creation_time : 2001-02-19 16:45:54 Stream #0.1(eng): Audio: libfaac, 48000 Hz, 2 channels, s16, 256 kb/s Metadata: creation_time : 2001-02-19 16:45:54 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help frame= 48 fps= 0 q=26.0 size= 11kB time=00:00:00.50 bitrate= 183.0kbits/frame= 60 fps= 45 q=-1.0 Lsize= 309kB time=00:00:04.83 bitrate= 524.1kbits/s video:203kB audio:100kB global headers:0kB muxing overhead 1.838332% frame I:1 Avg QP: 1.00 size: 167 [libx264 @ 0x1f572760] frame P:42 Avg QP:18.97 size: 4685 [libx264 @ 0x1f572760] frame B:17 Avg QP:21.02 size: 613 [libx264 @ 0x1f572760] consecutive B-frames: 60.0% 6.7% 0.0% 33.3% [libx264 @ 0x1f572760] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x1f572760] mb P I16..4: 2.4% 6.7% 0.4% P16..4: 9.0% 3.6% 1.3% 0.0% 0.0% skip:76.5% [libx264 @ 0x1f572760] mb B I16..4: 0.1% 0.4% 0.0% B16..8: 2.2% 0.7% 0.0% direct: 1.7% skip:94.8% L0:29.0% L1:59.3% BI:11.7% [libx264 @ 0x1f572760] 8x8 transform intra:56.9% inter:75.7% [libx264 @ 0x1f572760] coded y,uvDC,uvAC intra: 37.1% 46.6% 33.7% inter: 4.2% 7.1% 1.3% [libx264 @ 0x1f572760] i16 v,h,dc,p: 74% 11% 2% 13% [libx264 @ 0x1f572760] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 19% 19% 4% 6% 7% 6% 6% 5% [libx264 @ 0x1f572760] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 22% 15% 4% 11% 9% 7% 5% 3% [libx264 @ 0x1f572760] i8c dc,h,v,p: 64% 11% 11% 14% [libx264 @ 0x1f572760] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x1f572760] ref P L0: 86.0% 14.0% [libx264 @ 0x1f572760] ref B L0: 87.9% 12.1% [libx264 @ 0x1f572760] ref B L1: 98.1% 1.9% [libx264 @ 0x1f572760] kb/s:331.80
weird
so maybe use nero audio codec? -
-acodec libmp3lame
You can use the same bitrate and sample rate settings as for aac (-ab 256k -ar 48000). -
wow that fixed it! note had to change -ar 48000 -ar 41000
thanks!
Code:ffmpeg -i VID.mov -vcodec libx264 -preset fast -crf 24 -threads 0 -vf scale="720:trunc(ow/a/2)*2" -acodec libmp3lame -ab 256k -ab 256k -ar 41000 thursday5.flv
Last edited by richiedood; 30th Jun 2011 at 10:52.
-
Similar Threads
-
best audio video quality of youtube poor quality and not hq flv videos.
By nusratjaveid in forum Video ConversionReplies: 3Last Post: 20th Jun 2010, 19:23 -
ffmpeg | How can i get the best quality / filezise ratio converting to FLV
By landuchi in forum Video ConversionReplies: 2Last Post: 26th Oct 2009, 13:33 -
Mencoder // ffmpeg flv file Audio-video sync problem
By krishnareddy in forum ffmpegX general discussionReplies: 5Last Post: 26th Apr 2009, 09:13 -
Mux a FLV AVI + MP3 -> FLV with ffmpeg or mencoder?
By Colmino in forum Video ConversionReplies: 9Last Post: 29th Mar 2008, 22:11 -
[solved] FFMPEG Mapping Question
By Pixelartist in forum LinuxReplies: 5Last Post: 13th Nov 2007, 07:02