[mythtv] Video OSD Length and Mpeg Telecine.

Michael T. Dean mtdean at thirdcontact.com
Mon Jan 19 06:51:06 UTC 2009


On 01/18/2009 09:46 PM, Bill Stewart wrote:
> Many/most of my mpegs show the incorrect length in the OSD during 
> playback.  The actual time of the movie if timed by a stopwatch is 
> correct, but the OSD time shown is not.
>  
> This is because the mpegs are telecine encoded.  The mpeg header 
> indicates the movie is 29.97fps, where as the actual frame rate is 
> 24fps because the repeat flag is set that indicates to the playback 
> device to repeat one frame for every four frames. 
>  
> Myth plays back the video correctly and I assume inserts the redundant 
> frame.  However, when counting frames in NuppleVideoPlayer.cpp / 
> tv_play.cpp, it does not count the redundant frame because it doesn't 
> exist in the file (video playback device is to repeat the last of each 
> 4 frames).  As such that total time and running time of the movie 
> shown in the OSD is in error by 4/5.
>  
> Normally mythtv caculates the time played as framesPlayed / 
> video_frame_rate. I have a simple patch that comestically corrects 
> this by scaling the OSD times by length*frames_playes/total_frames, 
> where length is the length reported in the mpeg header.  Normally myth 
> calculates this from the position map, but I also override this if the 
> length in the header is greater than that calculated by the position map.
>  
> Before submitting a ticket, I thought to run this by the devs in the 
> list first.

It's a known issue that's basically covered by #799 ( 
http://svn.mythtv.org/trac/ticket/799 ) and also affects any video whose 
frame rate changes within the stream.  Remember when looking at the 
ticket that anything written by a non-dev should not be determined to be 
"final authority" (i.e. the "doubled recording length", as well as 
plenty of info in comments, can be ignored)

Mike


More information about the mythtv-dev mailing list