Playing MPEG-2 transport streams from a file

Feature requests for VLC.
gnu_andrew
New Cone
New Cone
Posts: 2
Joined: 06 Feb 2005 02:15

Playing MPEG-2 transport streams from a file

Postby gnu_andrew » 06 Feb 2005 02:18

At present, VLC (0.8.1 on Debian GNU/Linux) will happily play DVB from my card (although it can be a pain to manually associate video/audio/subtitles). However, if I try to load in a file containing the same data (three PIDs, one for video, one for audio, one for subtitles, saved from the DVB frontend), VLC doesn't pick up any data about the stream. The same stream plays fine with both mplayer and xine, and can be re-multiplexed to PS format, so it is not a fault with the stream. Unfortunately, none of these solutions pick up the DVB subtitles, for which I have only seen support in VLC. It would be great if I could watch recorded movies with subtitles using VLC.

Sigmund
Big Cone-huna
Big Cone-huna
Posts: 893
Joined: 26 Nov 2003 09:38

Postby Sigmund » 06 Feb 2005 08:40

It is a fault in the stream. A spec compliant mpeg2 transport stream contain at least a few more pids than you mentioned. These are reffered to as PAT and PMT, at least.

These contain information about the other pids, which one belong together etc, and one could argue that mplayer and xine is buggy to not use these. One could also argue that having fallback solutions for broken streams like this would be a nice addition to vlc, and it is probably not more than moderatly difficult, but no one has cared to implement it yet.

So I'd recommend that you rather fix your recording tool to generate a compliant result, by for instance using vlc.

gnu_andrew
New Cone
New Cone
Posts: 2
Joined: 06 Feb 2005 02:15

Different Parsings of Transport Streams

Postby gnu_andrew » 06 Feb 2005 12:31

It seems that VLC handles transport streams very differently to other applications (and, AFAICS, in a more complete way). Both mplayer and xine rely on a channels.conf file when reading from DVB (which does this mapping of channel names to PIDs), and, when reading MPEG-2 TS files, it just uses the first pair of video and audio PIDs. mplayer also seems to pick up the SUB stream from the recorded TS, and parse it, but not display it!

Cache fill: 0.00% (0 bytes) TS file format detected.
DEMUX OPEN, AUDIO_ID: -1, VIDEO_ID: -1, SUBTITLE_ID: -1,
PROBING UP TO 2000000, PROG: 0
VIDEO MPEG2(pid=2819)...AUDIO MPA(pid=2820) SUB DVB(pid=2821) PROGRAM N. 0

In contrast, VLC does the whole job itself, and handles the PSI tables using libdvbpsi. I need to have a closer look at the code to determine what PIDs need to be added (ETSI EN 300 468 specifies the four MPEG-2-defined ones, PAT, CAT, PMT, TSDT, and four mandatory DVB ones, NIT, SDT, EIT, TDT). As I'm recording using a tool I hacked together myself, it isn't a problem to add whatever is needed. However, it would also be nice if VLC could handle the hundreds of gigabytes of stuff I already have which does work fine with xine and mplayer (as you say, by a similar fallback method to using the first video, audio and subtitle pid).

fervlv

Tables in MPEG-TS

Postby fervlv » 12 Jul 2005 18:16

The table that should be included is the NIT (and with the possibility of
inserting descriptors depending on the channel used for its transmission, for example by config files).
PAT, PMT and NIT are normally mandatory for a MPEG2-TS.
SDT is normally present in DVB flows but it is less important.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 10 guests