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

ffmpeg decoder breakage #4344

Closed
totaam opened this issue Sep 3, 2024 · 3 comments
Closed

ffmpeg decoder breakage #4344

totaam opened this issue Sep 3, 2024 · 3 comments
Labels
bug Something isn't working encoding

Comments

@totaam
Copy link
Collaborator

totaam commented Sep 3, 2024

Not sure when this started happening - especially now that I most often test with v6.x which doesn't have it.
Reproducible with every supported branch and the builtin test data (which has been unchanged for years):

Here it is with v3.1.x and Fedora 40 with ffmpeg 6.1.1:

$ python3.10 ./xpra/codecs/loader.py dec_avcodec2
Error: avcodec error decoding 666 bytes of h264 data:
 'no picture'
 frame 0
 decoder state:
                version = 60, 31, 102
               encoding = h264
                formats = YUV420P, YUV422P, YUV444P, RGB, XRGB, BGRX, ARGB, BGRA, GBRP, GBRP9LE
                   type = avcodec
                 frames = 0
                  width = 24
                 height = 16
             colorspace = YUV420P
      actual_colorspace = YUV420P
          decoder_width = 24
         decoder_height = 16
avcodec2: h264 decoding failed: failed to decode test data for encoding 'h264' with colorspace 'YUV420P'
codecs and csc modules found:
* dec_avcodec2         : /usr/lib64/python3.10/site-packages/xpra/codecs/dec_avcodec2/decoder.cpython-310-x86_64-linux-gnu.so

codecs versions:
* avcodec2                        : 60.31.102
* numpy                           : 1.26.4
@totaam totaam added bug Something isn't working encoding labels Sep 3, 2024
@totaam
Copy link
Collaborator Author

totaam commented Sep 4, 2024

Even older versions now fail with the same error - tried as far back as v3.1.1 on Fedora 39.
Probably something to do with ffmpeg 6.1.1

This is going to be a problem with MSYS2 and MacOS builds for all branches before v6

@totaam
Copy link
Collaborator Author

totaam commented Sep 4, 2024

Scratch that, this only affects 6.1.1 and not 7.x (7.0.2 with current MSYS2)
So less of an issue?

The self-tests are really working as intended and do allow the other codecs to be enabled - that is, my Fedora system can still decode vp8, vp9, mpeg1, mpeg2 and mpeg4 using the same decoder, it only avoids h264.

@totaam
Copy link
Collaborator Author

totaam commented Sep 4, 2024

Works with Ubuntu 24.04 and libavcodec 6.1.1.
Works with Fedora 41 and ffmpeg-devel 6.1.2 but not with libavcodec-free-devel 6.1.1.

Fixed by installing libavcodec-freeworld.
The development headers include h264, but you need the "freeworld" package to actually get "h264" decoding support.

@totaam totaam closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working encoding
Projects
None yet
Development

No branches or pull requests

1 participant