deadbeef icon indicating copy to clipboard operation
deadbeef copied to clipboard

ffmpeg 5.0 support

Open MountainX opened this issue 2 years ago • 12 comments

Steps to reproduce the problem

sudo pacman -Syu yay -S deadbeef

What's going on? Describe the problem in as much detail as possible.

==> ERROR: A failure occurred in build(). 
ffmpeg.c:956:33: error: no member named 'codec' in 'struct AVStream'
    ctx = fctx->streams[i]->codec;
       ~~~~~~~~~~~~~~~~  ^

Information about the software:

Deadbeef version: attempting to upgrade to deadbeef 1.8.8-3 using: AUR (en) - deadbeef As part of my troubleshooting I removed the prior installed version - it was not opening/running. I encounter this same bug whether upgrading or installing deadbeef 1.8.8-3

I also reproduced this on a second computer, which had never previously had deadbeef installed. Both run Arch Linux.

OS: Arch Linux, fully updated. ffmpeg Version: 2:5.0-4

Maybe this is related to the ffmpeg version? Does deadbeef 1.8.8-3 have dependencies that are not specified correctly in the AUR package, maybe?

MountainX avatar Feb 25 '22 05:02 MountainX

you need to post the whole config and build log files, including the Plugin Summary

stefson avatar Feb 26 '22 13:02 stefson

there's no need for logs, it's known that deadbeef has not been updated to support ffmpeg 5.0 yet.

Oleksiy-Yakovenko avatar Feb 26 '22 16:02 Oleksiy-Yakovenko

hmm ok, I asked since its not reproduceable for me. But if you already acknowledged there is indeed a problem, I'm fine with it (:

stefson avatar Feb 26 '22 16:02 stefson

@stefson are you sure that you are using ffmpeg 5.0?

Oleksiy-Yakovenko avatar Feb 26 '22 16:02 Oleksiy-Yakovenko

I do, its available on gentoo for testing.

here is my config:

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules --docdir=/usr/share/doc/deadbeef-1.8.8 --htmldir=/usr/share/doc/deadbeef-1.8.8/html --with-sysroot=/ --libdir=/usr/lib64 --disable-coreaudio --disable-portable --disable-static --enable-ffmpeg --enable-aac --disable-adplug --enable-alac --enable-alsa --enable-cdda --disable-cdda-paranoia --enable-converter --enable-artwork --enable-artwork-imlib2 --disable-artwork-network --enable-vfs-curl --disable-dca --disable-dumb --disable-supereq --enable-flac --disable-gme --disable-gtk2 --enable-gtk3 --enable-hotkeys --disable-lfm --disable-notify --enable-src --enable-m3u --disable-ffap --enable-libmad --disable-wildmidi --enable-mms --disable-mono2stereo --disable-libmpg123 --enable-musepack --enable-nls --disable-nullout --disable-opus --disable-oss --disable-pltbrowser --disable-psf --disable-pulse --disable-sc68 --disable-shellexecui --enable-shn --disable-sid --enable-sndfile --enable-tta --enable-vorbis --disable-vtx --enable-wavpack --enable-wma --enable-vfs-zip

stefson avatar Feb 26 '22 16:02 stefson

ok.. then it seems it can be some other problem unrelated to ffmpeg version. sorry for the confusion -- I was kind of expecting that ffmpeg 5.0 had major API changes, just like it happened with all previous major updates.

Oleksiy-Yakovenko avatar Feb 26 '22 16:02 Oleksiy-Yakovenko

possibly, but maybe I got away due to my setup.

I just wait for the config and build logs to see what went wrong.

stefson avatar Feb 27 '22 15:02 stefson

on my machine it says:

loading plugin /usr/lib/deadbeef/ffmpeg.so
dlopen error: /usr/lib/deadbeef/ffmpeg.so: undefined symbol: av_register_all
trying /usr/lib/deadbeef/ffmpeg.fallback.so...
plugin ffmpeg.so not found or failed to load

I have arch linux with deadbeef-git from AUR. It does seem to build without issue, but can't load the ffmpeg plugin. The issue popped up around the time ffmpeg-5.0 released, but I can't say for sure since I only just now noticed, because some opus tracks are failing to play.

