[mythtv] Video OSD Length and Mpeg Telecine.
wstewart at hgrace.com
Mon Jan 19 02:46:08 UTC 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-dev