Jump to content

Missing AC3 stream


Recommended Posts

Encountered a strannge problem with missing AC3 audio stream:

The channels have 2 audio streams (AC3 5.1 and MPA 2.0), but after a scan using TransEdit, the AC3 streams are missing, only MPA recognized.

However, if I manually edit the channel list in DVBViewer, i.e. duplicate the channel then change the audio PID and codec ("my dirty fix"), it could be recognized and playback & record without any problem.


Suspect it could be the broadcaster's fault - these "buggy" AC3 streams shown as "Private PES" in TransEdit before recording; after "my dirty fix" they show as AC3 in TransEdit but cannot be recognized by VideoRedo or TSDoctor. TMPGEnc seems to be the only software can correct these streams.

Initially I thought it was the same as this issue, but seems not the case. The plugin or fixer did not help. I checked the PES start code - it's the correct 00 00 01 BD, not sure what's wrong this time.

Here's a transponder dump using TE, and a sample of recorded file (using Media Server) after "my dirty fix" to the channel list.


Question - is there a way to

1. recognized the AC3 audio during scan?

2. fix the ts file "real time" when recording?

3. fix the recorded ts files?


Thanks very much in advance!


Link to post

The problem is caused by insufficient service information (SI) data, or more specifically, the PMT (Program Map Table, read more about it here). A private PES with stream type 0x06 can contain different things, e.g. AC3 audio or teletext or DVB subtitles... so the PMT must specify what's inside, usually by adding a descriptor, as the following example shows:




In your case there is no indication at all for AC3, so the only way to detect the content is looking for typical byte patterns in the elementary stream, like 0B 77, which may be the start of an AC3 audio frame. This requires an unscrambled stream, of course... eventually it comes down to "good guessing", based on a quite sophisticated analysis. DVBViewer is able to do it when reading a TS file, and also the TransEdit Analyzer in a more limited way. That's why the recorded (unscrambled) stream appears as AC3 in the PID list of the Analyzer, though there is no AC3 indication in the PMT.


However, a scanner only reads the SI tables, so it can't know... unfortunately there is no easy way to add the missing information on the fly. Maybe parsing the PMT and changing stream type 0x06 (Private PES) to 0x81 (ATSC stream type for AC3) in certain cases would do the trick, but after that the PMT checksum (CRC32) would be wrong and had to be recalculated - quite a lot of hassle without guarantee for success.



Link to post

Thank you for the swift reply, Griga!


In this case... maybe it would be too troublesome asking for a fix regarding this particular issue. But could I get your help to check that whether the elementary streams (i.e. those AC3 PIDs) are in good order?


On the other hand, I'm still interested in trying to fix the PMT (probably offline) - is there any information / instruction on how to find and edit the stream type identifiers, as well as calculating & editing PMT CRC? Would like to study and maybe write a small tool fixing it.


Thanks again for the help.

Link to post
1 hour ago, allanlee said:

is there any information / instruction on how to find and edit the stream type identifiers, as well as calculating & editing PMT CRC?


ISO/IEC 13818-1


A PDF with 150 pages containing technical specifications for experts, particularly the transport stream format basics. But it's not free. You need to pay for it, except if you can find it in some dark web corner... if you are not familiar with it, it will take several weeks to dig through it, understand it and find what you need for your purpose.


Concerning the stream type 0x06 -> 0x81 patch: Of course an ATSC stream type should not be used in a DVB transport stream. However, since some broadcasters in the DVB sphere simply adopt US streams including the SI without adjusting it, your software may be able to handle it. At least stream type 0x81 unambiguously indicates AC3 in the ATSC sphere.


For trying we need something that is already close to doing what we want. Otherwise it will be too costly. The DVBViewer/DMS recorder engine must adjust the PAT and PMT to the recorded content anyway, so that could be the point to intervene. However, I wouldn't like to include such a "very--special-purpose-patch-that-may-work" in the DVBViewer or DMS. There are already too many of them.


