Jump to content

No sound on TS files with MP3 Audio


Freedom Factory

Recommended Posts

Hi! For the last few months, I've been taking part in the UHD 4K tests held in Spain by TVE and Canal+. I've been supervising the reception of the 4K signals on different equipment and setups, including one of my own old-but-goody PCs. I've used DVBViewer to record the streams and transponder dumps, and TSplayer to play them back. Everything was working surprisingly smooth in this PC... until yesterday.

 

Suddenly, after a crash, the files started playing without audio on both the DVBViewer and TSplayer. The live streams also played mute. All other programs (VLC and such) still play the files perfectly. I've updated the main DVB apps, the DVB source filter, the codecs... to no avail. I must note that the audio in this tests has been encoded on MPEG-1 Layer III, and sometimes both the Viewer and the Player had trouble identifying the correct bitrate, but the sound was good nevertheless.

 

Now, the DVB source filter shows the audio PIN as "connected" to the right PID but can't decypher the type, bitrate...

 

d9fm.jpg

 

 

 

The MediaInfo details of one of the problematic files are:

General
ID                                       : 1 (0x1)
File size                                : 13,0GIB
Duration                                 : 33min.
Overall bit rate mode                    : Variable
Overall bit rate                         : 56,1Mbps

Video
 ID                                       : 512 (0x200)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 3 frames
Codec ID                                 : 27
Duration                                 : 33mn 16s
Bit rate                                 : 53.0 Mbps
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.255
Stream size                              : 12.3 GiB (94%)

Audio
ID                                       : 528 (0x210)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Mode                                     : Joint stereo
Mode extension                           : MS Stereo
Codec ID                                 : 3
Duration                                 : 33mn 16s
Bit rate mode                            : Constant
Bit rate                                 : 320 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : -296ms
Stream size                              : 76.2 MiB (1%)

I honestly don't know what to do next. Please advise.

support.zip

Edited by Freedom Factory
Link to comment

The DVBViewer Filter (as splitter / demultiplexer) does not support MP3 in a TS, no matter if live or file playback.

 

I'll come back to it later. Just when I started posting here, a heavy thunderstorm came up, it got dark like the night, and we had a water penetration in our cellar >_<, so there are other things to do now...

Link to comment

Thanks for your swift replies, guys... and I'm sorry to read about your troubles, Griga. You say streams with MP3 aud (2'09€)io won't work. The thing is... they WERE working before yesterday's crash. I've seen (and heard) those clips/recordings/channels a million times with both DVBViewer and TSplayer!

 

Derrick I know there might be a little codec build-up. As I said, this PC is used for testing the performance of apps/streams/formats on older/lower-spec equipment. I seem to recall doing a bit of spring cleaning not so long ago ;-) What codecs are interfering/redundant, according to your experience? Bear in mind that a handful other programs are used for video editing/encoding in this machine. And I already had the .mp3 "assigned" to the source filter:

 

ne7j.jpg

Edited by Freedom Factory
Link to comment
The thing is... they WERE working before yesterday's crash.

 

Sorry, not possible with the DVBViewer Filter. As far as it concerns MPEG Audio in transport and program streams, It is restricted to version 1 layer 2, which is the commonly (almost always) used type in the DVB sphere. There are reasons for this restriction. Detecting MPEG audio headers (containing samplerate, bitrate, layer information etc.) at a random position is a kind of gamble. Audio data can easily be mistaken for headers. One measure against this error is to make the distinction as sharp as possible. That's why the DVBViewer Filter does not accept MPEG Audio embedded in a TS with a different version or layer (particularly layer 1 and 3).

 

I have two TS samples here, one containing MPEG-1 Layer 1, the other one MPEG-1 Layer 3. Both don't play with the DVBViewer Filter 3.7.1.

 

However, there is a chance to make it work, if the Data Alignment Indicator is set in the PES headers of the audio stream. It indicates that the audio header is located at a certain position, so the DVBViewer Filter (hopefully) doesn't have to search for it. Finding "wrong" headers can't happen in this case, provided the broadcaster is using the Data Alignment Indicator correctly.

 

I could provide a DVBViewer Filter 3.7.2 that accepts all MPEG audio versions and layers under the condition given above. The MPEG-1 Layer 1 sample is already playing quite happily here, but my only Layer 3 sample (originating from ffmpeg transcoding) still doesn't, because the Data Alignment Indicator is not set.

 

Maybe it would be good to examine the stream first. Can you upload a TS sample only containing your audio stream plus PAT and PMT somewhere?

Link to comment

 

Maybe it would be good to examine the stream first. Can you upload a TS sample only containing your audio stream plus PAT and PMT somewhere?

