DTS support in DVB?

Feature requests for VLC.
tameruk
New Cone
New Cone
Posts: 6
Joined: 30 Jun 2004 18:44

DTS support in DVB?

Postby tameruk » 30 Jun 2004 19:12

I am interested in using VLC as a client to receive a multicast from DVBViewer.

The multicast Transport Stream includes a DTS audio bitstream (16bit/48k PCM indentified as a stream_id of type private_stream_1 (0xBD))

I know that the latest versions of the player now support DTS via DVD playback, but would it be possible to include support for DTS in DVB?

I have uploaded a test stream to for you to look at if anyone is interested - It is probably not 100% (some of the SI tables may not be totally correct, and the video and audio are slightly out of sync) but it would be great if any of you guys could tell me a way of extracting the bitstream for output to SPDIF using VLC

Thanks
Rob
Last edited by tameruk on 02 Jul 2004 01:26, edited 1 time in total.

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 01 Jul 2004 08:52

I added support for DTS in DVB in the development version (both demuxing and muxing).
But apparently, your sample isn't valid as TS packets (for the DTS elementary stream) with the unit_start flag set don't begin a new PES.

Would you have a real sample dumped from satellite feed ?

tameruk
New Cone
New Cone
Posts: 6
Joined: 30 Jun 2004 18:44

Postby tameruk » 01 Jul 2004 13:20

Hi Gibalou, thanks for your reply - i have a sample from the Sirius broadcast, but unfortunately it's only like 1.2 seconds long.

I have uploaded it to the incoming directory anyway - srtest.mpg (6.26MB)

If you are in the footprint of the Sirius 2 Nordic Beam you should be able to pick it up on 11747 V, 27500 FEC 3/4, SID=200, VPID=201, MPEG AUDIO=204, DTS AUDIO=202

Unfortunately i can't record this myself because i am out of the footprint area!

Thanks
Rob

p.s. just checked the payload_unit_start_indicator on the original stream i sent you and it seems ok to me? First 3 bytes of the Transport Packet header are 0x47 41 00 (for packets which contain the start of the PES) and 0x47 01 00 (for all other packets containing a DTS PES on PID 256, 0x100)

tameruk
New Cone
New Cone
Posts: 6
Joined: 30 Jun 2004 18:44

Postby tameruk » 01 Jul 2004 16:45

Hi, i found a longer (23 seconds) recording from the Sirius broadcast - uploading now for you:

srtest_23seconds.mpg (114MB)

If you look at the Elementary Stream Descriptors in the PMT for "Program 00200 [PID200 (0xC8)] NSAB DTS Audio" you will find a stream type 6 (PES Private Data) on PID 202 which contains a registration_descriptor (tag 0x5), DTS_audio_stream_descriptor (tag 0x73) and ISO_639_language_descriptor (tag 0xa)

Once you've extracted the ES, you just need to put each DTS frame (signalled by a syncword 0x7f fe 80 01) into an SPDIF frame and send it to the digital audio output buffer (in windoze it needs to be marked as Wave format tag 0x0092 to avoid gain adjustments by the OS!)

The SPDIF frame size is determined in the registration_descriptor, by the format_identifier - which is either DTS1, DTS2 or DTS3 (0x44545331, 0x44545332 or 0x44545333) indicating 512, 1024 or 2048 samples to contain each DTS frame

There may be a couple of minor inaccuracies in the DTS_audio_stream_descriptor (tag 0x73), but these will not affect playback in any way (bitrate_code and samplerate_code are incorrect). I should also point out that the current transmission on Sirius does NOT have these errors, afaik!

I have demuxed the DTS elementary stream from this file and uploaded it for you to compare - srtest_23seconds_PID202.cpt

Let me know if there's anything i can do to help?!

Thanks
Rob

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 02 Jul 2004 13:01

Hmmm, you srtest files are all corrupted. I can't even play them.
Have a look for yourself: http://download.videolan.org/pub/videolan/streams/DTS/

Guest

Postby Guest » 15 Jul 2004 16:50

Hi,

Sorry for the delayed response - i've finally managed to get some time to play with this again!

>Hmmm, you srtest files are all corrupted. I can't even play them.

The "srtest_23seconds.mpg" file is a multiple program mux. Try using TSReader to stream the program (Program PID 200) to VLC and it should work ok. I can get the test card and MPEG II audio through on VLC if i set it up to receive from TSReader on http://127.0.0.1:1234 as described here

I kind of gave up using DVBViewer to multicast, mainly due to a lack of options, and i'm now looking at using TSReader and VLC together as a multicast solution. It's possible to achieve DTS "pass-through" using TSReader if you manually add a stream type 0x81 (AC3) with the PID number of the DTS PES.

TSReader streams fine to VLC over http (proof: if i "dump raw input" to file using VLC, i can extract the DTS bitstream from the file by de-packetising the ES from PES stream type 129 (User Private)). U can then pad the bitstream into SPDIF friendly frames (using a cpt-wav converter) and play into your a/v receiver.

