Opened 13 years ago
Closed 12 years ago
#1273 closed defect (fixed)
initial seek in msrle causes failure to display on some avi files
Reported by: | DonMoir | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | pal8 msrle seek |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
If you do a seek prior to calling avcodec_decode_video2 at least once, then you will no longer get any video stream packets with the attached files. The seek works fine after you call avcodec_decode_video2 but not if you tried to seek prior to this. Reading a first video packet is not enough.
It can be any seek like -ss 0, --ss 1, etc.
The audio is ok.
Attachments (2)
Change History (16)
by , 13 years ago
by , 13 years ago
Attachment: | filecopy.avi added |
---|
comment:1 by , 13 years ago
comment:3 by , 13 years ago
I tried ffmpeg -ss 0 clock.avi temp.avi and temp.avi was displayable.
ffmpeg -ss 1 clock.avi temp2.avi and temp2.avi had no display.
When I do a Seek to zero seconds (or any time) in my own app on startup, I don't get any display. It appears all processing is normal and I get finished frames etc, but it appears they are all black. If I do a seek after at least one frame has been processed, seek at any time works fine. Similiar to behavior seen with ffplay. Although ffplay has a problem displaying the clock.avi without -ss. The image is skewed. This doesn't have anything to do with the seek problem and the skew problem with ffplay may be a regression.
In my own app and other players the clock.avi displays fine (no skew problem) as long as I don't do a seek on startup in my own app.
The seek problem has not been noticed with any other file format and not all avi files. Has to do with msvideo1 and msrle I think.
comment:4 by , 13 years ago
For a work around, if the codec_id is CODEC_ID_MSRLE or CODEC_ID_MSVIDEO1, I am having to call av_read_frame until I get a video packet and then call avcodec_decode_video2 once. I can then do the seek and get expected results. I do this before I start up normal processing.
comment:5 by , 13 years ago
Component: | avformat → undetermined |
---|---|
Keywords: | pal8 added |
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
I suspect this behaviour is expected for videos containing a palette.
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
comment:8 by , 12 years ago
Keywords: | msrle added |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
comment:10 by , 12 years ago
Replying to DonMoir:
This file also fails CODEC_ID_MSVIDEO1
Please open a new ticket for the sample that has different parameters, do not forget to add a failing command line together with complete, uncut console output.
comment:11 by , 12 years ago
comment:12 by , 12 years ago
Keywords: | seek added |
---|
comment:13 by , 12 years ago
Ticket #296 is a different issue. The conditions in 296 are simply because there are not many keyframes. This issue (1273) is because any attempt to seek before the first avcodec_decode_video2 even to initial keyframe, causes failure to display. Completely different issues.
I have no problem with any of the files referenced in 296, but it's an awkward work around for issue 1273.
Just because EVBPIC.AVI is in both 296 and 1273 doesn't mean it's the same issue.
comment:14 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Summary: | initial seek causes failure to display on some avi files → initial seek in msrle causes failure to display on some avi files |
ffplay -ss 0 clock.avi
ffplay version N-40301-gc1fe2db Copyright (c) 2003-2012 the FFmpeg developers
[avi @ 012a0200] non-interleaved AVI
[avi @ 012a0200] max_analyze_duration 5000000 reached at 5008435
Input #0, avi, from 'clock.avi':
[buffersink @ 012a8280] auto-inserting filter 'auto-inserted scale 0' between
the filter 'src' and the filter 'out'
[scale @ 012a81a0] w:321 h:321 fmt:pal8 sar:0/1 -> w:321 h:321 fmt:yuv420p sar:0
/1 flags:0x4
1336136307.52 A-V:1336136307.501 fd= 0 aq= 25KB vq= 31KB sq= 0B f=0/0