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 18th September 2017, 08:11   #1  |  Link
defunkt
defkunt
 
defunkt's Avatar
 
Join Date: Dec 2004
Location: New Zealand
Posts: 58
Seeking Workflow/Tools for AAC Transcode

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!
defunkt is offline   Reply With Quote
Old 18th September 2017, 09:14   #2  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,301
Given that you have extracted the 6 channel AAC-LC audio stream you could use an audio encoding application such as LameXP to directly re-encode to a 2 channel HE-AAC stream...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 18th September 2017, 09:51   #3  |  Link
defunkt
defkunt
 
defunkt's Avatar
 
Join Date: Dec 2004
Location: New Zealand
Posts: 58
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?
defunkt is offline   Reply With Quote
Old 18th September 2017, 13:21   #4  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,383
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.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 19th September 2017, 09:53   #5  |  Link
defunkt
defkunt
 
defunkt's Avatar
 
Join Date: Dec 2004
Location: New Zealand
Posts: 58
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.

Last edited by defunkt; 19th September 2017 at 09:55.
defunkt is offline   Reply With Quote
Old 19th September 2017, 10:22   #6  |  Link
stax76
staxrip & mpv.net
 
Join Date: Jun 2002
Posts: 5,248
@defunkt

MediaInfo can show you all kind of delays, search here:

https://pastebin.com/imKNnxXC

The one relevant for you is Video_Delay.
__________________
I have a dream by Martin Luther King
one hundred years later...
We can never be satisfied...
With this faith...
Let freedom ring...
stax76 is offline   Reply With Quote
Old 19th September 2017, 12:07   #7  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,383
Quote:
Originally Posted by defunkt View Post
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:

Quote:
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.

Quote:
If BeHappy doesn't meet my needs
See the attached image:

Quote:
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.
Attached Images
 
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.

Last edited by tebasuna51; 19th September 2017 at 12:11.
tebasuna51 is offline   Reply With Quote
Reply

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 06:38.


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