Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Subtitle synchronisation when converting to DVD



I've written a program that converts a dvb ts to a dvd-ready mpg stream. The
way I've arranged the PTSs in each GOP is that the audio is always aligned
to the video (well as close as will allow: +/- 12ms). I would arrange
subtitles in a similar way - assume the video pts is the baseline, and add
all subtitle packets having a PTS within the period of the GOP.

Your video player should then hopefully show the subtitles with the correct
sync.

Chris

-----Original Message----- From: Dave Chapman

Hi,

I'm working on programs to extract teletext subtitles and DVB subtitles 
from transport streams (and VDR streams) in order to convert them to DVDs.

This is basically working (see http://www.linuxstb.org/dvbtextsubs/ for 
the teletext subtitles version), but I have a problem with 
synchronisation which I hope someone on this list can help me with.

I am able to extract the PTS timestamps that indicate when each subtitle 
should be displayed, but my question concerns what is the "first PTS" 
for a stream.

For example, the PTS of the first video packet may be NNNN.600 ms, the 
audio PTS may be NNNN.100ms and the first subtitle PTS may be NNNN.800ms.

For each extracted subtitle, I need (for spumux) to store PTS as an 
offset from the start of the stream.  In the above example, I have the 
obvious possibilities - subtract NNNN.200ms (to align with the video 
stream) or NNNN.700ms (for the audio stream).

I suppose the answer depends on the particular demultiplexer and 
multiplexer I use to create my VOB files - i.e. what PTS they take to be 
the start of the stream.

Any suggestions?

Regards,

Dave.


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe
linux-dvb" as subject.


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index