[FFmpeg-trac] #5093(undetermined:reopened): Accurate seek not possible with MPEG program stream and transport sream
FFmpeg
trac at avcodec.org
Fri Dec 18 12:55:03 CET 2015
#5093: Accurate seek not possible with MPEG program stream and transport sream
-------------------------------------+-------------------------------------
Reporter: pkerling | Owner:
Type: enhancement | Status: reopened
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Changes (by pkerling):
* status: closed => reopened
* resolution: invalid =>
Comment:
I've looked into the reason for this behaviour, and it seems that with
MPEG PS and TS the initial seek is done based on the AVIndexEntry entries
which are not accurate. Because the PES header does not include whether
the video frame is a key frame or not, the MPEG demuxer marks every frame
as keyframe (See the call to av_add_index_entry in mpegps_read_pes_header,
libavformat/mpeg.c). The seek code then thinks it's ok to seek there even
if it's really a B frame and does not try to search for a preceding
keyframe which would normally be necessary. The video decoder throws away
everything up to the next keyframe so this is what gets written to the PNG
file in the end.
After all, I do think this is a bug, so I'm reopening the ticket. Feel
free to close it again if this is really the way it should be.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5093#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list