mpv-player / mpv-build

🔨 Helper scripts to compile mpv on Linux
http://mpv.io
403 stars 104 forks source link

--enable-dav1d is not working #190

Closed acedogblast closed 1 year ago

acedogblast commented 2 years ago

When using this script to build mpv with --enable-libdav1d for the ffmpeg options it does not add dav1d av1 decoder into the ffmpeg build. Checked using ./ffmpeg -decoders. It should have this V..... libdav1d dav1d AV1 decoder by VideoLAN (codec av1) but it does not. I have installed libdav1d-dev on my system.

CounterPillow commented 2 years ago

it's --enable-libdav1d. Your ffmpeg build probably failed because of this and you didn't notice.

acedogblast commented 2 years ago

Sorry it was --enable-libdav1d but I misspelled it in the issue. Regardless it still does not work. The script for me failed on building mpv on that part that links libplacebo but it finished the ffmpeg build.

CounterPillow commented 2 years ago

A few things to check:

acedogblast commented 2 years ago

It seems my ffmpeg_build/config.h is #define CONFIG_LIBDAV1D 0. I assume it should be 1? I did not modify this config file myself. Going to rebuild and see if it fixes it.

acedogblast commented 2 years ago

Strange rebuilding sets #define CONFIG_LIBDAV1D back to 0.

CounterPillow commented 2 years ago

that's because your ffmpeg configure step isn't picking up libdav1d. Please check the other things, particularly the filename of ffmpeg_options.

acedogblast commented 2 years ago

The file is named "ffmpeg_options" and the only line in it is "--enable-libdav1d". But I think I found my problem pkg-config does not have --path as an option. There is --exists which returns nothing so I assume that libdav1d-dev is not installed but apt says it is: libdav1d-dev is already the newest version (0.9.2-0xneon+20.04+focal+release+build2).

acedogblast commented 2 years ago

There is a dav1d folder in /usr/include/dav1d/ along with several header files.

CounterPillow commented 2 years ago

If you explicitly enable building with libdav1d like this, ffmpeg would fail during configure if it didn't find it. Make sure that in the ffmpeg part of the output, you see an --enable-libdav1d scroll by somewhere.

acedogblast commented 2 years ago

Ok I think I found the problem. If I have multiple enables in the ffmpeg_options file and if one or more of the enables do not work such as "--enable-libx265" the other enables do not get configured. Additionally on the built ffmpeg banner is this: ffmpeg version N-107738-g109515e16d Copyright (c) 2000-2022 the FFmpeg developers built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) configuration: --prefix=/home/charles/Apps/mpv-build/build_libs --enable-gpl --disable-debug --disable-doc --enable-static --disable-shared --enable-pic --enable-gnutls '--enable-libdav1d --enable-libx264 --enable-libx265 --enable-libopus --enable-libass' Notice how there is a single quotes around several enables.

acedogblast commented 1 year ago

Solved. It turns out that for each --enable option needs to be on their own line in the ffmpeg_options file. Before I had them in the same line which caused the script to treat the whole line as a single option which is a problem.

garoto commented 1 year ago

[...] each --enable option needs to be on their own line [...]

gee bro