..not necessary. I forgot that I've raised the same question about 3 months ago and uploaded a file to an internal FTP -> Hispasat 1C1D1E @ 30° W 10809 H 03-12 14-49-12.ts.

 

Still the same situation. No support from the DVBViewer filter. Though you can play the file with sound in DVBViewer if another splitter is selected (e.g. LAV)

 

 

Link to comment

Well, there you go some sample files (I hope I processed them fine):

 

20130309_TVE4K_DVBVforum.ts
http://ge.tt/api/1/files/5WNiDvj/0/blob?download

20130512_TVE4K_DVBVforum.ts
http://ge.tt/api/1/files/47Rz5vj/1/blob?download

20130613_C+4K_DVBVforum.ts
http://ge.tt/api/1/files/47Rz5vj/2/blob?download

 

And... you may not believe me, but it's true:
the original files WERE working OK previously both in DVBViewer and TSplayer!

Edited by Freedom Factory
Link to comment

Thanks for the samples. All of them contain MP3, and none of them can be played here with TSPlayer / DVBViewer and DVBViewer Filter 3.7.1.

 

Though the audio frames are properly aligned with the PES packet boundaries (each packet contains exactly one MP3 frame), the Data Alignement Indicator is not set in the PES header. As a result the files even can't be played with my modified DVBViewer Filter version (see above).

 

If desperately needed, I could provide a special DVBViewer Filter version that generally accepts all types of MPEG Audio. However, I don't want to offer it as public download because it may cause trouble elsewhere. MP3 in a TS is very uncommon anyway...

 

And... you may not believe me, but it's true:
the original files WERE working OK previously both in DVBViewer and TSplayer!

 

Maybe you should call a parapsychologist... :iiam:

Link to comment

Please, Griga, I'd like to have that customized filter, it really would make my life easier.

 

I guess my "mistery" had to do with my "messy codec" setup. Something in there was making those files playable inside DVBV & TSP.

I've come to that conclusion after removing most of the codecs/splitters/filters of the system and re-installing some of them one-by-one. I haven't been able to make my files playable again, but I've seen how DVBV's behaviour changed along the process (with the LAV splitter installed and merited, for example, the DVBV would freeze with my files). I think maybe some old version of a Media Splitter (Haali's?) was enabling the MP3 TS playback, but it got corrupted on that fatal crash.

 

One thing is for sure:

"If your codec ain't broke, don't fix (update) it."

For one, I've been forced to revert to ffdshow's revision 3370 (from 2010) since the last versions were giving my trouble (blank screen, laggy playback,...).

Link to comment
I'd like to have that customized filter

 

Ok, I'll upload it later as soon as I find some time... it's already working fine but it needs some additional tests. I think an official 3.7.2 beta release allowing to enable all types of MPEG audio (regardless of the alignment) by a hidden tweak will be the best solution.

Link to comment

Here we go:

 

http://www.DVBViewer.tv/forum/topic/13944-DVBViewer-filter-37/?p=389603

 

After having installed PushSource.ax 3.7.2, here is what you have to do if the Data Alignement Indicator is not set in the PES header:

 

1) Open the DVBViewer Configuration Folder (see Help Menu in DVBViewer)

 

2) Close DVBViewer / TSPlayer and open the file DVBSource.ini from the configuration folder with a text editor.

 

3) If the file is empty, add the line

 

[Params]

 

thus creating a [Params] section.

 

4) Add the line

 

AllMPEGAudio=1

 

to the [Params] section in order to enable support for all MPEG Audio types regardless of the alignment.

5) Save the changed file, launch DVBViewer or TSPlayer. TS with MP3 content should be played now with the DVBViewer Filter, live and from file.

Link to comment
The source filter runs havoc and finally crashes..

 

Why the source filter? Such a video stream may cause other components to crash.

 

The live playback simulation with the (pure audio) TS samples in TransEdit runs fine.

Link to comment

..sorry for the late reply. I was busy with something else :)

 

The reason was not the filter but a dvb-s2 card which had a high intermittend error rate (dunno yet why). With another card live playback was smooth including mp3 sound and without errors :D

Link to comment

On my system, the modified filter works and doesn't crash, but the sound is jerky. I'm starting to think I shoudn't have messed with my "messy codecs", Derrick! By the way, may I ask which codecs are you using?

Also, Derrick, Griga Which codec pack would you recommed to avoid issues? I'm thinking of wiping the DirectShow filter library of that PC and then installing a streamlined, trustworthy package (adding the proffesional DS filters —IMX, Avid, ProRes and the like— needed for that test machine after that).

Link to comment
Which codec pack would you recommed to avoid issues?

 

No codec pack. Would you invite a whole zoo to your house? If you want freeware, I would install LAV Filters, ffdshow and AC3 Filter.

 

