View Full Version : AAC LATM/LOAS Audio Streams
SeeMoreDigital
24th August 2008, 15:09
I'm interested to understand what the fundamental differences are between good 'ol fashioned AAC-LC/HE audio streams and these new fangled AAC LATM/LOAS audio streams, that can be found in european broadcasts.
Can anybody oblige?
neuron2
24th August 2008, 18:25
There are two extra levels of multiplexing in the stream:
"The MPEG-4 HE AAC or HE AAC v2 elementary stream data shall be first encapsulated in the LATM multiplex format according to ISO/IEC 14496-3 [17]. The AudioMuxElement() multiplex element format shall be used.
The LATM formatted MPEG-4 HE AAC or HE AAC v2 elementary stream data shall be encapsulated in the LOAS transmission format according to ISO/IEC 14496-3 [17]. The AudioSyncStream() version shall be used. AudioSyncStream() adds a sync word to the audio stream to allow for synchronization.
Semantics: The semantics of the AudioMuxElement() and AudioSyncStream() formatting are described in ISO/IEC 14496-3 [17].
Encoding: The MPEG-4 HE AAC and HE AAC v2 elementary streams shall be formatted with AudioMuxElement() LATM multiplex format, and AudioSyncStream() LOAS transmission format."
Somebody needs to make some open source LATM/LOAS demultiplexing code. :) I'm too busy on other things right now.
madshi
24th August 2008, 20:52
these new fangled AAC LATM/LOAS audio streams, that can be found in european broadcasts.
Is there a chance you could upload such a sample?
neuron2
24th August 2008, 21:33
H.264 + AAC LATM/LOAS:
http://neuron2.net/misc/One News AAC_.edit.ts
madshi
24th August 2008, 23:11
H.264 + AAC LATM/LOAS:
http://neuron2.net/misc/One News AAC_.edit.ts
Thanks, that's helpful!
neuron2
24th August 2008, 23:13
I've got more if you need them.
madshi
25th August 2008, 08:42
I've got more if you need them.
Not sure yet. I've had a quick look into the specification and there seem to be 3 different types of LATM/LOAS. I've identified the type that your sample has. But I'm not sure if all samples have the same type. So I'd say: If all your samples are from the same broadcaster I think I don't need more right now. But if you have samples from different broadcasters, that would be helpful, cause there'd be a chance that they differ in some ways.
Anyway, I'll add support for demuxing these audio tracks to eac3to. But it may take a while...
Thanks!
SeeMoreDigital
25th August 2008, 11:38
This is all sounding (no pun intended) very positive :). I'll see what samples I can get hold of too.
I wonder how many broadcasters have elected to use AAC LATM/LOAS audio. Given that AAC audio bit-steams can't be decoded by surround sound amplifiers, its use seems an odd choice :eek:
madshi
25th August 2008, 11:56
FWIW, some Japan broadcasters use AAC, too, but they use ADTS instead of LATM/LOAS.
CiNcH
4th September 2008, 10:32
Somebody needs to make some open source LATM/LOAS demultiplexing code.
Delphi: http://www.dvbviewer.info/forum/index.php?showtopic=23347
C++: http://blog.monogram.sk/janos/2008/01/03/monogram-aac-decoder-v0900/
charley
16th October 2008, 03:47
New Zealand uses HE-AAC in it's freeview digital terrestrial broadcast's. Currently there's no directshow splitter/demuxer that supports it fully. The Cyberlink Demux (PDVD8) Filter can split the H.264 video and HE-AAC Audio and be played back successfully in graphedit but if you save the graph and relaod it the video decoder pin cant be reconnected the Cyberlink Demux (PDVD8) Filter. Graphedit just crashes if you try too.
lchiu7
29th October 2008, 00:47
Delphi: http://www.dvbviewer.info/forum/index.php?showtopic=23347
C++: http://blog.monogram.sk/janos/2008/01/03/monogram-aac-decoder-v0900/
Would those code samples be good enough to build a DS filter to decoding the audio? If so many folks in our part of the world would be pretty happy since we could process it all using avisynth.
So far all I have been able to do is demux the audio using dgavcindex, play the AAC file in Winamp to produce a wav file and use besweet to encode the wav file as AC-3. It works but not exactly automatic
neuron2
29th October 2008, 00:50
Sure, it's not rocket science. But someone with the skills has to be motivated.
lchiu7
29th October 2008, 01:51
I would do it in a heartbeat but the learning curve for me would be too steep I think, my last programming having been some dabbling in C++. I don't think it's the programming - it's understanding the formats of the data needed to be decoded and I guess, the way to write DS filters. I guess will just have to wait for the motivated person to do it!
neuron2
29th October 2008, 01:57
Don't sell yourself short. The format specification is readily available and quite clear. And there are good books on DirectShow programming. It's all a matter of how bad you want it. I don't have any need for it, so it's hard to get motivated.
lchiu7
29th October 2008, 10:13
Don't sell yourself short. The format specification is readily available and quite clear. And there are good books on DirectShow programming. It's all a matter of how bad you want it. I don't have any need for it, so it's hard to get motivated.
Well I still think the learning curve is non trivial. As for motivation, I think there might be a few folks who live in territories with this kind of broadcast standard who might find suitable ways to get you motivated.:)
[edit]
Actually on reflection we don't need a DS filter for decoding the AAC files since that exists already. What we need is a DS filter for splitting the audio from ts file. Currently the Haali filter only does AC3 and doesn't appear to handle the AAC audio. When that splitter is done we ought to be able to get a graph that has the splitter feeding the AAC decoder, feeding a program that could reencode the file to more friendly format.
poisondeathray
6th November 2008, 23:27
Mplayer is now able to play the AAC LATM/LOAS Audio now directly from .ts; I'm testing using SMPlayer 0.6.4 SVN r2102
It reports the demuxer as: mpegts - MPEG-TS demuxer
the video decoder: FFMpeg h.264
the audio decoder: libfaad2
I don't know enough as to how this could work in graphedit/graphstudio or if there is a corresponding directshow splitter /decoder, but perhaps a dump could be used through ffmpeg ?
I briefly tried FFMpegSource and FFMpegSource2 but couldn't get either to work, hopefully someone more saavy can use this to figure something out?
lchiu7
6th November 2008, 23:56
Mplayer is now able to play the AAC LATM/LOAS Audio now directly from .ts; I'm testing using SMPlayer 0.6.4 SVN r2102
It reports the demuxer as: mpegts - MPEG-TS demuxer
the video decoder: FFMpeg h.264
the audio decoder: libfaad2
I don't know enough as to how this could work in graphedit/graphstudio or if there is a corresponding directshow splitter /decoder, but perhaps a dump could be used through ffmpeg ?
I briefly tried FFMpegSource and FFMpegSource2 but couldn't get either to work, hopefully someone more saavy can use this to figure something out?
I briefly tried out smplayer (latest SVN) but couldn't get it to run since it wanted mingwm10.dll and I have no idea what that is or where to get it (safely).
Assuming you got smplayer to play the streams, we would need a way to capture those streams as perhaps wav files? That would solve the problems. If an AAC audio stream can be extracted from the ts files, then the rest is easier since the AAC audio can be played with winamp to get wav. That is why I used dgavcindex to demux the file but as noted in the other stream, it is failing on some streams I have captured.
There is also a DS filter for decoding the AAC files Monogram DS filter but needs a splitter to feed it and the most common open source filter for ts files (Haali) doesn't understand AAC-HE streams, yet.
clsid
6th November 2008, 23:57
Here is a DirectShow filter:
http://blog.monogram.sk/janos/2008/04/20/monogram-aac-decoder-0950/
poisondeathray
7th November 2008, 00:32
Thx clsid, I'll test it out, but I can't find a splitter that works to feed it.
Ichui7 - The build of SMplayer I'm using is from Lord_MuldeR's homepage
http://mulder.dummwiedeutsch.de/home
lchiu7
7th November 2008, 01:37
Thx clsid, I'll test it out, but I can't find a splitter that works to feed it.
Ichui7 - The build of SMplayer I'm using is from Lord_MuldeR's homepage
http://mulder.dummwiedeutsch.de/home
Not sure there is an open source splitter out there. Folks have taken the code and incorporated into shareware/freeware products like wbpvr and mediaportal. I see Haali notes it's something to do but there is no timeframe.
Tried that smplayer build - crashed on the first ts files I passed it (Vista SP1) but will do some more testing later
Larry
poisondeathray
7th November 2008, 04:14
Yes I'm on XP 32-bit....
Anyways I did some more testing with directshow filters and I got certain types of LATM/LOAS AAC to work with GraphStudio/GraphEdit
File Source (Async) => Elecard MPEG Demultiplexer => Monogram AAC Decoder
The Monogram AAC decoder was from clsid's link. Another option is Mainconcept AAC Decoder, but the Monogram one has more options for channel mixing and seems to be nicer (and free). ffdshow with libfaad2 enabled for AAC seemed to work, but in my setup there were extra filters automatically "shoved" in like WindowsDMO decoder and this caused the audio quality to deteriorate. They respawned even when deleting them, so you would probably have to unregister them if you wanted to go that route.
The Elecard Demultiplexer isn't free the one you want is the WMP streaming plugin. I'm still playing around with some other splitters and source filters, but none seem to work. If there is a port of the Mplayer filter I mentioned earlier, it should work on some types of LATM/LOAS AAC in .ts
The only types of LATM/LAOS that work with this setup are those with PID of 400, 640
The ones that do NOT work with this filter setup are those with PID of 302, 321
I don't have any more "types" to test, but I think there maybe at least 2 more kinds.
EDIT: BTW you can confirm the PID in mediainfo (view=>text), and also in the filter graph (if it works).
lchiu7
7th November 2008, 05:06
It's all very messy. If dgavcindex can demux the AAC audio, then I can just play the aac file in Winamp to output a wav file from which it can be converted to anything.
The problem appears to be the parsing routine in dgavcindex which DG has noted in that thread. He needs to rewrite it. So without a way of demuxing the audio, nothing else works.
I have heard anecdotally that the splitter in PowerDirector8 works but haven't hard time to try that.
A couple of open source/freeware PVR software use the Monogram filter gbpvr and I think mediaportal
lchiu7
7th November 2008, 09:27
If you download the trial version of PowerDirector it has a splitter that can handle AAC-HE streams and also a DS filter to play them. So it's possible to construct a graph that renders both the audio and video. The problem is, the audio comes out the speaker :(. What we need is another filter that can take the output from the Cyberlink PDVD8 splitter and have it output a wav file. I can't see how to do that.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.