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

Can't read video encoded with AV1 codec #319

Open
rakhimovv opened this issue Oct 3, 2024 · 1 comment
Open

Can't read video encoded with AV1 codec #319

rakhimovv opened this issue Oct 3, 2024 · 1 comment

Comments

@rakhimovv
Copy link

rakhimovv commented Oct 3, 2024

Hello! Thank you for your work.

I met a problem with reading of certain encoding.
The video ffmpeg encoding information:

"vcodec": "libsvtav1",
"pix_fmt": "yuv420p",
"g": 2,
"crf": 30

The error:

[file @ 0x55fe07de3bc0] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] Processing st: 0, edit list 0 - media time: 0, duration: 123909
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] Before avformat_find_stream_info() pos: 590687 bytes read:34268 seeks:1 nb_streams:1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55fe07ff1180] After avformat_find_stream_info() pos: 16646 bytes read:67036 seeks:2 frames:1
[AVIOContext @ 0x55fe07d6c9c0] Statistics: 67036 bytes read, 2 seeks
Traceback (most recent call last):
  File "/home/jovyan/rakhimov/gigarobot/dec.py", line 10, in <module>
    vr = VideoReader(path, ctx=cpu(0))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jovyan/micromamba/envs/side_pkg_rr/lib/python3.11/site-packages/decord/video_reader.py", line 54, in __init__
    self._handle = _CAPI_VideoReaderGetVideoReader(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jovyan/micromamba/envs/side_pkg_rr/lib/python3.11/site-packages/decord/_ffi/_ctypes/function.py", line 173, in __call__
    check_call(_LIB.DECORDFuncCall(
  File "/home/jovyan/micromamba/envs/side_pkg_rr/lib/python3.11/site-packages/decord/_ffi/base.py", line 78, in check_call
    raise DECORDError(err_str)
decord._ffi.base.DECORDError: [11:30:13] /github/workspace/src/video/video_reader.cc:151: Check failed: st_nb >= 0 (-1128613112 vs. 0) ERROR cannot find video stream with wanted index: -1

Video is fine, I checked it visually and also via ffpmeg. Pyav is able to read it too. I guess the problem with the codec support.

The decord version is 0.6.0

installed with
pip install decord

@gcanat
Copy link

gcanat commented Oct 4, 2024

Meanwhile this library seems pretty much abandoned, you can try this one instead.

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

No branches or pull requests

2 participants