[MPlayer-dev-eng] OGG Text stream quirks

Jarrod Johnson jbj-mplayer at ura.dnsalias.org
Sun Oct 5 21:06:23 CEST 2003


After modifying my ogmmerge to do the right thing with text streams (to 
not insert blank entries between every text stream entry), ogg_demux 
effectively produced the same annoying behavior of blanking every sub 
before showing the next entry, which is annoying in cases where you want 
more text to appear on screen in addition to existing text without it 
blinking out for the transition.  Example srt to demonstrate:

1
00:00:01,000 --> 00:00:04,000
TEST
 

2
00:00:04,000 --> 00:00:07,000
TEST
SUB

Put that into a srt and use -sub to see what I think is correct to 
happen, then mux it into an ogm to see what actually happen.
(to only show the mplayer demux_ogg issue, ogmtools has to be compiled 
with -DOMITEMPTYPACKET)

 From my 2 minute look at things, it seems that the sub on screen is 
cleared before checking to see if the next entry provides an immediate 
suitable replacement that might work better than a blank to acheive the 
subber's desired effect.  My quick and dirty patch simply delays the 
clear_sub by a millisecond, having the effect of delaying the clearing 
of subs without immediate subsequent entry (not perceptable), but giving 
the stream an opportunity to provide a replacement and avoid an 
incorrect clear_sub.  Something worth considering...


--- MPlayer-0.92/libmpdemux/demux_ogg.c 2003-10-05 10:52:32.000000000 -0400
+++ MPlayer-0.92.fixed/libmpdemux/demux_ogg.c   2003-08-09 
10:12:34.000000000 -0400
@@ -217,7 +217,7 @@
       if(pack->granulepos == -1)
         pack->granulepos = os->lastpos + os->lastsize;
       pts = (float)pack->granulepos/(float)os->samplerate;
-      clear_sub = 0.001 + pts + (float)duration/1000.0;
+      clear_sub = pts + (float)duration/1000.0;
     }
     while (1) {
       int c = packet[lcv++];



More information about the MPlayer-dev-eng mailing list