DCA 5.1 audio channels remapped incorrectly to output file
(I'm using the Ubuntu ffmpeg package, but I didn't see anything relevant in the changelog.) I've been trying to transcode from a video that contains 5.1 dca audio, but the output audio has its channels incorrectly mapped. Is there any way that I can correct this? When transcoding the source into 5.1 ac3, the left-front channel seems to be playing a surround channel. When transcoding the source into stereo ac3, the left-front channel seems to have been assigned the center channel from the source audio, but it definitely isn't front-left. ### Converting to stereo ### $ ffmpeg -i "The Hurt Locker.mkv" -target ntsc-dvd -ss "00:31:30" -t "00:00:30" -ac 2 SourceSample.mpg FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5 +svn20090706/debian/include --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Oct 13 2009 22:15:16, gcc: 4.4.1 Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 24.00 (24/1) Input #0, matroska, from 'The Hurt Locker.mkv': Duration: 02:10:45.85, start: 0.000000, bitrate: N/A Stream #0.0(eng): Video: h264, yuv420p, 1280x688, PAR 172:173 DAR 320:173, 24 tbr, 1k tbn, 47.95 tbc Stream #0.1: Audio: dca, 48000 Hz, 5.1, s16 Output #0, dvd, to 'SourceSample.mpg': Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x480 [PAR 201:163 DAR 603:326], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 902 fps= 1 q=2.6 Lsize= 24202kB time=30.06 bitrate=6594.8kbits/s ts/s video:22039kB audio:1648kB global headers:0kB muxing overhead 2.173043% ### ### ### Converting to 5.1 ### $ ffmpeg -i "The Hurt Locker.mkv" -target ntsc-dvd -ss "00:31:30" -t "00:00:30" SourceSample.mpg FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5 +svn20090706/debian/include --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Oct 13 2009 22:15:16, gcc: 4.4.1 Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 24.00 (24/1) Input #0, matroska, from 'The Hurt Locker.mkv': Duration: 02:10:45.85, start: 0.000000, bitrate: N/A Stream #0.0(eng): Video: h264, yuv420p, 1280x688, PAR 172:173 DAR 320:173, 24 tbr, 1k tbn, 47.95 tbc Stream #0.1: Audio: dca, 48000 Hz, 5.1, s16 Output #0, dvd, to 'SourceSample.mpg': Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x480 [PAR 201:163 DAR 603:326], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 902 fps= 1 q=2.6 Lsize= 24202kB time=30.06 bitrate=6594.8kbits/s ts/s video:22039kB audio:1648kB global headers:0kB muxing overhead 2.173043% ### ###
I transcoded the audio into stereo with mencoder, and the audio channels of the output file were proper. ### Start ### $ mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf:telecine -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:acodec=ac3:abitrate=384:aspect=16/9 -ofps 24000/1001 -o THLtesta.mpg THL.mkv MEncoder SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team success: format: 0 data: 0x0 - 0xfc881a45 [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0 [mkv] Track ID 2: audio (A_DTS), -aid 0, -alang und [mkv] Will play video track 1. Matroska file format detected. VIDEO: [avc1] 1280x688 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:31 fourcc:0x31637661 size:1280x688 fps:23.976 ftime:=0.0417 ========================================================================== Opening audio decoder: [libdca] DTS decoding with libdca Stream with high frequencies VQ coding AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000) Selected audio codec: [dts] afm: libdca (DTS-libdca) ========================================================================== PACKET SIZE: 2048 bytes, deltascr: 43885 MPEG MUXER, patching framerate to 29.97 fps Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [harddup] Opening video filter: [scale w=720 h=576] ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== Limiting audio preload to 0.4s. Increasing audio density to 4. VDec: vo config request - 1280 x 688 (preferred colorspace: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.85:1 - prescaling to correct movie aspect. SwScaler: reducing / aligning filtersize 9 -> 8 Last message repeated 1 times SwScaler: reducing / aligning filtersize 6 -> 5 Last message repeated 1 times [swscaler @ 0x87424a0]BICUBIC scaler, from yuv420p to yuv420p using MMX2 [swscaler @ 0x87424a0]using 8-tap MMX scaler for horizontal luminance scaling [swscaler @ 0x87424a0]using 8-tap MMX scaler for horizontal chrominance scaling [swscaler @ 0x87424a0]using n-tap MMX scaler for vertical scaling (YV12 like) [swscaler @ 0x87424a0]1280x688 -> 720x576 videocodec: libavcodec (720x576 fourcc=3267706d [mpg2]) Writing header... INITV: 0.200, 0.158, fps: 23.976 ENABLED SOFT TELECINING, FPS=29.970 1 duplicate frame(s)! Pos: 0.2s 5f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.016 [0:0] 1 duplicate frame(s)! Pos: 22.9s 549f ( 0%) 48.56fps Trem: 104min 6214mb A-V:0.051 [3879:384] BUFFER UNDEFLOW at stream 0, raising muxrate to 11088 kb/s, delta_scr: 39896 Pos:7845.8s 188110f (99%) 36.29fps Trem: 0min 4985mb A-V:0.046 [4841:384] Flushing video frames. Writing index... Overhead: 2.012% (103097789 / 5124532803) Writing header... Video stream: 4841.304 kbit/s (605162 B/s) size: 4747960131 bytes 7845.754 secs 188110 frames Audio stream: 384.000 kbit/s (48000 B/s) size: 376601088 bytes 7845.856 secs ### End ### On Wed, 2010-03-17 at 10:01 -0400, PsiStormYamato wrote:
(I'm using the Ubuntu ffmpeg package, but I didn't see anything relevant in the changelog.)
I've been trying to transcode from a video that contains 5.1 dca audio, but the output audio has its channels incorrectly mapped. Is there any way that I can correct this?
When transcoding the source into 5.1 ac3, the left-front channel seems to be playing a surround channel. When transcoding the source into stereo ac3, the left-front channel seems to have been assigned the center channel from the source audio, but it definitely isn't front-left.
### Converting to stereo ### $ ffmpeg -i "The Hurt Locker.mkv" -target ntsc-dvd -ss "00:31:30" -t "00:00:30" -ac 2 SourceSample.mpg FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5 +svn20090706/debian/include --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 0 / 52.20. 0 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Oct 13 2009 22:15:16, gcc: 4.4.1
Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 24.00 (24/1) Input #0, matroska, from 'The Hurt Locker.mkv': Duration: 02:10:45.85, start: 0.000000, bitrate: N/A Stream #0.0(eng): Video: h264, yuv420p, 1280x688, PAR 172:173 DAR 320:173, 24 tbr, 1k tbn, 47.95 tbc Stream #0.1: Audio: dca, 48000 Hz, 5.1, s16 Output #0, dvd, to 'SourceSample.mpg': Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x480 [PAR 201:163 DAR 603:326], q=2-31, 6000 kb/s, 90k tbn, 29.97 tbc Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 902 fps= 1 q=2.6 Lsize= 24202kB time=30.06 bitrate=6594.8kbits/s ts/s video:22039kB audio:1648kB global headers:0kB muxing overhead 2.173043% ### ###
participants (1)
-
psistormyamatoï¼ lavabit.com