#540 closed defect (invalid)
mpeg1 and 2 seeking bug
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | libavcodec |
Version: | unspecified | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
Seeking in mpeg1 and mpeg2 streams using
av_seek_frame(formatcontext, vstream, time, AV_SEEK_FLAG_BACKWARD);
causes messages like
[mpeg2video @ 0xb4ba61d0]Warning MVs not available
[mpeg2video @ 0xb4ba61d0]releasing zombie picture
[mpeg2video @ 0xb4ba61d0]warning: first frame is no keyframe
Also, the frames returned are clearly not the ones I seeked to and contain
garbled images.
The code works with other codecs - I've tested huffyuv, mjpeg, mpeg4, msmpeg and
xvid. If the stream index is set to -1 and the time calculation changed
appropriately:
av_seek_frame (formatcontext, -1, time, AV_SEEK_FLAG_BACKWARD);
then everything works. The first two warning messages still appear, but the
frames shown are the correct ones and the 'no keyframe' message doesn't appear
anymore.
Attachments (2)
Change History (5)
by , 18 years ago
Attachment: | ffplay.diff added |
---|
comment:1 by , 18 years ago
The patch modifies ffplay to seek using the video stream. For xvids, this works
perfectly, for mpeg2s, it produces garbled images and the error messages in the
bug report.
I've got a small (200k, 160x120, 10 seconds) test movie if you need one.
by , 18 years ago
Attachment: | mpeg2_160x120_25_10_audio.mpg added |
---|
mpeg2 file that causes the bug to appear.
comment:2 by , 18 years ago
File created using
FFMPEG_PARAMS=-i testmovies/tmp/tmp.wav -t 10.04 -i \
testmovies/tmp/160x120_frame%07d.png -y -r 25 -b 9000 \
-vcodec mpeg2video mpeg2_160x120_25_10_audio.mpg
ffmpeg -pass 1 ${FFMPEG_PARAMS}
ffmpeg -pass 2 ${FFMPEG_PARAMS}
comment:3 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
MPEG PS doesn't indicate keyframes.
Modification to ffplay that causes the bug to appear