AVIDemux wrongly patches AC3 header for HDTV recordings

Bug #1418200 reported by HolgerB
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
avidemux (Ubuntu)
New
Undecided
Unassigned

Bug Description

AVIDemux (both older 2.5.X and even the latest 2.6.X) fail to tag AC3 audio tracks correctly if they have mixed audio channels (2.0 versus 5.1).

Usually I do a lot recording from HDTV by either using my Xubuntu box plus VDR or a standard satellite STB.

My HDTV recordings consist of multiple TS segments which I simply merge via binary copy. Then I edit out unwanted part at the I-frames using AVIDemux. The resulting file is save in MKV format with the main AC3 audio track. This has always worked fine beside the issue that the AC3 track of the resulting file was always tagged as AC3 2.0 although the movie was reported with AC3 5.1. I did some research on the TS segments with avconv.

So the issue to me boils down to this:
AVIDemux opens a TS file with a mixed format AC3 audio stream in it. Usually the beginning of the recording and the end are AC3 in 2 channel but the movie in the middle is AC3 in 6 channel.
So when you start editing the movie by either opening the binary merged TS files or simply opening up the first TS segment and letting AVIDemux merge the other sequential files in append
mode. After cutting the overlapping part in the beginning and the end, the resulting file visible in AVIDemux has 5.1 AC3 audio but AVIDemux still shows AC3 2.0.

I guess as a result of this AVIDemux "corrects" the AC3 headers for the target file to AC3 2.0.

The resulting video plays back fine in stereo mode but you are unable to use the 5.1 audio which is available.

I've have uploaded two TS samples from HDTV to show the issue.

This is a TS sample with AC3 2.0 (10 MB):
https://www.dropbox.com/s/ou812u4us2jwxsj/TS_Sample_AC3_2chan.ts?dl=0

This is a TS sample with AC3 5.1 (10 MB):
https://www.dropbox.com/s/j7gemzufmdiay2u/TS_Sample_AC3_6chan.ts?dl=0

This is a TS sample where the above files are merged in AVIDemux via append (20 MB):
https://www.dropbox.com/s/4titdp97fjx7t2f/TS_Sample_AC3_merged.ts?dl=0

So when you now open up the merged TS file (last link) the AC3 channels reported are 2.0 although the last segment has 5.1. When you then jump to the I-frame where the part of the movie start,
delete the first segment with AC3 2.0 audio and save the resulting part which in reality has 5.1 audio, the resulting TS file gets flagged as AC3 2.0.

Funny enough for SDTV streams (MPEG2 video with AC3 audio) the detection of changing AC3 format (2.0 versus 5.1) works perfectly and the resulting edited video shows AC3 5.1.

Let me know if you need more informations on this.

Best regards,
Holger

Revision history for this message
holger beetz (holger-beetz) wrote :

Update:
This issue seems to be limited to the MKV muxer of AVIDemux 2.6.8. When I edit a HDTV recording in TS or M2TS format and export it to MPEG TS as output format AC3 is tagged correctly with 6 channels.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.