Unfortunately i cannot stream the "raw" input from VLC without losing the Private Data Stream and without PID numbers being changed.

My question therefore is - can i "dump raw input" (like the file option in the stream output dialogue) to UDP packets using sout?

Or is it maybe possible to add "Stream Type: 0x06 ISO/IEC 13818-1 (PES packets containing private data)" to the MPEG TS Encapsulation on VLC?

Cheers,
Rob[/quote]

tameruk
New Cone
New Cone
Posts: 6
Joined: 30 Jun 2004 18:44

Postby tameruk » 15 Jul 2004 16:55

Ooops, forgot to login before my last post :lol:

Just for your information, for playback of DVB streams on VLC without using TSReader, i can play the ANTZ file directly (MPEG audio and video out only, obviously) however there is a message which complains about the PID containing the DTS bitstream:
ts_dvbpsi debug: new PID 0x100 stream type 0x6
ts_dvbpsi warning: unknown codec/type for Private PES stream
Here is the full message info, fyi:
access_file error: cannot open file E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg (Permission denied)
main error: no suitable access module for `/://E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg'
main debug: adding playlist item `E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg' ( E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg )
main debug: creating new input thread
main: playlist item `E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg'
main debug: waiting for thread completion
main warning: drive letter E: found in source string
main debug: access `', demux `', name `E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg'
main debug: looking for access module
main debug: probing 7 candidates
main debug: thread 3136 (input) created at priority 1 (src/input/input.c:326)
dvdplay debug: plugin discarded (not a valid source)
dvdread warning: dvdread module discarded (not a valid source)
vcd debug: trying .cue file: E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.cue
vcd warning: could not open E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg
cdda debug: trying .cue file: E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.cue
cdda warning: could not open E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg
access_file debug: opening file `E:\ANTZ_1536KBPS_16b48k_DTS_MPEG_1580.mpg'
main debug: using access module "access_file"
main debug: looking for demux module
main debug: probing 7 candidates
dshow warning: dshow plugin discarded (not a valid stream)
dshow warning: dshow plugin discarded (not a valid stream)
main debug: looking for mpeg-system module
main debug: probing 1 candidate
main debug: using mpeg-system module "mpeg_system"
main debug: using demux module "ts_dvbpsi"
main debug: looking for a subtitle file in E:\
main debug: found a possible subtitle: VLC_messages.txt
ts_dvbpsi debug: processing PAT version 0
ts_dvbpsi debug: new program: 1
ts_dvbpsi debug: processing PMT for program 1 version 0
ts_dvbpsi debug: new PID 0x134 stream type 0x2
ts_dvbpsi debug: new PID 0x100 stream type 0x6
ts_dvbpsi warning: unknown codec/type for Private PES stream
ts_dvbpsi debug: new PID 0xfe stream type 0x4
main debug: ES 20 has unknown type
main debug: selecting video ES 134
main debug: selecting ES 0x134
main debug: looking for decoder module
main debug: probing 22 candidates
main debug: using decoder module "libmpeg2"
main debug: thread 3180 (decoder) created at priority 0 (src/input/input_dec.c:161)
main debug: ES 100 has unknown type
main debug: selecting audio ES fe
main debug: selecting ES 0xfe
main debug: looking for decoder module
main debug: probing 22 candidates
main debug: using decoder module "mpeg_audio"
main debug: thread 3204 (decoder) created at priority 2 (src/input/input_dec.c:161)
mpeg_audio: MPGA channels:2 samplerate:48000 bitrate:192
main debug: no aout present, spawning one
main debug: looking for audio output module
main debug: probing 4 candidates
aout_directx debug: OpenAudio
libmpeg2 debug: 720x544, aspect 576000, 25.000 fps
main debug: no usable vout present, spawning one
main debug: looking for video output module
main debug: probing 5 candidates
vout_directx debug: creating DirectXEventThread
main debug: waiting for thread completion
vout_directx debug: DirectXCreateWindow
vout_directx debug: Created video sub-window
main debug: thread 3384 (DirectX Events Thread) created at priority 0 (directx.c:233)
vout_directx debug: DirectXEventThread running
vout_directx debug: DirectXInitDDraw
vout_directx debug: directx-device:
vout_directx debug: DirectXEnumCallback: Primary Display Driver, display
vout_directx debug: screen dimensions (0x0,1280x1024)
vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1
vout_directx debug: align_boundary_src=0,0 align_boundary_dest=1,1 align_size_src=0,0 align_size_dest=0,0
vout_directx debug: End DirectXInitDDraw
vout_directx debug: DirectXCreateDisplay
vout_directx debug: DirectXCreateClipper
main debug: using video output module "vout_directx"
main debug: looking for text renderer module
main debug: probing 3 candidates
freetype debug: Using fontsize: 34
main debug: using text renderer module "freetype"
vout_directx debug: NewPictureVec overlay:yes chroma:YV12
vout_directx debug: YUV overlay created successfully
vout_directx debug: End NewPictureVec (succeeded)
main debug: got 1 direct buffer(s)
main debug: picture in 720x544, chroma 0x30323449 (I420), aspect ratio 4:3
main debug: picture out 720x544, chroma 0x32315659 (YV12), aspect ratio 4:3
main debug: direct render, mapping render pictures 0-6 to system pictures 1-7
main debug: waiting for thread completion
main debug: thread 3448 (video output) created at priority 1 (src/video_output/video_output.c:472)
main warning: backward_pts != current_pts (101467)
main debug: stream periodicity changed from B[1] to B[2]
main debug: stream periodicity changed from P[5] to P[4]
main warning: late picture skipped (58728)
main warning: late picture skipped (245140)
main warning: late picture skipped (125166)
main warning: late picture skipped (6112)
aout_directx debug: device supports 2 channels
aout_directx debug: device supports 1 channel
aout_directx debug: creating DirectSoundThread
main debug: thread 3796 (DirectSound Notification Thread) created at priority 15 (directx.c:357)
aout_directx debug: DirectSoundThread ready
main debug: using audio output module "aout_directx"
main debug: output 's16l' 48000 Hz Stereo frame=1 samples/4 bytes
main debug: mixer 's16l' 48000 Hz Stereo frame=1 samples/4 bytes
main debug: filter(s) 'fl32'->'s16l' 48000 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module
main debug: probing 22 candidates
main debug: using audio filter module "float32tos16"
main debug: found a filter for the whole conversion
main debug: looking for audio mixer module
main debug: probing 3 candidates
main debug: using audio mixer module "trivial_mixer"
main debug: input 'mpga' 48000 Hz Stereo frame=1152 samples/1161 bytes
main debug: channel mixer 'fl32'->'fl32' 48000 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module
main debug: probing 1 candidate
main warning: no audio filter module matching "a52tofloat32" could be loaded
main error: cannot add user channel mixer a52tofloat32
main debug: filter(s) 'mpga'->'fl32' 48000 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module
main debug: probing 22 candidates
main debug: using audio filter module "mpgatofixed32"
main debug: found a filter for the whole conversion
main debug: filter(s) 'fl32'->'fl32' 52800 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module
main debug: probing 22 candidates
main debug: using audio filter module "bandlimited_resampler"
main debug: found a filter for the whole conversion
main warning: PTS is out of range (942420), dropping buffer
main warning: PTS is out of range (918481), dropping buffer
main warning: PTS is out of range (894524), dropping buffer
main warning: PTS is out of range (870566), dropping buffer
main warning: PTS is out of range (846610), dropping buffer
main warning: PTS is out of range (822652), dropping buffer
main warning: PTS is out of range (798695), dropping buffer
main warning: PTS is out of range (774738), dropping buffer
main warning: PTS is out of range (750781), dropping buffer
main warning: PTS is out of range (726823), dropping buffer
main warning: PTS is out of range (702866), dropping buffer
main warning: PTS is out of range (678909), dropping buffer
main warning: PTS is out of range (654951), dropping buffer
main warning: PTS is out of range (630994), dropping buffer
main warning: PTS is out of range (607036), dropping buffer
main warning: PTS is out of range (583079), dropping buffer
main warning: PTS is out of range (559121), dropping buffer
main warning: PTS is out of range (535163), dropping buffer
main warning: PTS is out of range (511206), dropping buffer
main warning: PTS is out of range (487248), dropping buffer
main warning: PTS is out of range (463291), dropping buffer
main warning: PTS is out of range (439333), dropping buffer
Cheers,
Rob

Gibalou
Big Cone-huna
Big Cone-huna
Posts: 608
Joined: 26 Nov 2003 10:59

Postby Gibalou » 19 Jul 2004 17:26

I tried TSReader and indeed found out that it had no problems handling the "srtest" files. The reason for this is that these transport streams use a Reed-Solomon (204,188) error correction so the TS packet size isn't the 188 bytes expected by VLC.
I just implemented support for these types of transport streams and now VLC plays them perfectly. The DTS audio track does play fine as well.

As for the ANTZ sample file, the elementary stream for the DTS audio track is very likely corrupted because its PES packets don't start with a PES header (the other elementary streams are fine though).

tameruk
New Cone
New Cone
Posts: 6
Joined: 30 Jun 2004 18:44

Postby tameruk » 19 Jul 2004 19:20

That's great news!

Not sure what you mean about the PES packets not having a header, here is what i demux from the TS:

ftp.videolan.org/incoming/ANTZ_1536KBPS_16b48k_MPEG_DTS_1580pid256.pes (53.8MB)

If you ignore the first 24 bytes of the file, it seems ok to me?


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 7 guests