Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th April 2011, 21:38   #1  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
FFMPEG 5.1 Sound Misplaced

When converting video with FFMPEG on Linux from any 5.1 source to an AAC 5.1 destination my channels get mapped incorrectly. I can't figure out what is causing this because I compiled the latest FFMPEG from source. I'm looking for any command line driven solution to fix this, including using external audio converters.

Here is a zip file containing the input I'm testing and the output I am getting.
http://www.alanjames1987.com/develop...hannelTest.zip

Please help. I'm at my wits end.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com

Last edited by AlanJames1987; 8th April 2011 at 21:41. Reason: Added More Detail
AlanJames1987 is offline   Reply With Quote
Old 9th April 2011, 03:35   #2  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Your audio input is DTS 5.1, but the AAC output is only 2.0

Sorry I can't help you with Linux soft.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 9th April 2011, 04:00   #3  |  Link
kieranrk
Registered User
 
Join Date: Jun 2009
Location: London, United Kingdom
Posts: 707
It's because AAC channel order is different to AC-3 channel order. You can use the command line I think to remap the channels.
kieranrk is offline   Reply With Quote
Old 9th April 2011, 12:12   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by kieranrk View Post
It's because AAC channel order is different to AC-3 channel order.
This must be transparent to the user.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 9th April 2011, 12:32   #5  |  Link
Brazil2
Registered User
 
Join Date: Jul 2008
Posts: 532
Quote:
Originally Posted by kieranrk View Post
It's because AAC channel order is different to AC-3 channel order. You can use the command line I think to remap the channels.
AFAIK channel order for AAC 5.1 is C, L, R, SL, SR, LFE.
More info in this thread: http://forum.doom9.org/showthread.php?t=148178


Quote:
Originally Posted by tebasuna51 View Post
This must be transparent to the user.
Should be but it's not always true depending on the tools being used
Brazil2 is offline   Reply With Quote
Old 9th April 2011, 15:28   #6  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
Quote:
Your audio input is DTS 5.1, but the AAC output is only 2.0
You're right. I must have uploaded the wrong file. Its fixed now though. Both files in the zip are 5.1.

Quote:
AFAIK channel order for AAC 5.1 is C, L, R, SL, SR, LFE.
Thank you. I believe that is the correct channel order. Now I just don't know what programs to use to get that channel order in my output file. FFMPEG seems to export all other 5.1 formats correctly, just not AAC.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com

Last edited by AlanJames1987; 10th April 2011 at 03:06.
AlanJames1987 is offline   Reply With Quote
Old 10th April 2011, 15:11   #7  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
For all my transcoding/encoding needs audio-wise I try to use eac3to - remapping channels between AC3/DTS/AAC (NeroAacEnc used) has never been a problem for me.
kypec is offline   Reply With Quote
Old 10th April 2011, 17:40   #8  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
eac3to is a Windows program. I am looking for a Linux solution. I hear SoX does nearly the same thing as eac3to but I don't know how to use it. Does anyone have experience with SoX?
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com
AlanJames1987 is offline   Reply With Quote
Old 10th April 2011, 20:19   #9  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
audacity is available for linux, so you should be able to specify the channel order in that
poisondeathray is offline   Reply With Quote
Old 11th April 2011, 01:13   #10  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
Thanks but I am looking for a command line solution. I should have explained in my op that I am trying to convert a few hundred movies for work. I'm a video editor at an advertising agency and we are trying to put our entire portfolio online.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com
AlanJames1987 is offline   Reply With Quote
Old 11th April 2011, 06:11   #11  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
I've no experience with Linux whatsoever but have you tried running eac3to through wine?
kypec is offline   Reply With Quote
Old 11th April 2011, 06:39   #12  |  Link
Midzuki
Unavailable
 
Midzuki's Avatar
 
Join Date: Mar 2009
Location: offline
Posts: 1,480
sox has an option called "remix" which may give you what you're looking for...

{ source: sox.pdf }
Midzuki is offline   Reply With Quote
Old 11th April 2011, 16:55   #13  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
The remix option is what I am looking for. I can't seem to get it working however and the man pages don't describe how to use it. I also can't find any good documentation online of how to use it.

Also, I submitted a bug report for FFMPEG so hopefully this problem I am getting will be fixed in the trunk.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com
AlanJames1987 is offline   Reply With Quote
Old 11th April 2011, 20:53   #14  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
The sox man page on its website is no good?

This would do nothing: sox INPUT OUTPUT remix 1 2 3 4 5 6
This would reverse stereo: ... remix 2 1
So all you have to determine is which channel order your input is then order them correctly for the output
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.
J_Darnley is offline   Reply With Quote
Old 15th April 2011, 14:49   #15  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
Thank you. The man page wasn't very helpful. I tried what you suggested before suggesting sox and could not get it to work. I was hoping to get some help from someone who has done it before.

An example of a problem I'm having is that sox only accepts audio files. How can I separate audio from the video while still preserving the quality and correct channel order? What format should I export to and convert to? Then how do I then merge that outputted audio file back with the original video file. I have a decent understanding of all of these questions. I just can't seem to get any of the specifics correct.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com

Last edited by AlanJames1987; 15th April 2011 at 14:51.
AlanJames1987 is offline   Reply With Quote
Old 15th April 2011, 17:58   #16  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Demux/Mux streams from a container is specific to the container.

Then to extract/mux from/to mkv you have MkvExtract/MkvMerge (in MkvToolnix, I don't know GUI's for Linux), the quality is always preserved and the channel order isn't changed in this level.

For mp4 you have Mp4Box (I don't know GUI's for Linux)

The ffmpeg dts decoder seems ok (with my windows SVN-r25870-Sherpya version the audio.wav have correct channelmap) with:
ffmpeg -i input.dts -acodec pcm_s16le -ac 6 audio.wav

but converting to aac:
ffmpeg -i input.dts -acodec aac -ac 6 -strict experimental audio.aac
the output is absolutely wrong

I think you can convert the decoded audio.wav with NeroAacEnc (there are a Linux version)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 16th April 2011, 06:35   #17  |  Link
AlanJames1987
Registered User
 
AlanJames1987's Avatar
 
Join Date: Mar 2011
Location: Orlando, Fl
Posts: 11
Thank you for all the help but I have come to the conclusion that I'm not going to get the help I need on here. I have submitted a bug report to FFMPEG. Hopefully they will solve this problem soon.
__________________
Alan James
Editor, Director, Producer
Orlando Video Production, Orlando Film Production Company, 9IronProductions.com
AlanJames1987 is offline   Reply With Quote
Old 16th April 2011, 10:49   #18  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by AlanJames1987 View Post
...I have submitted a bug report to FFMPEG. Hopefully they will solve this problem soon.
Good luck!
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Reply

Tags
5.1, aac, ac-3, ffmpeg, surround sound

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.