[FFmpeg-user] aac encoding coming from .mkv

Rick C. rickcorteza at gmail.com
Thu Apr 5 04:34:35 CEST 2012


On Apr 4, 2012, at 3:40 PM, Carl Eugen Hoyos wrote:

> Rick C. <rickcorteza <at> gmail.com> writes:
> 
>> If I want to use -acodec aac -strict experimental -ab192k 
>> coming from .mkv containing 6 channel dts/ac-3
>> audio it seems to create a variable bit rate with low quality.
> 
> "experimental" should give you the answer, but since it worked 
> here when I tested last time, please provide the command line 
> you used together with the complete, uncut console output.
> 
> Carl Eugen
> 


Here I just ran a sample converting both audio streams:

Last login: Thu Apr  5 10:21:14 on ttys004
mahalkos-iMac:~ mahalko$ /Users/mahalko/Desktop/ffmpeg -i /Users/mahalko/Movies/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs.mkv -acodec aac -strict experimental -ab 192k -map 0:v:0 -map 0:a -t 120 /Users/mahalko/Desktop/test.mp4
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 17 2012 17:59:03 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86_64 --enable-runtime-cpudetect
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, matroska,webm, from '/Users/mahalko/Movies/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs/Apollo.18.2011.1080p.x264.MKV.AC3.DTS.Eng.NL.Subs.mkv':
  Duration: 01:26:32.03, start: 0.000000, bitrate: 11481 kb/s
    Chapter #0.0: start 0.000000, end 213.547000
    Metadata:
      title           : 00:00:00.000
    Chapter #0.1: start 213.547000, end 524.274000
    Metadata:
      title           : 00:03:33.547
    Chapter #0.2: start 524.274000, end 938.938000
    Metadata:
      title           : 00:08:44.274
    Chapter #0.3: start 938.938000, end 1368.158000
    Metadata:
      title           : 00:15:38.938
    Chapter #0.4: start 1368.158000, end 1908.323000
    Metadata:
      title           : 00:22:48.158
    Chapter #0.5: start 1908.323000, end 2194.401000
    Metadata:
      title           : 00:31:48.323
    Chapter #0.6: start 2194.401000, end 2828.159000
    Metadata:
      title           : 00:36:34.401
    Chapter #0.7: start 2828.159000, end 3360.315000
    Metadata:
      title           : 00:47:08.159
    Chapter #0.8: start 3360.315000, end 3459.581000
    Metadata:
      title           : 00:56:00.315
    Chapter #0.9: start 3459.581000, end 3865.111000
    Metadata:
      title           : 00:57:39.581
    Chapter #0.10: start 3865.111000, end 4228.850000
    Metadata:
      title           : 01:04:25.111
    Chapter #0.11: start 4228.850000, end 4473.469000
    Metadata:
      title           : 01:10:28.850
    Chapter #0.12: start 4473.469000, end 4586.582000
    Metadata:
      title           : 01:14:33.469
    Chapter #0.13: start 4586.582000, end 5192.032000
    Metadata:
      title           : 01:16:26.582
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
    Metadata:
      title           : DTS
    Stream #0:2: Audio: ac3, 48000 Hz, 5.1(side), s16, 640 kb/s
    Metadata:
      title           : AC3
    Stream #0:3(eng): Subtitle: text (default)
    Metadata:
      title           : English
    Stream #0:4(dut): Subtitle: text
    Metadata:
      title           : Nederlands
[buffer @ 0x1015197e0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Incompatible sample format 's16' for codec 'aac', auto-selecting format 'flt'
    Last message repeated 1 times
[libx264 @ 0x101847a00] using SAR=1/1
[libx264 @ 0x101847a00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x101847a00] profile High, level 4.0
[libx264 @ 0x101847a00] 264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 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=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 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, mp4, to '/Users/mahalko/Desktop/test.mp4':
  Metadata:
    encoder         : Lavf53.32.100
    Chapter #0.0: start 0.000000, end 120.000000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 24k tbn, 23.98 tbc (default)
    Stream #0:1(eng): Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 5.1(side), flt, 192 kb/s (default)
    Metadata:
      title           : DTS
    Stream #0:2: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 5.1(side), flt, 192 kb/s
    Metadata:
      title           : AC3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (dca -> aac)
  Stream #0:2 -> #0:2 (ac3 -> aac)
Press [q] to stop, [?] for help
frame= 2878 fps= 19 q=-1.0 Lsize=   79879kB time=00:01:59.95 bitrate=5455.2kbits/s    
video:76623kB audio:3129kB global headers:0kB muxing overhead 0.159208%
[libx264 @ 0x101847a00] frame I:129   Avg QP:21.15  size:112341
[libx264 @ 0x101847a00] frame P:1639  Avg QP:23.78  size: 32999
[libx264 @ 0x101847a00] frame B:1110  Avg QP:27.23  size:  8905
[libx264 @ 0x101847a00] consecutive B-frames: 38.4% 29.5%  2.7% 29.3%
[libx264 @ 0x101847a00] mb I  I16..4: 23.4% 71.9%  4.6%
[libx264 @ 0x101847a00] mb P  I16..4:  2.5% 13.5%  0.8%  P16..4: 29.1%  8.1%  2.8%  0.0%  0.0%    skip:43.2%
[libx264 @ 0x101847a00] mb B  I16..4:  0.1%  1.1%  0.0%  B16..8: 16.3%  3.4%  0.5%  direct: 1.7%  skip:76.8%  L0:49.1% L1:46.7% BI: 4.2%
[libx264 @ 0x101847a00] 8x8 transform intra:78.2% inter:83.9%
[libx264 @ 0x101847a00] coded y,uvDC,uvAC intra: 70.8% 62.8% 26.7% inter: 17.1% 12.5% 0.1%
[libx264 @ 0x101847a00] i16 v,h,dc,p: 79%  8%  5%  8%
[libx264 @ 0x101847a00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13% 20%  7% 10%  9%  9%  8%  9%
[libx264 @ 0x101847a00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 15% 12%  8% 12% 10%  9%  7%  7%
[libx264 @ 0x101847a00] i8c dc,h,v,p: 62% 16% 18%  5%
[libx264 @ 0x101847a00] Weighted P-Frames: Y:10.0% UV:7.4%
[libx264 @ 0x101847a00] ref P L0: 55.9% 13.5% 19.1% 11.2%  0.3%
[libx264 @ 0x101847a00] ref B L0: 71.5% 27.1%  1.4%
[libx264 @ 0x101847a00] ref B L1: 97.8%  2.2%
[libx264 @ 0x101847a00] kb/s:5229.17
mahalkos-iMac:~ mahalko$ 


And the resulting info:

Last login: Thu Apr  5 10:25:31 on ttys005
mahalkos-iMac:~ mahalko$ /Users/mahalko/Desktop/ffmpeg -i /Users/mahalko/Desktop/test.mp4 
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 17 2012 17:59:03 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86_64 --enable-runtime-cpudetect
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/mahalko/Desktop/test.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf53.32.100
  Duration: 00:02:00.03, start: 0.000000, bitrate: 5451 kb/s
    Chapter #0.0: start 0.000000, end 120.037000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5229 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, s16, 107 kb/s
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, s16, 106 kb/s
    Metadata:
      handler_name    : 
At least one output file must be specified
mahalkos-iMac:~ mahalko$ 




More information about the ffmpeg-user mailing list