Mailing List archive

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

[vdr] Re: Questions about the subtitles-plugin



"so-8859-1?B?SORt5GzkaW5lbiBKb3Jp?jori.hamalainen"@teliasonera.com wrote:
Ahh, hmm, thanks. I can't say I understood you too well, but I'll experiment when I get home. You'd improve your UI if you 'grayed out' the delay setting when the "sync=yes".
And if the UI also said what the delay is and what '10' means, it'd start to be understandable..

Should I try again:

Sync option means that should the plugin try to sync to DVB timestamps
(== PTS, presentation time stamp, DVB video&audio frames have them).

On "yes" setting it tries, but there are some problems and
you can see what they are by searching "getstc" on mailing lists.

On "no" plugin doesn't sync to DVB-video, it generates timing
(how long should subtitle be on screen) based on operating system clock.
Delay is after how long plugin should 'delay' the subtitle before
presenting it. Without delay plugin would show it at once subtitle
is received to buffer (seconds too early compared to audio/video).

subtitle comes at (wall clock): 15:20:00.00
subtitle start pts (dvb timestamp) = 123.00s
subtitle stop pts = 124.50s

So subtitle should be shown 1.5 seconds according the DVB-stream.
Now we have this delay variable, I don't know if it is # of frames or 1/10second or 1/100second but I guess it is 1/10 second.
And based on my guessing "delay = 20" means delay of 2 seconds.

Subtitles plugin will put subtitle on screen (wall clock): 15:20:02.00
And remove from screen (wall clock): 15:20:03.50

Pekka Virtanen, the osd-subtitles author, can clarify more & correct my (miss-)believes :-).
Well I'm not sure if anybody is interested but here is some technical explanation about the synchronization.

Synchorinization: on

while (sub_pts < stc(t))
wait;

(STC is coming from the mpeg-decoder)


Synchornization: off (More accurately fake stc)

stc(0) = first subtitle's pts
time(0) = "wall clock" time the first subtitle was received

stc(t) = stc(0) + (time(t)-time(0)-delay)*90000;

while (sub_pts < stc(t))
wait;

The delay is from the configuration.

90000 is the frequency of the system clock.




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



Home | Main Index | Thread Index