pipelka / vdr-plugin-xvdr

DISCONTINUED - XVDR Plugin for VDR
GNU General Public License v2.0
43 stars 22 forks source link

Possible problem parsing the bitstream for audio format LATM/HE-AAC. #81

Closed terrafox-zz closed 11 years ago

terrafox-zz commented 11 years ago

I have done a fairly recent build of OpenElec(r12604) and VDR-addon from source.

When running Live TV (dvb-t) using xvdr there is video and subtitles but there is no audio. When using tvheadend addon there is audio. This made me start browsing around in the source code. I live in a country where the audio format on broadcasts is AAC-HE. Running mediainfo on a .ts revording gives:

Format : AAC Format/Info : Advanced Audio Codec Format profile : HE-AAC / LC Muxing mode : LATM

AFAIK this format is used for dvb-t broadcasts in Norway, Denmark and New Zealand.

I found that the parsing of the bitstream in demuxer_LATM.c (ReadAudioSpecificConfig) does not seem to be compliant with the ISO spec (http://jaadec.sourceforge.net/specs/ISO_14496-3_Audio-1_Overview.pdf)

There is some pseudocode in chapter 1.6.2 (table 1.13) that illustrates the parsing process.

I have also looked at the tvheadend source code: parser_latm.c (read_audio_specific_config) and this implementation seems to be more in compliance with the ISO spec. I have not examined this code in detail, but at least there is sound when using tvheadend. (https://github.com/tvheadend/tvheadend/blob/master/src/parser_latm.c) I have also found a link to an old tvheadend issue that adresses this. http://www.lonelycoder.com/redmine/issues/858

Could this be the root of my missing audio problem ?

Please comment.

pipelka commented 11 years ago

Sorry for my late reply. I'm currently in the process of checking / rewriting the audio parsers ;-)

Please check if the "demuxer" branch fixes your problem. It works with my LATM sample stream. If you can also confirm that it's working I'll rewrite this one for my new parser infrastructure.

terrafox-zz commented 11 years ago

Thanks. I will try it early next week and report back.

terrafox-zz commented 11 years ago

I'm happy to confirm that audio worked fine on Live TV with the demuxer branch pulled 2 days ago. Great! The bad news is that I have lost subtitles. They worked fine with the latest master branch.

There are lots of error messages in XBMC.log: ERROR: Decode - avcodec_decode_subtitle returned failure

pipelka commented 11 years ago

Great. The subtitle regression is a known issue. I'm working on this.