IPB

Welcome Guest ( Log In | Register )

.MKV video with 6-channel AC3 audio downmix to Stereo AAC, Best way to downmix 6-channel AC3 to Stereo AAC
Rameyuk
post Oct 26 2011, 13:38
Post #1





Group: Members
Posts: 4
Joined: 26-October 11
Member No.: 94707



Hello, I've been trying to search the forum but having AC3 and AAC as my primary keyword, the forum search engine won't let me due to the character limitations. So I hope this hasn't been asked yet. If it is, may I ask a link to where I could direct myself to the right thread? Also I hope I'm asking in the right category too.

So here it is. I have 350 separate .MKV files which are separate "scenes" of a single film project. Each of these MKV files have 3 tracks. Video, Audio, and subtitle. Now I tried to use MKVtoolnix to append all these files together but it wasn't possible due to the audio tracks of some of the mkv files are of different format. So here's the breakdown of the audio file differences out of those 350 files.

20 files are 6-channel AC3 @ 384 kbps
20 files are stereo AC3 @ 384 kbps
310 files are stereo AAC @ 192 kbps.

Now, Video and subtitle doesn't seem to have any problems, but MKVtoolnix only pointed out the audio error only. So This is what I'm assuming would be the best way to do it.

1. Demux the 40 mkv file to separate the audio from the video (also the subtitles too).
2. Downmix the first 20 files into Stereo AC3.
3. Convert the 40 files into AAC. (keeping the stereo).
4. reencode the bitrate into 192 kbps.
5. Remux the audio with the video (with subtitles too).
6. Append all the remaining files together.

Do I get those steps correctly? Or is there any way that I can make the steps simpler and more efficient in terms of minimalizing quality loss? Maybe there are some steps that I can do simultaneously... As they say, single process is better than 2 separate processes since it has risks of losing some of the quality in separate processes. Or perhaps I got all the steps wrong and there's a right way to do it?

On the other hand, what tool can I use to achieve all that work in the most efficient and effective way? I don't mind command line since I tested out with eac3to myself at first, but I still don't know if the steps I want to do are the correct one. A GUI probably better for me. I also don't mind buying some commercial decoders/encoders myself too if I have to.

Any thoughts?
Thanks smile.gif
Go to the top of the page
+Quote Post
 
Start new topic
Replies
alexeysp
post Oct 27 2011, 10:22
Post #2





Group: Members
Posts: 132
Joined: 3-April 09
Member No.: 68627



QUOTE (Rameyuk @ Oct 26 2011, 15:38) *
Do I get those steps correctly?


You got i right, except that the steps 2 and 3 are better be merged into a single process (you don't need to transcode twice).

All these operations can be performed with freely available tools (I assume you're on Windows). You will need mkvextract (part of mkvtoolnix, you probably alredy have it), foobar2000 with ac3 input plugin and Channel Mixer plugin, and Nero AAC encoder (note though that EULA for the latter only permits non-commercial use).

Extract the ac3 tracks and add them to foobar2000 playlist. Select all, right-click and choose "Convert". In the converter setup set AAC as output format (adjust the AAC encoder settings to 192 kbps), and in the "Processing" settings add "Channel Mixer" to the DSP filters list. In the Channel Mixer setup set number of output channels to 2. Click "Convert" when everything is set. Foobar2000 will need a command-line AAC encoder to do the job, it will ask you for neroAacEnc.exe location.

Use mkvmerge to multiplex and join the resulting files.
Go to the top of the page
+Quote Post
Rameyuk
post Oct 29 2011, 15:01
Post #3





Group: Members
Posts: 4
Joined: 26-October 11
Member No.: 94707



Thanks for the tips.. It worked wonderfully. And easy too.
But I just hit another roadblock. After trying to join all the files together.
Turns out that the last 91 mkv files has been encoded differently again... *sigh* It's still the same AAC and 48kHz, but somehow there's a difference in the audio profile. Below is the specs that I got for the first 241 files with Media Player Classic for the Audio (I used ABR 192kbps):

CODE
Format            : AAC
Format/Info       : Advanced Audio Codec
Format profile    : LC
Codec ID          : A_AAC
Channel(s)        : 2 channels
Channel positions : Front: L R
Sampling rate     : 48.0 KHz


And below is what I got for the last 91 files:

CODE
Format            : AAC
Format/Info       : Advanced Audio Codec
Format profile    : HE-AAC / LC
Codec ID          : A_AAC
Channel(s)        : 2 channels
Channel positions : Front: L R
Sampling rate     : 48.0 KHz / 24.0 KHz


Now the one at the top I can join easily. But I won't be able to join it with the last 91 files since the audio format is somewhat different since it's HE-AAC encoded. The foobar tool that you suggested was successful in encoding the audio into the format at the top. But it won't be able to encode with the format I specify at the bottom.

My plan is to join the first 241 files. Then demultiplex the audio, convert it to have the exact same format as the last 91 files. Remultiplex it.. Then join the videos again, is that correct? However, I still don't know what tools that I can use to encode it exactly the same format as the second one. Or is there a better way?

I'm trying on using Winamp's transcoder function. Hopefully it works.

Thanks again smile.gif

This post has been edited by Rameyuk: Oct 29 2011, 15:17
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2014 - 03:18