ajdahlenburg / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

FFmbc 0.7 4 channels AAC encoding bug #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We're transcoding an 8 audio track video to a 4 audio channel video (we're 
ignore any tracks above 4).

It works fine with FFmbc 0.6.rc6 but we have problems with FFmbc 0.7.rc4.

Three of the channels are silent and the content on track 3 can be heard on 
channel 1 of the output file.

Command line and output follows:
ffmbc-0.7-rc4 -v 3 -i 'XDCAM 50 - 10s - 8track voice ident AB.mov' -vcodec 
libx264 -vf yadif -g 5 -coder 0 -b 6000k -maxrate 6000k -bufsize 5097k -vf 
scale=1920:1080 -f mp4 -y -ac 4 -strict experimental -acodec aac -ab 96k -ar 
48000 -aprofile 1 -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 
-map_audio_channel 0:3:0:0:1:2 -map_audio_channel 0:4:0:0:1:3 
4channels-aac-ffmbc0.7.mp4
FFmbc version 0.7-rc4
Copyright (c) 2008-2011 Baptiste Coudurier and the FFmpeg developers
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] Unimplemented container channel layout.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101007c00] If you want to help, upload a sample of 
this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the 
ffmpeg-devel mailing list.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'XDCAM 50 - 10s - 8track voice ident 
AB.mov':
  Metadata:
    major_brand: qt  
    minor_version: 537199360
    compatible_brands: qt  
    creation_time: 2011-11-04 13:40:33
    com.apple.finalcutstudio.media.uuid: 066D6184-EF4E-4F34-A75D-FDE839514BD9
    timecode: 10:00:00:00
  Duration: 00:00:10.00, start: 0.000000, bitrate: 59078 kb/s
    Stream #0.0(eng): Video: mpeg2video (4:2:2), yuv422p, 1920x1080i tff [PAR 1:1 DAR 16:9], 50000 kb/s, 25.00 fps
    Metadata:
      codec_name: XDCAM HD422 1080i50 (50 Mb/s)
    Stream #0.1(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.2(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.3(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.4(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.5(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.6(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.7(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.8(eng): Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Stream #0.9(eng): Data: unknown (tmcd)
