Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash without tracebacks when extract frames from some webm in vp9 yuv420p and convert to rgba #1166

Closed
4 of 6 tasks
laggykiller opened this issue Sep 28, 2023 · 4 comments
Closed
4 of 6 tasks
Labels

Comments

@laggykiller
Copy link
Contributor

laggykiller commented Sep 28, 2023

Overview

Extracting frames from some webm in vp9 yuv420p and convert to rgba cause crash of entire python without any tracebacks and message.

Expected behavior

Convert the frames into rgba, or at the very least, throw exception instead of crashing the whole python

Actual behavior

Entire python crash without any tracebacks and message.

Traceback:
None, the whole python crashes without any traceback

Investigation

Setting format='rgb24' instead of format='rgba' does not trigger the crash.

Note that other files that are also vp9 yuv420p do not trigger the crash.

Reproduction

004.webm
021.webm

import av
with av.open('004.webm') as container:
    for frame in container.decode(video=0):
        frame.reformat(format='rgba')

webm samples that are also vp9 yuv420p but do NOT trigger the crash:
002.webm
003.webm

Versions

  • OS: Windows 11
  • PyAV runtime:
PyAV v9.2.0
library configuration: --disable-static --enable-shared --libdir=/c/cibw/vendor/lib --prefix=/c/cibw/vendor --disable-alsa --disable-doc --disable-mediafoundation --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-libxcb --enable-libxml2 --enable-libxvid --enable-lzma --enable-version3 --enable-zlib
library license: GPL version 3 or later
libavcodec     58.134.100
libavdevice    58. 13.100
libavfilter     7.110.100
libavformat    58. 76.100
libavutil      56. 70.100
libswresample   3.  9.100
libswscale      5.  9.100

Research

I have done the following:

PS: https://gitter.im/PyAV-Org is down (404 not found)

@laggykiller laggykiller changed the title Some webm Extract frames from some webm in vp9 yuv420p and convert to rgba cause crash without tracebacks Sep 28, 2023
@laggykiller laggykiller changed the title Extract frames from some webm in vp9 yuv420p and convert to rgba cause crash without tracebacks Crash without tracebacks when extract frames from some webm in vp9 yuv420p and convert to rgba Sep 28, 2023
@jlaine
Copy link
Member

jlaine commented Nov 2, 2023

It looks like your report is against an old version of PyAV. Can you please try reproducing this with PyAV 10.0 or better yet with main?

@laggykiller
Copy link
Contributor Author

@jlaine Reproducible even with 10.0.0

@WyattBlue
Copy link
Member

I could not reproduce this in 11.0.0. When running @laggykiller 's code, the program logged this:

No accelerated colorspace conversion found from yuv420p to rgba.
No accelerated colorspace conversion found from yuv420p to rgba.
 (repeated 48 more times)

then exited successfully.

@laggykiller
Copy link
Contributor Author

Looking back, seems like this is reflecting the same problem in #1269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants