libgdx/gdx-video

AV1 Decoding does not work on Desktop

Opened this issue · 3 comments

@Frosty-J reported an issue decoding AV1-encoded video files on Windows over at #77.

I tried it myself, encoding the included test video with
ffmpeg -i 'libGDX - It's Good For You!.webm' -c:v libaom-av1 -crf 31 -cpu-used 5 -row-mt 1 -tiles 4x1 -c:a copy 'libgdx-av1.webm'.

The resulting file played fine in VLC player, but caused errors when loaded in the test app.

So the issue described can be reproduced. This might be an issue with the cross build environment or compile settings. I'll look into it when I have time.

After more testing, AV1 also does not work on Linux and Mac anymore.

Update: Apparently, the AV1 decoder only works when it detects hardware decoding support, and there is no software decoding fallback.

Decoding works on Linux 64 Bit when building FFmpeg with --enable-libdav1d --enable-decoder=libdav1d, and adding -ldav1d to the JNI build flags.
Getting this to work with cross compiles and on all platforms might take a while though.

Hardware decoding in gdx-video in general would be cool. The videos I've tested can be decoded in hardware when played with VLC, but for gdx-video it's all in software. Probably easier said than done, of course, and software fallback is a must for compatibility.