News:

--

Main Menu

Audio 0 tracks in DVB-T2 transport stream file

Started by arimak, December 15, 2020, 01:09:03 PM

Previous topic - Next topic

arimak

Hi,
the newest nightly build:
Avidemux_2.7.7 VC++ 64bits 201213.exe      Dec 13 2020 1:03 PM

still can't see Audio tracks correctly. It says 0 tracks. So after Cut there is no audio too.

It's DVB-T2 transport stream file. Media Player Classic says there are these streams:
Video: HEVC 1920x1080 50fps [V: hevc main L4.1, yuv420p, 1920x1080]
Audio: AAC(LATM) 48000Hz stereo [A: Czech [cze] (aac (latm) lc, 48000 Hz, stereo)]
Audio: AAC(LATM) 48000Hz mono [A: Czech [cze] (aac (latm) lc, 48000 Hz, mono) [visual impaired,secondary]]
Subtitle: DVB Subtitles [S: Czech [cze] (dvbsub) [hearing impaired]]
Subtitle: UTF-8 [S: No subtitles]

and plays it with audio correctly of course...

for testing you can download it here:
ct3-halabalasou.ts



eumagga0x2a

Thank you for the sample. Avidemux fails to extract AAC extradata (decoder configuration, necessary to decode the AAC audio stream) from the LATM envelope for both audio tracks present in the MPEG-TS stream. Will try to find out why.



eumagga0x2a

Quote from: arimak on December 16, 2020, 11:22:25 AMWhen can we see the changes at http://www.avidemux.org/nightly/vsWin64/ ?

It is up to the author and project maintainer of Avidemux, I have no direct influence. MinGW builds are easier to generate, so you might see the win64 directory being more up to date more often.

arimak

I tried avidemux_2.7.7 r201217_win64.exe version...
It is better now, it sees audio tracks correctly.

But after cutting longer .ts (HEVC+AAC(LATM)) file (from the same DVB-T2 channel as testing .ts I sent before) there is something bad with audio/video...

Cut video is after a few minutes (5minutes or so) muted in VLC player - video is playing ok, or in Media Player Classic after same time it's like stopped...

I guess there is still something bad with HEVC and AAC combination..

I'll send two samples tomorrow, source .ts and .ts after cut...

eumagga0x2a

Does it mean that Avidemux playes the cut video with audio past the point where VLC stops audio playback?

In general, if the properties of an AAC audio stream change on the fly, the audio after the change won't be decodable when saved because Avidemux removes the LATM envelope and passes raw AAC stream to muxer (the new extradata is dropped).

The samples will tell...

arimak

Here are the samples:
ct3-flveksource.ts
ct3-flvekcut.ts

It is like the same issue, only different times.
I made a cut in time cca 0:37.8 to 8:13.5 of the source .ts

and the bad time starts about 4:05 of the Cut .ts

Tested with VLC and MPC again..
for more info, I use K-Lite Codec Pack Mega, version 15.9.0

eumagga0x2a

Thank you for the samples, I'll try to look into them ASAP.

eumagga0x2a

The source MPEG-TS file contains corrupted data at multiple locations. One of such locations happens to be within the first two bytes of the header of a LATM frame, resulting in a failure to extract the payload – a raw AAC packet. For Avidemux, if a demuxer fails to provide an audio packet, this is equivalent to the end of track.

In the cut, audio timestamps are reset to zero at the point where audio playback stops. I'm not sure how this happened.

arimak

Do you think, are these data corrupted by bad reception - low signal quality,
or purposely by broadcast system to prevent subsequent cutting or so?

eumagga0x2a

No conspiracy here, all elementary streams in the sample are full of errors. A typical case of poor reception IMHO.

I've pushed a changeset to the git repository which should allow Avidemux to deal with a few damaged LATM frames in the stream. When it encounters a bad LATM frame, the MPEG-TS demuxer will discard the cached data, fetch up to 40 subsequent PES packets and try to continue.

Please be aware that this approach doesn't scale. A combination of small PES packets and sufficiently high number of subsequent damaged frames will still result in audio track ending prematurally due to failure to extract a raw AAC frame.

With the patch, Avidemux can play or save the entire stereo track of the source video with minor dropouts, but fails at the mono track (I would need to increase the number of retries over 50 to allow it to break through the streak of bad data).

arimak

Could be poor reception...
What was good for DVB-T isn't good for DVB-T2 now, I guess..

eumagga0x2a

Not necessarily. It may be also a problem in the distribution chain, in this case captures by two different DVB-T2 receivers with different antennas would exhibit a high share of identical errors.

arimak

I tried to cut (pure Video Copy, Audio Copy, TS muxer) another stream .ts with HEVC and 4 audio tracks (2x stereo AAC, 1x stereo AC3, 1x mono AAC)... with similar issue like before...

But.. when I selected only that 1 stereo AC3 track for cutting, playing the cut is suddenly all OK..

There is still something bad with cutting HEVC+AAC combination.

Tested with new avidemux_2.7.7 r210104_win64
Playing on MPC, VLC..