The build logs seem to build the ffmpeg plugin without problem:

checking for ffmpeg/avformat.h... no
config.status: creating plugins/ffmpeg/Makefile
    ffmpeg: yes - ffmpeg codecs
Making all in plugins/ffmpeg
make[2]: Entering directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'
  CC       ffmpeg.lo
ffmpeg.c:115:14: warning: initializing 'AVCodec *' (aka 'struct AVCodec *') with an expression of type 'const AVCodec *' (aka 'const struct AVCodec *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
ffmpeg.c:708:42: warning: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Wformat]
ffmpeg.c:805:24: warning: implicit declaration of function 'av_iformat_next' is invalid in C99 [-Wimplicit-function-declaration]
ffmpeg.c:805:22: warning: incompatible integer to pointer conversion assigning to 'AVInputFormat *' (aka 'struct AVInputFormat *') from 'int' [-Wint-conversion]
ffmpeg.c:852:5: warning: implicit declaration of function 'av_register_all' is invalid in C99 [-Wimplicit-function-declaration]
  CCLD     ffmpeg.la
make[2]: Leaving directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'
  CC       libwma/fft-ffmpeg.lo
  CC       libwma/ffmpeg_bitstream.lo
Making install in plugins/ffmpeg
make[1]: Entering directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'
make[2]: Entering directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'
 /bin/sh ../../libtool   --mode=install /usr/bin/install -c   ffmpeg.la '/data/makepkg/deadbeef-git/pkg/deadbeef-git/usr/lib/deadbeef'
libtool: install: /usr/bin/install -c .libs/ffmpeg.so /data/makepkg/deadbeef-git/pkg/deadbeef-git/usr/lib/deadbeef/ffmpeg.so
libtool: install: /usr/bin/install -c .libs/ffmpeg.lai /data/makepkg/deadbeef-git/pkg/deadbeef-git/usr/lib/deadbeef/ffmpeg.la
make[2]: Leaving directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'
make[1]: Leaving directory '/data/makepkg/deadbeef-git/src/deadbeef/plugins/ffmpeg'

(grepped for ffmpeg)

RiedleroD avatar Mar 01 '22 21:03 RiedleroD

@RiedleroD thanks, this pretty much confirms what I thought. ffmpeg plugin code needs to be updated, it's incompatible with ffmpeg 5.0

Oleksiy-Yakovenko avatar Mar 01 '22 21:03 Oleksiy-Yakovenko

@RiedleroD deadbeef-git on AUR should be fixed. It now uses the ffmpeg4.4 package until this is fixed in deadbeef.

ToadKing avatar Mar 02 '22 02:03 ToadKing

@ToadKing thanks, I can confirm that it works as intended now.

RiedleroD avatar Mar 03 '22 12:03 RiedleroD

So I can confirm the findings, the compile of ffmpeg-plugin against ffmpeg-5.0 is working but it won't load at runtime.

stefson avatar Mar 06 '22 15:03 stefson

Closed in https://github.com/DeaDBeeF-Player/deadbeef/pull/2861

Oleksiy-Yakovenko avatar Oct 02 '22 08:10 Oleksiy-Yakovenko

is it confirmed to work at runtime now?

stefson avatar Oct 02 '22 08:10 stefson

I've built 1.9.5 against ffmpeg-6.0 and the ffmpeg.so plugin loaded. However, I don't know how to test it because all the files that I have I think are being read by their 'native' plugin (mp3.so, flac.so, etc).

nieder avatar Mar 19 '23 11:03 nieder

@nieder to test it, you should play some files which are normally played via ffmpeg plugin in deadbeef -- such as DSF, TAK, 3GP, AMR, AC3.

Oleksiy-Yakovenko avatar Mar 19 '23 11:03 Oleksiy-Yakovenko

Thanks for the pointer. I was able to test a 3gp and a dsf file. Both sounded fine with 1.9.5 built against ffmpeg-6.0.

nieder avatar Mar 19 '23 22:03 nieder