Incompatible pixel format 'yuv422p' for codec 'libx264', auto-selecting format 
'yuv420p'
[yadif @ 0x100f02ac0] mode:0 parity:-1 auto_enable:0
[scale @ 0x100f02da0] w:1920 h:1080 fmt:yuv422p -> w:1920 h:1080 fmt:yuv420p 
flags:0x4
Incompatible sample format 's32' for codec 'aac', auto-selecting format 's16'
[libx264 @ 0x101047e00] using SAR=1/1
[libx264 @ 0x101047e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle 
SSE4.2
[libx264 @ 0x101047e00] profile High, level 4.0
[libx264 @ 0x101047e00] 264 - core 115 - H.264/MPEG-4 AVC codec - Copyleft 
2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 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=0 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=5 
keyint_min=1 scenecut=40 intra_refresh=0 rc_lookahead=21 rc=cbr mbtree=1 
bitrate=6000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=6000 
vbv_bufsize=5097 nal_hrd=none ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '4channels-aac-ffmbc0.7.mp4':
  Metadata:
    encoder: FFmbc 0.7
    Stream #0.0(und): Video: libx264, yuv420p, 1920x1080p [PAR 1:1 DAR 16:9], 6000 kb/s, 25.00 fps
    Stream #0.1(und): Audio: libfaac (LC), 48000 Hz, 4 channels, s16, 96 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1 [channel: 0 -> 0]
  Stream #0.2 -> #0.1 [channel: 0 -> 1]
  Stream #0.3 -> #0.1 [channel: 0 -> 2]
  Stream #0.4 -> #0.1 [channel: 0 -> 3]
Press [q] to stop, [?] for help
frame=  241 fps= 20 q=22.0 size=    6118kB time=00:00:08.32 
bitrate=6023.4kbits/s eta=00:00:02.48    
[mp4 @ 0x101047800] replacing header in front, copying  7.16MB                  

frame=  250 fps= 18 q=-1.0 Lsize=    7338kB time=00:00:09.92 
bitrate=6059.7kbits/s    
video:7321kB audio:9kB global headers:1kB muxing overhead 0.096486%
frame I:50    Avg QP:20.73  size: 72189
[libx264 @ 0x101047e00] frame P:164   Avg QP:22.92  size: 21510
[libx264 @ 0x101047e00] frame B:36    Avg QP:28.84  size:  9995
[libx264 @ 0x101047e00] consecutive B-frames: 71.2% 28.8%  0.0%  0.0%
[libx264 @ 0x101047e00] mb I  I16..4: 37.6% 44.9% 17.5%
[libx264 @ 0x101047e00] mb P  I16..4: 18.9% 11.5%  0.6%  P16..4: 31.0%  7.1%  
1.3%  0.0%  0.0%    skip:29.5%
[libx264 @ 0x101047e00] mb B  I16..4:  2.5%  1.1%  0.0%  B16..8: 33.7%  6.0%  
0.3%  direct: 2.4%  skip:54.0%  L0:45.7% L1:50.2% BI: 4.1%
[libx264 @ 0x101047e00] 8x8 transform intra:40.8% inter:72.4%
[libx264 @ 0x101047e00] coded y,uvDC,uvAC intra: 31.4% 1.5% 1.5% inter: 6.2% 
0.2% 0.1%
[libx264 @ 0x101047e00] i16 v,h,dc,p: 43% 38%  8% 11%
[libx264 @ 0x101047e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 28% 27%  3%  4%  4%  
5%  4%  5%
[libx264 @ 0x101047e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 31% 13%  4%  5%  5%  
6%  4%  4%
[libx264 @ 0x101047e00] i8c dc,h,v,p: 99%  1%  1%  0%
[libx264 @ 0x101047e00] Weighted P-Frames: Y:3.0% UV:0.0%
[libx264 @ 0x101047e00] ref P L0: 72.2%  9.1% 14.5%  4.2%
[libx264 @ 0x101047e00] ref B L0: 87.0% 13.0%
[libx264 @ 0x101047e00] kb/s:5997.55

If we switch to libfaac (we're not particularly attached to either 
implementation) we get all 4 channels but they are out of order and channel 4 
sounds corrupted.

I've uploaded the master and our output files to 
http://boncey.org/downloads/PA-983.tar.gz

Thanks, Darren.

Original issue reported on code.google.com by boncey@gmail.com on 4 Nov 2011 at 3:13

GoogleCodeExporter commented 8 years ago
Can you test with pcm audio codec instead of aac ?

Original comment by baptiste...@gmail.com on 6 Nov 2011 at 2:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Did you mean for me to test if it can transcode or for us to switch to using 
PCM?

We can't use PCM due to bandwidth/storage requirements.
Also, MP4 doesn't seem to support PCM.

I did however transcode to mov with PCM as a test and it appears to work 
correctly.

Original comment by boncey@gmail.com on 7 Nov 2011 at 1:12

GoogleCodeExporter commented 8 years ago
It's most likely a bug associated with 4 channels audio encoding and aac 
encoders that do not support the channel layout used.

Original comment by baptiste...@gmail.com on 7 Nov 2011 at 4:37

GoogleCodeExporter commented 8 years ago
I think you should form stereo pairs in the output file, so try the following 
mapping instead: -map_audio_channel 0:1:0:0:1:0 -map_audio_channel 0:2:0:0:1:1 
-map_audio_channel 0:3:0:0:2:0 -map_audio_channel 0:4:0:0:2:1! It works for me 
even with 1x8 ch input IMX transoceded to 4 stereo pairs mp4.

regards, Mihaly

Original comment by mihaly.b...@gmail.com on 8 Nov 2011 at 9:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'll only allow mono or stereo encoding for now

Original comment by baptiste...@gmail.com on 6 Oct 2014 at 7:08