-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Description
This issue was originally discussed in Issue #349 in 2018 (moved to Discussion as #928), but it wasn't resolved then (as far as I can tell). I just came across this very issue and may be able to shed additional light.
Here is a minimal example (tested with v15.0.0 running on Python v3.13.3 in Linux):
import av
seek_first = False
with av.open(avifile) as fmt:
vst = fmt.streams.video[0]
if seek_first:
fmt.seek(0, stream=vst, backward=True, any_frame=False)
frame = next(fmt.decode(video=0))
data = frame.to_ndarray(format="rgb24")
assert np.any(data!=0) # errors out only if seek_first=True
The assertion appears to fail only with my AVI file (uncompressed video from highspeed video camera). If I use an MP4 file, it worked properly. Also, every frame of this AVI file is a key frame. I cannot share my video file but this info may help debugging the issue.
Thanks, and Thanks for the awesome package
P.S., I'd be happy to move this post under #928 if appropriate, but it does appear to be a real issue.
Metadata
Metadata
Assignees
Labels
No labels