[MPlayer-dvb] Recording Transport Stream (TS) with Teletext data

Dave Chapman dave at dchapman.com
Mon Apr 18 15:23:25 CEST 2005


Rahul Shukla wrote:
> Dear Dave, Thanks for pointing out DVBSTREAM tool. I will check it
> and see if it solves. Are you also aware of some software which can
> convert the whole Transport stream into Program stream which can be
> further authored into DVD. 

There are various ways to do that, but I don't think a perfect solution
exists if you want to keep synchronised subtitles.

My solution to that only works if you don't need to cut commercials out
of your recording.  My approach is based on the fact that transport
streams consist of 188 byte packets - so if you take a valid transport
stream and cut it on 188 byte boundaries, you will then generate another
valid transport stream.

I use the "dd" command with the "bs=188" option to trim the start and
end of a recording.  In order to find the start point, I do something like:

dd if=recording.ts bs=188 skip=100000 count=20000 of=a.ts
mplayer a.ts

and then adjust "skip" until I get the correct starting point.  This is
in practice a lot easier (and quicker) than it sounds.

I then use either Project X or PVAStrumento (under Wine) to demux the
transport stream to a set of synchronised elementary video/audio
streams.  I then use "mplex" from the mjpegtools project to multiplex
them together.

Because ProjectX and PVAStrumento will always drop the first and last
incomplete "GOP" from the stream (a GOP is typically about half a
second), then you don't have to be very accurate with the "dd" parameters.

I then use my dvbsubs tools to extract the subtitles and convert them
into bitmaps, followed by "spumux" from dvdauthor to multiplex the
subtitles into the program stream generated by mplex.

Finally, I use dvdauthor to author a DVD.

This is not a very elegant method, but it does work reliably.

> Another point is that I am interested in
> DVB-Teletext (VBI) storage and I guess DVB-subtitles are subset of
> DVB-VBI standard, so I hope dvbtools/dvbstream can address that issue
> without any problem. Thanks again Rahul

There are two types of DVB subtitles - "real" DVB subtitles, which are
broadcast as bitmaps, and "teletext" subtitles, which as you have
guessed, are just a subset of the old VBI teletext standard.

In my dvbtools, you will also find an old program called "dvbtext" -
this decodes teletext packets encapsulated in a DVB transport stream.
It shares some code with Ralph Metzler's "vbidecode" program which you
may have used in the past if decoding subtitles from a BTTV analogue TV
card.

You should also look at my "dvbtune" - especially the "-i" option which
is useful for identifying subtitle PIDs and languages, and various other
information about a DVB transport stream.

Dave.




More information about the MPlayer-dvb mailing list