Maybe it can be done in TSPlayer (see download area -> tools section). Do you already know it? It is able to perform simple cutting and conversion tasks by re-recording TS files with the DVBViewer recording engine.


Link to post
38 minutes ago, Griga said:

However, I wouldn't like to include such a "very--special-purpose-patch-that-may-work" in the DVBViewer or DMS. There are already too many of them.


Totally agree, these bad broadcasting habits are not DVBViewer's fault.


Initially I was thinking it might be the problem of a few bits somewhere - similar to the wrong AC3 header - that a plugin like PatchAC3StartCode.dll could help.  However it seems that this issue is much more complicated.


I tried TSPlayer - it does recognize the buggy AC3 stream but the re-recorded ts file still have the problematic PMT.


My final goal is to trim and cut the recordings with frame-accurate "smart encoding" software, e.g. VideoRedo, SmartCutter, etc. and get them playing in Kodi/VLC/iPad etc (currently none of them could recognize the AC3 stream).


What in my mind now is to write a small tool like BBCFixer to patch the PMT, not sure whether it's feasible or too costly... 


Link to post
7 minutes ago, allanlee said:

I tried TSPlayer - it does recognize the buggy AC3 stream but the re-recorded ts file still have the problematic PMT.


The additional conversion had to be implemented yet. Check your PMs...

Link to post
3 minutes ago, Griga said:


The additional conversion had to be implemented yet. 


It works! Many thanks! :thumbsup:

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • Sebastian Arzt
      By Sebastian Arzt
      plötzlich (wahrscheinlich nach einem Windows 7 Update Anfang August 2017)  gibt DVBViewer keinen Ton mehr auf HD-Sendern wieder. Der Ton bei SD-Sendern und Radio funktioniert dagegen. Als AC3 Audio Decoder wird der LAV Audio Decoder und als Audio Renderer der Default Direct Sound Device verwendet. Andere Kombinationen haben auch nicht funktioniert. Die Wiedergabe von aufgenommenen Dateien funktioniert ebenfalls ohne Probleme. Die eingesetzte Version ist DVBViewer Pro V6.0.3. Hat jemand ähnliche Erfahrungen gemacht und kann mir weiterhelfen? Meine DVB-C Hardware ist TerraTec H7.
      Vielen Dank für Hinweise!

    • mahmood
      By mahmood
      I use DVBViewer for vew chanal with dvb card.
      My card is prof 7301.
      a channal in yahsat 52.5 with name "toosheh"
      when we record this channal via other receiver we can decode this file with a program and get some file like music or...
      but with DVBViewer recording file is very small and don't work.
      for more information visit
      please help me how can record this channel via dvb vewer.
    • jascdvb
      By jascdvb
      ist es möglich dem DVBViewer dazu zu bringen immer den 5.1 Stream zu nehmen, wenn einer verfügbar ist oder muss ich das händisch über die Channellist / Editor erledigen und die jeweiligen "Unterprogramme" in der Kanalliste auswählen? Ich möchte nicht immer händisch umschalten müssen...
      Danke und Grüße
    • feuse8
      By feuse8
      Hallo Leute,
      meine Ausgangssituation ist die, dass ich eine Sonos Playbar besitze und gerne ein 5.1 Setup daraus machen möchte. Leider unterstütz die Playbar kein DTS (kaum zu glauben!). Dolby Digital Spuren werden perfekt als 5.1 ausgegeben, bei DTS bleibt die Playbar stumm. Kennt jemand eine Möglichkeit, wie ich DTS Spuren zu einem Dolby Digital Signal machen kann? Quasi on the fly - soll auch für Blu-Rays funktionieren. Geht das irgendwie mit dem AC3 Filter? Da bekomm ich irgendwie nur Stereo Sound hin...
      Wäre super, wenn mir da jemand weiterhelfen könnte!
  • Create New...