[mythtv] Keyframe adjust table (posibel bug(s))

Torbjörn Jansson torbjorn.jansson at mbox200.swipnet.se
Tue Jan 6 12:57:39 EST 2004



> On Mon, 5 Jan 2004 19:23:04 +0100, "Torbjörn Jansson" said:
> > That sounds like a good way to solve it. That will fix the 
> the problem
> > when
> > seeking to a new position.
> > But I will still have problem when I encounter a position where the
> > timecodes make a jump.
> > 
> > Maybe I can adjust the timestamping when a sync frame is 
> encounterd, that
> > woud probably solve all the problems.
> > After a file is transcoded all cuts will be keyframes and have sync
> > headers
> > before, right?
> Heh.  Wouldn't that be easy.  But no, cuts are frame exact, so it is
> possible for the timecodes to jump between two key-frames.
> 

;)

> In general, the rule should be (this is for mpeg2, but it probably
> applies for nuv as well): if the current pts is within +/- 
> 0.7 sec of the
> last one, then everything is fine.  If the pts is > +/-0.7sec from the
> last one, then you should reset your pts to the current value 
> (something
> bad happened).  For the commercial cut code, you could 
> probably replace
> that with 2-5 seconds safely (to allow more error in a normal stream. 
> The only question is what happens for very low audio rates, 
> where a frame
> might be longer than 0.7 sec (I'm not sure if that is even possible). 
> and to answer your previous question: pts == timestamp
> 
> Sorry this is so difficult; when I did the transcoding stuff, I didn't
> really forsee these types of issues.  I would do it differently in
> retrospect.
> 

I have fixed the seeking, so now I that part works.

But I shoud still have problems when the playback reaches a position where
the timecodes make a jump, but as far as I can see that works too.
It shoudn't work, I expected playback to stop for the same amount of time
that was cut off.

Maybe the directshow video renderer is smart and detects this and fixes it
by itself.
Hmm... if that's the case, then I shoud be able to use the directshow code
in dscaler that I did and shoud be able to observe the problem (it has a
custom renderer filter for video, video sample scheduling is very simple).



More information about the mythtv-dev mailing list