Opened 5 years ago

Closed 5 years ago

#3591 closed defect (worksforme)

Setting the audio bitrate for the second (or all following) streams does not work

Reported by: Atarikid Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When you set the audio bitrate for the second (or all following) audio streams, that setting is ignored. All audio bitrates are set to the first.

In the following example the audio bitrate for the first audio stream is set to 128k, the second to 256k.
You will notice the second is also encoded to 128k.
This is the case with any audio codec.

Happens with the latest GIT and point release.

/Users/Atarikid/Library/Application?\ Support/iFFmpeg/ffmpeg -i /Users/Atarikid/Desktop/Rock?.mp4 -map 0:1 -map 0:0 -map 0:0 -c:a aac -cutoff 15000 -b:a 128k -c:a:1 aac -ab:2 256k -strict experimental -async 1 -c:v libx264 -b:v 1134k -bt 100k -bufsize 453.6k -r 25 -s 480x270 -aspect 16:9 -threads 8 -y "/Users/Atarikid/Movies/Rock?.mp4"

Console output:

ffmpeg version 2.2.1-tessus Copyright (c) 2000-2014 the FFmpeg developers

built on Apr 10 2014 05:10:42 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-libmodplug --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --disable-indev=qtkit --enable-runtime-cpudetect
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Atarikid/Desktop/Rock?.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
creation_time : 2010-07-13 15:38:07

Duration: 00:03:48.08, start: 0.000000, bitrate: 565 kb/s

Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 93 kb/s (default)
Metadata:

creation_time : 2010-07-13 15:38:07
handler_name : (C) 2007 Google Inc. v08.13.2007.

Stream #0:1(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 469 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Metadata:

creation_time : 2010-07-13 15:38:07
handler_name : (C) 2007 Google Inc. v08.13.2007.

-async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0.

Last message repeated 1 times

