View Single Post
Old 1st May 2011, 16:48   #1  |  Link
josk
Registered User
 
Join Date: Nov 2004
Posts: 8
on-the-fly AC3 encoding for 6 channel AAC files (mplayer)

My old Yamaha receiver is not able to play 6 channel AAC but just AC3 or DTS audio. So I always on-the-fly encode those 6ch AAC audio tracks to AC3 audio tracks using mplayer-mt (debian).

I just updated mine Debian Lenny to Debian Squeeze and now I have channel mapping issue. AC3/DTS files plays on the correct speakers. So my speaker setting should be ok. When I try to play video file that contains 6ch AAC audio track that is on-the-fly encoded to AC3 audio --> I hear those test sounds on the wrong speakers. Example CENTER is REAR RIGHT etc... Dolby Digital icon lights up always on my receievr so I know that AC3 transcoding is not the problem.

Here is command line example how you can on-the-fly encode multichannel AAC audio track to AC3 track.

mplayer-mt -ao alsa -ac hwdts, -ac hwac3, -af channels=6,lavcac3enc=1:640:3 6ch_aac.mp4

I have put those config options to .mplayer/config file:
Code:
# Device and passthrough
#=====================
ao=alsa:device=hw=0.1
#For both AC-3 and DTS passthroug, use -afm hwac3
afm=hwac3,
channels=6
#lavcac3enc[=tospdif[:bitrate[:minchn]]]
af=scaletempo,lavcac3enc=1:640:3
So I just need to use following command:

mplayer-mt movie_name.avi/mkv/mp4

Test videos:

6ch aac test video: http://dl.dropbox.com/u/26249587/6ch_aac.mp4
6ch ac3 test video: http://dl.dropbox.com/u/26249587/6ch_ac3.avi

I tried to remap those channels but I always lost one channel (Surround Left).
mplayer-mt -ac hwdts,hwac3, -channels 6 -af channels=6:6:0:0:1:2:4:1:3:4:5:3:2:2,lavcac3enc=1:640 6ch_aac.mp4

Now I don’t know hove to solve this problem. I hope someone of you have some tips for me because it worked that way in Debian Lenny and I don't know why those channels are now mapped to the wrong speakers. Also I only have one 6ch AAC test video and I want to be sure that it contains those channels in right order. Can someone test it? If someone have some other AAC surround test files, please, let me know.

-josk

Last edited by josk; 1st May 2011 at 16:54.
josk is offline   Reply With Quote