After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703913 - tsdemux: LPCM audio track not detected
tsdemux: LPCM audio track not detected
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-10 04:44 UTC by Shiva Kumar
Modified: 2018-11-03 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample test case (750.00 KB, application/octet-stream)
2013-07-10 09:11 UTC, Shiva Kumar
  Details
tsdemux: Support 0x83 stream_type (1.52 KB, patch)
2013-07-10 11:47 UTC, Edward Hervey
none Details | Review

Description Shiva Kumar 2013-07-10 04:44:49 UTC
Summary:

 * Bad: LPCM audio is ignored in tsdemux plugin.

Description:

   Overview:
I am trying to play a mpeg ts file with h264 video and lcpm audio in it. But "mpegtsdemux" is ignoring the audio and source pad is created only for video. I added logs in "mpegtsdemux and tsdemux" and printed stream_id and stream_type for the same. It is stream_id=0xbd and stream_type=0x83.  

I saw in the tsdemux and mpegtsdemux source code that stream_type=0x83 is mapped to ST_BD_AUDIO_AC3_TRUE_HD and is not handled. But vlc is recognizing it as DVD lpcm audio. 


I used "dvbsnoop" ubuntu utility to analyze the stream. Below is what it says about audio section.(for one of the ts packets)

Sync-Byte 0x47: 71 (0x47)
Transport_error_indicator: 0 (0x00)  [= packet ok]
Payload_unit_start_indicator: 1 (0x01)  [= Packet data starts]
transport_priority: 0 (0x00)
PID: 68 (0x0044)  [= ]
transport_scrambling_control: 0 (0x00)  [= No scrambling of TS packet payload]
adaptation_field_control: 1 (0x01)  [= no adaptation_field, payload only]
continuity_counter: 0 (0x00)  [= (sequence ok)]
Payload: (len: 184)
     ==> PES-stream: 189 (0xbd)  [= private_stream_1] 

But "mpegtsdemux and tsdemux" src pad claims the it can candle "audio/x-private-ts-lpcm" and "audio/x-lpcm".


  SRC template: 'audio_%04x'
    Availability: Sometimes
    Capabilities:
      audio/mpeg
            mpegversion: 1
      audio/mpeg
            mpegversion: 4
          stream-format: adts
      audio/x-lpcm
                  width: { 16, 20, 24 }
                   rate: { 48000, 96000 }
               channels: [ 1, 8 ]
          dynamic_range: [ 0, 255 ]
               emphasis: { false, true }
                   mute: { false, true }
      audio/x-ac3
      audio/x-eac3
      audio/x-dts
      audio/x-private-ts-lpcm

I am using 0.10.22.3 version of gstreamer bad plugings but the issue is seen in 1.x also.

Steps to Reproduce:

Actual Results: 

  Only video pad is created and audio is ignored.

Expected Results:
  
  It should handle both audio(LPCM) and video as src pad capability says.

Platform:

  On ubuntu 12.04
Comment 1 Edward Hervey 2013-07-10 06:01:26 UTC
Hi, could you provide a sample file ?

I still am having a hard time finding any "official" specifications/documents concerning those "legacy" stream_type.
Comment 2 Shiva Kumar 2013-07-10 07:17:18 UTC
Sample file I am using is of huge size 90Mb to attached here. Is there a ftp kind of thing you are using. If so please provide me details. I will upload it there.
Comment 3 Edward Hervey 2013-07-10 07:34:40 UTC
Googling for "free upload service" on the internet should give you plenty of sites where you can upload the file. Then provide the link to it here.
Comment 4 Tim-Philipp Müller 2013-07-10 08:57:05 UTC
The first few kB might be enough to reproduce the problem:

  head --bytes=750k foo.ts  > head.ts

then attach head.ts to this bug report (but a full file would better)
Comment 5 Shiva Kumar 2013-07-10 09:11:04 UTC
Created attachment 248810 [details]
sample test case

Sample test case to reproduce the issue.
Comment 6 Shiva Kumar 2013-07-10 09:14:28 UTC
Thats exactly what I was trying to do.

I have attached first 750Kb of my sample file here.

and I have truncated first 5Mb of sample file and uploaded in wikisend

which you can download using following link

http://wikisend.com/download/289624/test.ts

Note: Time to live is 7 days
Comment 7 Edward Hervey 2013-07-10 11:13:27 UTC
So I have a fix to expose stream_type 0x83 ... but I have no idea which of the following types it is:

audio/x-lpcm
audio/x-private1-lpcm
audio/x-private-ts-lpcm
Comment 8 Edward Hervey 2013-07-10 11:47:02 UTC
Created attachment 248828 [details] [review]
tsdemux: Support 0x83 stream_type

It seems to be legacy DVD LPCM ... but needs further checks
Comment 9 Shiva Kumar 2013-07-10 12:36:09 UTC
Have you verified you fix with "dvdlpcmdec"
Comment 10 Baby octopus 2013-09-19 06:00:21 UTC
Hi,

I'm going through this. I do not think dvdlpcmdec will decode LPCM in a TS. The header seems to be different as per http://stnsoft.com/DVD/ass-hdr.html compared to what it should be in TS

Edward,

Have got hold of SMPTE doc which which explains AES3 data in TS. It's at http://hackipedia.org/File%20formats/Codecs/audio/AES/S302m-2002%20-%20Mapping%20of%20AES3%20Data%20into%20an%20MPEG-2%20Transport%20Stream.pdf

Regards,
Jagadish
Comment 11 Baby octopus 2013-09-19 06:01:21 UTC
And according to this, it says the stream_type should be 6(Private data) and LPCM detection should happen through registration descriptor(just like in case of AC3)
Comment 12 Edward Hervey 2018-05-05 10:17:49 UTC
Can you provide a patch properly detecting this case (with the BSSD descriptor) ?
Comment 13 GStreamer system administrator 2018-11-03 13:16:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/100.