[libx264 @ 0x103806e00] VBV maxrate unspecified, assuming CBR
[libx264 @ 0x103806e00] using SAR=1/1
[libx264 @ 0x103806e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
[libx264 @ 0x103806e00] profile High, level 2.1
[libx264 @ 0x103806e00] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=8 lookahead_threads=1 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=1134 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1134 vbv_bufsize=453 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/Users/Xtophe/Movies/Rock?.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: isomavc1mp42
encoder : Lavf55.33.100
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=-1--1, 1134 kb/s, 12800 tbn, 25 tbc (default)
Metadata:

creation_time : 2010-07-13 15:38:07
handler_name : (C) 2007 Google Inc. v08.13.2007.

Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

creation_time : 2010-07-13 15:38:07
handler_name : (C) 2007 Google Inc. v08.13.2007.

Stream #0:2(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

creation_time : 2010-07-13 15:38:07
handler_name : (C) 2007 Google Inc. v08.13.2007.

Stream mapping:

Stream #0:1 -> #0:0 (h264 -> libx264)
Stream #0:0 -> #0:1 (aac -> aac)
Stream #0:0 -> #0:2 (aac -> aac)

Press [q] to stop, ? for help
frame= 158 fps=0.0 q=16.0 size= 592kB time=00:00:06.91 bitrate= 700.6kbits/frame= 283 fps=282 q=20.0 size= 1366kB time=00:00:11.70 bitrate= 956.3kbits/frame= 401 fps=267 q=16.0 size= 2159kB time=00:00:16.41 bitrate=1077.5kbits/frame= 537 fps=268 q=27.0 size= 2941kB time=00:00:21.91 bitrate=1099.1kbits/frame= 664 fps=265 q=16.0 size= 3697kB time=00:00:27.02 bitrate=1120.5kbits/frame= 796 fps=264 q=16.0 size= 4438kB time=00:00:32.32 bitrate=1124.8kbits/frame= 924 fps=263 q=19.0 size= 5172kB time=00:00:37.38 bitrate=1133.4kbits/frame= 1049 fps=262 q=24.0 size= 5950kB time=00:00:42.35 bitrate=1150.9kbits/frame= 1154 fps=256 q=22.0 size= 6678kB time=00:00:46.69 bitrate=1171.5kbits/frame= 1284 fps=256 q=24.0 size= 7418kB time=00:00:52.05 bitrate=1167.3kbits/frame= 1418 fps=257 q=25.0 size= 8261kB time=00:00:57.16 bitrate=1183.7kbits/frame= 1537 fps=255 q=24.0 size= 8981kB time=00:01:02.11 bitrate=1184.5kbits/frame= 1663 fps=255 q=16.0 size= 9828kB time=00:01:06.87 bitrate=1204.0kbits/frame= 1780 fps=253 q=16.0 size= 10511kB time=00:01:11.61 bitrate=1202.4kbits/frame= 1896 fps=252 q=17.0 size= 11232kB time=00:01:16.57 bitrate=1201.6kbits/frame= 2021 fps=251 q=17.0 size= 12011kB time=00:01:21.17 bitrate=1212.1kbits/frame= 2138 fps=250 q=20.0 size= 12764kB time=00:01:26.28 bitrate=1211.8kbits/frame= 2278 fps=252 q=16.0 size= 13533kB time=00:01:31.85 bitrate=1206.9kbits/frame= 2406 fps=252 q=16.0 size= 14302kB time=00:01:36.68 bitrate=1211.7kbits/frame= 2533 fps=252 q=15.0 size= 15037kB time=00:01:42.05 bitrate=1207.1kbits/frame= 2659 fps=252 q=18.0 size= 15786kB time=00:01:46.71 bitrate=1211.8kbits/frame= 2779 fps=252 q=17.0 size= 16540kB time=00:01:51.82 bitrate=1211.7kbits/frame= 2900 fps=251 q=18.0 size= 17267kB time=00:01:56.42 bitrate=1215.0kbits/frame= 3031 fps=252 q=17.0 size= 18051kB time=00:02:01.53 bitrate=1216.7kbits/frame= 3157 fps=252 q=16.0 size= 18841kB time=00:02:06.64 bitrate=1218.7kbits/frame= 3274 fps=251 q=20.0 size= 19559kB time=00:02:11.70 bitrate=1216.6kbits/frame= 3402 fps=251 q=17.0 size= 20379kB time=00:02:16.60 bitrate=1222.1kbits/frame= 3527 fps=251 q=16.0 size= 21139kB time=00:02:21.45 bitrate=1224.2kbits/frame= 3657 fps=251 q=18.0 size= 21885kB time=00:02:26.98 bitrate=1219.7kbits/frame= 3785 fps=251 q=16.0 size= 22637kB time=00:02:31.78 bitrate=1221.7kbits/frame= 3913 fps=252 q=17.0 size= 23425kB time=00:02:37.17 bitrate=1220.9kbits/frame= 4053 fps=252 q=18.0 size= 24295kB time=00:02:42.72 bitrate=1223.1kbits/frame= 4181 fps=253 q=16.0 size= 25062kB time=00:02:47.69 bitrate=1224.3kbits/frame= 4305 fps=252 q=17.0 size= 25833kB time=00:02:52.61 bitrate=1226.0kbits/frame= 4423 fps=252 q=18.0 size= 26590kB time=00:02:57.70 bitrate=1225.8kbits/frame= 4547 fps=252 q=17.0 size= 27339kB time=00:03:02.32 bitrate=1228.4kbits/frame= 4666 fps=251 q=16.0 size= 28046kB time=00:03:07.31 bitrate=1226.5kbits/frame= 4794 fps=251 q=19.0 size= 28821kB time=00:03:12.49 bitrate=1226.6kbits/frame= 4922 fps=252 q=16.0 size= 29646kB time=00:03:17.16 bitrate=1231.8kbits/frame= 5045 fps=251 q=18.0 size= 30457kB time=00:03:22.24 bitrate=1233.7kbits/frame= 5164 fps=251 q=16.0 size= 31195kB time=00:03:26.86 bitrate=1235.3kbits/frame= 5292 fps=251 q=20.0 size= 31964kB time=00:03:32.04 bitrate=1234.9kbits/frame= 5428 fps=252 q=16.0 size= 32797kB time=00:03:37.57 bitrate=1234.9kbits/frame= 5547 fps=251 q=17.0 size= 33517kB time=00:03:42.23 bitrate=1235.5kbits/frame= 5675 fps=251 q=19.0 size= 34268kB time=00:03:47.27 bitrate=1235.2kbits/frame= 5702 fps=250 q=-1.0 Lsize= 35047kB time=00:03:48.06 bitrate=1258.9kbits/s
video:27654kB audio:7158kB subtitle:0 data:0 global headers:0kB muxing overhead 0.678046%
[libx264 @ 0x103806e00] frame I:51 Avg QP:11.74 size: 20206
[libx264 @ 0x103806e00] frame P:2896 Avg QP:15.46 size: 7446
[libx264 @ 0x103806e00] frame B:2755 Avg QP:18.94 size: 2077
[libx264 @ 0x103806e00] consecutive B-frames: 25.3% 21.0% 29.5% 24.2%
[libx264 @ 0x103806e00] mb I I16..4: 7.4% 13.4% 79.1%
[libx264 @ 0x103806e00] mb P I16..4: 0.9% 4.5% 4.0% P16..4: 33.2% 33.1% 18.8% 0.0% 0.0% skip: 5.5%
[libx264 @ 0x103806e00] mb B I16..4: 0.1% 0.2% 0.4% B16..8: 48.7% 20.8% 6.1% direct: 4.4% skip:19.2% L0:52.6% L1:32.8% BI:14.5%
[libx264 @ 0x103806e00] 8x8 transform intra:42.0% inter:39.6%
[libx264 @ 0x103806e00] coded y,uvDC,uvAC intra: 88.5% 87.6% 60.7% inter: 35.9% 29.7% 4.9%
[libx264 @ 0x103806e00] i16 v,h,dc,p: 30% 31% 10% 29%
[libx264 @ 0x103806e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 22% 13% 6% 7% 8% 7% 9% 8%
[libx264 @ 0x103806e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 24% 9% 6% 8% 8% 7% 7% 6%
[libx264 @ 0x103806e00] i8c dc,h,v,p: 45% 23% 22% 9%
[libx264 @ 0x103806e00] Weighted P-Frames: Y:1.8% UV:0.3%
[libx264 @ 0x103806e00] ref P L0: 80.4% 11.8% 6.4% 1.4% 0.0%
[libx264 @ 0x103806e00] ref B L0: 96.2% 3.5% 0.3%
[libx264 @ 0x103806e00] ref B L1: 97.3% 2.7%
[libx264 @ 0x103806e00] kb/s:993.21

Change History (1)

comment:1 Changed 5 years ago by cehoyos

  • Resolution set to worksforme
  • Status changed from new to closed

Every one of the following combinations work for me:
-b:a:0 128k -b:a:1 256k
-b:a:0 128k -ab:2 256k
-ab:1 128k -ab:2 256k

Note: See TracTickets for help on using tickets.