Log in

View Full Version : FFMPEG 5.1 Sound Misplaced


AlanJames1987
5th April 2011, 09:58
When converting video on Linux from an 5.1 source to an AAC 5.1 source my channels get mapped incorrectly. The most noticeable problem is the sound from the center speaker comes out of the front right speaker. I am using the latest Git version on Ubuntu 10.04. Can anyone help me figure out why this is happening?

Here is an example of a video I converted.
http://www.alanjames1987.com/development/tron_6channelTest.zip

MickJT
5th April 2011, 14:23
ffmpeg revision and command line options? Also, ffprobe output of the source material.

poisondeathray
5th April 2011, 14:55
channel mapping convention is different for AC3 and AAC

see remark 1:
http://avisynth.org/mediawiki/GetChannel

AlanJames1987
5th April 2011, 16:26
FFMPEG Command
ffmpeg -i $originalsVideosDir/$1.* \
-vcodec libx264 -vf 'scale=1920:-1' -b 1920k \
-acodec aac -strict experimental $outputAudioChannels -ab 192k \
-vpre $renderSpeed -threads 0 -map_metadata -1 -y $tempDir/$1_hd.mp4
qt-faststart $tempDir/$1_hd.mp4 $finalsVideosDir/$1.mp4

FFPROBE
FFprobe version git-N-28456-g1c31b26, Copyright (c) 2007-2011 the FFmpeg developers
built on Mar 17 2011 12:49:56 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 39. 0 / 50. 39. 0
libavcodec 52.114. 0 / 52.114. 0
libavformat 52.103. 0 / 52.103. 0
libavdevice 52. 3. 0 / 52. 3. 0
libavfilter 1. 76. 0 / 1. 76. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[matroska,webm @ 0x20770d0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from '11.mkv':
Duration: 00:01:04.39, start: 0.000000, bitrate: 1536 kb/s
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x816 [PAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Metadata:
title : Tron.Legacy.2010.BluRay.1080p.x264.DTS-MySiLU
Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)

I am using the aac codec within FFMPEG because it is creating a better sounding file. However, using libfaac produces the same incorrectly mapped channels.

poisondeathray that link seems to be not working right now.

poisondeathray
5th April 2011, 16:35
poisondeathray that link seems to be not working right now.

you can use googlecache to view it

AlanJames1987
5th April 2011, 18:02
you can use googlecache to view it

Thanks. I viewed it that way and understand the different formats now. My next question is, how can I use that knowledge to correct the problem?

poisondeathray
5th April 2011, 18:07
you can remap the channels

not sure how you would do that in linux

you could remap in avisynth, or use eac3to , wavewizard, or any audio editor on pc

AlanJames1987
6th April 2011, 21:47
I found a Linux program called SOX that might be able to fix my problem. Has anyone ever used SOX?

kypec
7th April 2011, 08:15
You better start new thread specific to SOX in Audio encoding section, there are lots of helpful members over there, moderator tebasuna is awesome ;)