Opened 12 years ago
Closed 12 years ago
#11415 closed Bug Report - General (Fixed)
video seeking and bookmarks do not work properly for some .avi files
Reported by: | Owned by: | Jim Stichnoth | |
---|---|---|---|
Priority: | minor | Milestone: | 0.27.1 |
Component: | MythTV - Video Playback | Version: | 0.26-fixes |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
I have a set of DIVX mpeg4 .avi files generated with mencoder that mythfrontend seems to have problems with -- seeking and saving bookmarks show time drifting, especially after playing back the video for a while. During playback, myth's notion of the current position in the movie drifts away from the actual position, to the point where after 45 minutes of playback, if you save a bookmark and resume from it, the video resumes 10 minutes earlier than the previous position. Likewise, attempts to skip forward / back after 45 minutes of playback end up jumping back 10 minutes.
After analyzing the .avi files, I found that the container shows the frame rate as 29.97 fps and using 'ffprobe -show_packets', I see video packets with duration = 0.033 (the appropriate value for 29.97fps), however there are only actually 24 frames in the stream for every second of PTS time. Myth is using the (incorrect) container fps value for seeking / bookmarking decisions. PTS time seems to be accurate which is, I assume, why playback works fine.
I had this issue with earlier versions of MythTV and I believe it was resolved by generating a seek table with 'mythcommflag --video', however this no longer seems to work.
I've had some discussion with Jim Stichnoth about this and he indicated that changing to use ffmpeg-based seeking in 0.27 should resolve the problem.
Until 0.27, I have a short-term solution which is to add a '--fixavi' option to mythtranscode which analyzes the first 5 minutes of the video and saves the frame rate in the filemarkup table. Then, during playback of .avi files, if the frame rate is in the filemarkup table, it is used to override the container frame rate. Patch will be attached soon.
Attachments (1)
Change History (6)
Changed 12 years ago by
Attachment: | fps_db.patch added |
---|
comment:1 Changed 12 years ago by
Milestone: | unknown → 0.27.1 |
---|---|
Owner: | set to Jim Stichnoth |
Status: | new → accepted |
The intention here is to ignore any seektable for video formats that don't allow timestamp discontinuities, and use ffmpeg functionality instead. My notes from a while back, which may be inaccurate:
Don't use a seektable unless necessary - "ic->iformat->flags & AVFMT_TS_DISCONT". Use display timecode "picframe->disp_timecode = NormalizeVideoTimecode?(stream, temppts);".
comment:5 Changed 12 years ago by
Resolution: | → Fixed |
---|---|
Status: | accepted → closed |
Adds --fixavi option to mythtranscode to save FPS in database, Read FPS from db during playback.