Opened 12 years ago

Closed 11 years ago

#7521 closed patch (fixed)

[PATCH] AVFormatDecoder: Seeking Improvements

Reported by: tralph11@… Owned by: markk
Priority: minor Milestone: 0.23
Component: MythTV - Video Playback Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


This patch addresses issues related to libav seeking. Here are a few key points related to the patch.

  • We should only use exact seeks when doing frame-by-frame seeking. It is way to slow to perform exact seeks when doing FF/REW.
  • Since we don't perform exact seeks for FF/REW it is important to set or clear the AVSEEK_FLAG_BACKWARD to avoid getting stuck in an infinite loop.
  • Always flush the buffers when performing a seek.
  • Please note that MPEG-TS seeking is currently slow so except for FF3X all other FF/REW speeds should be avoided. This is due to the fact that seeking in this container jumps back repeatedly causing the MythTV RingBuffer? protocol to rebuffer which is a high latency action. Apparently MPEG-TS seeking is being improved by the FFmpeg devs. Another option to improve performance is to use the 'file' protocol instead of the 'rbuffer' protocol.

Refs #7252, #7397, #7454

Attachments (3)

avseek_fixes_rev1.diff (2.7 KB) - added by tralph11@… 12 years ago.
avseek improvements
avseek_fixes_rev2.diff (3.3 KB) - added by tralph11@… 11 years ago.
skip libavf seeking if the target frame is < 1 second away
t7521_avseek_fixes_rev3.diff (3.1 KB) - added by taylor.ralph@… 11 years ago.
final update (trunk 23210)

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by tralph11@…

Attachment: avseek_fixes_rev1.diff added

avseek improvements

Changed 11 years ago by tralph11@…

Attachment: avseek_fixes_rev2.diff added

skip libavf seeking if the target frame is < 1 second away

Changed 11 years ago by taylor.ralph@…

final update (trunk 23210)

comment:1 Changed 11 years ago by markk

Owner: changed from Janne Grunau to markk
Status: newaccepted

comment:2 Changed 11 years ago by markk

Milestone: unknown0.23

comment:3 Changed 11 years ago by markk

Resolution: fixed
Status: acceptedclosed

(In [23288]) Improved AVFormatDecoder seeking with patches from Taylor Ralph.

I've been testing for a few days and the improvement in navigating files without a markup (i.e. MythVideo?) is substantial.

I'd delayed due to an issue seen with certain test matroska files but I've now realised that this is a separate, existing seek problem with these files that manifests itself slightly differently following these changes.

Closes #7521, Closes #7935.

Note: See TracTickets for help on using tickets.