View Full Version : Seeking Workflow/Tools for AAC Transcode
defunkt
18th September 2017, 08:11
Hello video enthusiasts. Wondering if somebody can help fast-track me into a workflow/toolset to extract LC-AAC 5.1 Audio from an MKV, downmix this to Dolby ProLogic II stereo, then re-encode as HE-AAC to be re-muxed with the original video.
It's been a while. Back in the (DVD Backup) day I'd use DGIndex to demux a vob, indicating any delay in the filenames, then use HeadAC3he to do the delay cut and DPL downmix. Finally I'd encode with Apple's AAC encoder.
I'd still like to use Apple's encoder (via qaac) but I'm scratching my head a little on up-to-date methods to;
- Extract the 5.1 AAC (from MKV) while correctly handling any start offset defined in the container.
- Downmix the extracted multi-channel audio to a DPL II stereo wav ready for encoding.
If you can help, or just indicate some tools I should be looking at, I'd be most grateful.
Thanks!
SeeMoreDigital
18th September 2017, 09:14
Given that you have extracted the 6 channel AAC-LC audio stream you could use an audio encoding application such as LameXP (https://forum.doom9.org/showthread.php?t=157726&highlight=lamexp) to directly re-encode to a 2 channel HE-AAC stream...
defunkt
18th September 2017, 09:51
Hi. Actually I haven't yet settled on a method to extract the AAC. Obviously simple to use mkvextract to write the stream but I'm wary of just assuming that the track doesn't have a start offset. I gather this is unusual in Matroska but still possible?
tebasuna51
18th September 2017, 13:21
You can use eac3to to extract the AAC from MKV, if there are any initial delay is compensated by eac3to adding silent audio frames.
Even with Nero 7 + plugins instaled you can decode the AAC track, compensate delay, downmix to DPL II and recode to AAC with qaac with a unique command line like (if AAC 5.1 is track 2 for instance):
eac3to input.mkv 2: stdout.wav -downDpl | qaac -v 80 --he --adts --no-delay -o output.aac -
You can use also BeHappy (AviSynth needed)
I think than LameXP don't support downmix to Dolby ProLogic II, only plain stereo.
defunkt
19th September 2017, 09:53
Thank you (both) for taking the time to reply.
While I have Nero 7 I unfortunately don't have the plug-in required for AAC decoding. I have however discovered that mkvextract timecodes_v2 will apparently give me the track start offset. If BeHappy doesn't meet my needs I'll try to roll a solution using FAAD or Nero's command line decoder then muxing the transcoded stream back into the container with the same offset.
Thanks again.
stax76
19th September 2017, 10:22
@defunkt
MediaInfo can show you all kind of delays, search here:
https://pastebin.com/imKNnxXC
The one relevant for you is Video_Delay.
tebasuna51
19th September 2017, 12:07
I have however discovered that mkvextract timecodes_v2 will apparently give me the track start offset.
Of course, this is the method than use eac3to when show:
command line: "D:\Programa\eac3to\eac3to.exe" "D:\Temp\t\test_dts_aac+100.mkv"
------------------------------------------------------------------------------
MKV, 1 video track, 2 audio tracks, 1 subtitle track, 0:00:22, 25p
1: h264/AVC, English, 720p25
2: DTS, English, 5.1 channels, 755kbps, 48kHz
3: AAC, Spanish, 5.1 channels, 48kHz, 100ms
4: Subtitle (SRT), Spanish
Or use MediaInfo like stax76 say.
If BeHappy doesn't meet my needs
See the attached image:
I'll try to roll a solution using FAAD or Nero's command line decoder then muxing the transcoded stream back into the container with the same offset.
FAAD introduce a delay when decode, better LWLibavAudioSource.
NeroAacDec need a input .m4a, then need a extra step to mux aac in mp4 container.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.