I'm thinking of wiping the DirectShow filter library of that PC

 

Why? You can select the decoders that shall be used in DVBViewer -> Options -> DirectX and TSPlayer -> DirectShow. Please note that in this very case DVBViewer and TSPlayer will use the audio decoder selected for MP2, even if the content is MP3. So the decoder should be able to decode MP2 and MP3 (which is true for LAV, ffdshow and AC3 Filter).The MP3 decoder selection only applies to .mp3 files.

Link to comment

I've noticed a strange phenomena concerning the mp3 filter. When I select either LAV or AC-3 for mp3, which according to @Griga only applies to .mp3 files it takes a couple of seconds before live playback becomes stable. Usually the source filter shows on average about 3-5 "Graph too late". If I select a mysterious "MP3 Decoder DMO" (can't find it ;) ) the response is much better -> no "Graph too late".

In the actually used filter list (-> view -> filter) you'll find LAV as audio decoder.

 

Any explanation?

Link to comment

Thanks, Griga, for your assistance... and for confirming my aversion to the packs. I usually prefer to install each codec separately, but a couple of bundles have been tested and removed through the years on this machine.

I thought of a DirectShow filter wipe because tempering with that "messy" setup (in my quest for a solution to this sudden DVBV issue) yielded undesirable effects in other multimedia apps. Anyway, I rolled back the system, searched for broken codecs, checked every filter installed, uninstalled a few and updated a couple of them and now everything is working OK again.

 

Regarding DVBv/TSp, I saw that one of my choice audio codecs, Elecard's, was corrupted along some of the media splitters... That combo, I reckon, was enabling the playback of those nonstandard streams on my system. Well, I fixed Elecard's codecs, removed the conflicting splitters and... there I go, smooth playback again! I'm a happy camper.

 

For developer's reference Now, the combo that works best on my PC is DVBsource 3.7.2 + FFdshow video + Elecard Audio Decoder. The Intervideo/Hauppauge audio decoder also does well. Of course, FFdshow audio, AC3 Filter and LAV video+audio work too, albeit with a higher CPU usage and some audio jitter.


Your "strange phenomena", Derrick, is consistent with my late findings regarding DVBV and the DirectShow system: although the program supposedly overrides DS with its choice of filters/renderers, it somehow still relies on the DS system config (particularly on the media splitters side). For example, I've found that if you choose a certain codec and it can't connect to the right PIN (or it isn't able to render the stream properly), DVBV reverts hiddenly to the next codec/filter/splitter following the DS merit list. On that note, I had to disable LAV Media Splitter because it would slow down or even freeze the Viewer.

My only remaining (minor) quirk is somehow I've lost the OSD with the VMR7 renderer, which also was working OK until this whole ordeal.
Anyway, I can live without it... or with VMR9.

Again, thank you very much Griga and Derrick for your support and attention. Appreciated.

Link to comment
I've noticed a strange phenomena concerning the mp3 filter.

 

Indeed :blink: Is Options -> DirectX -> DVBViewer Filter -> TV/Radio Pre-Format-Detection -> Audio ticked? This is the only thing I can think of that may cause such an interdependency since it changes the media type on the DVBViewer Filter's output pin.

 

mysterious "MP3 Decoder DMO"

 

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375474%28v=vs.85%29.aspx

 

DMO is a different (Non-DirectShow) codec system. However, some DMOs are made available for DirectShow by a DMO Wrapper Filter.

Link to comment
But it seems to help

 

That's interesting. Since DVBViewer has no idea which MPEG Audio type is broadcasted, it will configure the DVBViewer Filter's audio output pin for MEDIASUBTYPE_MPEG2_AUDIO and default format settings in an MPEG1WAVEFORMAT structure with fwHeadLayer = ACM_MPEG_LAYER2 (which is wrong in this case), hoping that the decoder will quickly find out the correct params and layer by itself.

 

However, if Options -> DirectX -> DVBViewer Filter -> TV/Radio Pre-Format-Detection -> Audio is ticked, DVBViewer Filter 3.7.2 sets the correct format and layer on its output pin before the audio decoder connects. If it is already connected, the DVBViewer Filter breaks the connection and reconnects. This may have influence, of course.

 

But I don't understand how the MP3 decoder selection can interfere, because it's a completely different branch For .mp3 files (containing pure MP3 elementary streams) DVBViewer and DVBViewer Filter are using MEDIASUBTYPE_MPEGLAYER3 (implicitly indicating layer 3) and a simple WAVEFORMATEX structure, which is more common for MP3 than MPEG1WAVEFORMAT.

Link to comment

Maybe you should call a parapsychologist... :iiam:

:D

 

I discovered it by accident, because I thought that the mp3 checkbox of the audio settings was also relevant for live playback ;)

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...