ffmpegmpd

MPD doesnt load ffmpeg as decoder


I am using openwrt 21.2.3 and mpd on it. I have compile mpd full and libffmpeg full as well as ffmpeg-full packages. But my mpd wont load ffmpeg as decoder. Also tried to force it by adding decoder { plugin “ffmpeg” enabled “no” }” line to /etc/mpd.conf

below is my mpd.conf

log_file "syslog"

bind_to_address "127.0.0.1"
bind_to_address "192.168.1.16"

input {
    plugin          "curl"
}

audio_output {
    type            "alsa"
    name            "sun4icodec"
    device          "plug:dmix"
    mixer_control   "Power Amplifier"
}

decoder {
     plugin  "ffmpeg"
     enabled  "yes"
}

the mpd --version output is as follows

Music Player Daemon 0.21.26 (v21.02.3)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local curl


Decoders plugins:
 [mad] mp3 mp2
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [faad] aac
 [pcm]

Filters:


Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa pulse httpd recorder

Encoder plugins:
 null opus wave flac

Input plugins:
 file alsa curl mms

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// http:// https:// mms:// mmsh:// mmst:// mmsu://

Other features:
 epoll iconv inotify ipv6 tcp un

ideally it should have something like this


Decoders plugins:
 [dsdiff] dff
 [dsf] dsf
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [pcm]

Filters:


here are logs from mpd deamon

Output of ffmpeg command


Mon Jul 25 09:40:30 2022 daemon.err mpd[1969]: exception: Error in /etc/mpd.conf line 17; Unknown tokens after '{'
Mon Jul 25 09:44:23 2022 daemon.debug mpd: vorbis: Xiph.Org libVorbis 1.3.7
Mon Jul 25 09:44:23 2022 daemon.debug mpd: opus: libopus 1.3.1-fixed
Mon Jul 25 09:44:23 2022 daemon.debug mpd: curl: version 7.82.0
Mon Jul 25 09:44:23 2022 daemon.debug mpd: curl: with mbedTLS/2.16.12
ffmpeg version 4.3.3 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)
  configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-hardcoded-tables --enable-gpl --enable-version3 --enable-nonfree --disable-swscale --disable-everything --enable-encoder=ac3 --enable-encoder=jpegls --enable-encoder=mpeg1video --enable-encoder=mpeg2video --enable-encoder=pcm_s16be --enable-encoder=pcm_s16le --enable-encoder=png --enable-encoder=vorbis --enable-encoder=zlib --enable-decoder=aac --enable-decoder=ac3 --enable-decoder=alac --enable-decoder=amrnb --enable-decoder=amrwb --enable-decoder=ape --enable-decoder=flac --enable-decoder=jpegls --enable-decoder=mp2 --enable-decoder=mp3 --enable-decoder=mpeg1video --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=mpc7 --enable-decoder=mpc8 --enable-decoder=pcm_s16be --enable-decoder=pcm_s16le --enable-decoder=png --enable-decoder=vorbis --enable-decoder=wavpack --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=zlib --enable-muxer=ac3 --enable-muxer=mp3 --enable-muxer=mp4 --enable-muxer=mpeg1video --enable-muxer=mpeg2video --enable-muxer=mpegts --enable-muxer=ogg --enable-muxer=rtp --enable-demuxer=aac --enable-demuxer=ac3 --enable-demuxer=amr --enable-demuxer=ape --enable-demuxer=avi --enable-demuxer=flac --enable-demuxer=matroska --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=mpegps --enable-demuxer=mpegts --enable-demuxer=mpegvideo --enable-demuxer=mpc --enable-demuxer=mpc8 --enable-demuxer=ogg --enable-demuxer=rm --enable-demuxer=rtsp --enable-demuxer=rtp --enable-demuxer=sdp --enable-demuxer=wav --enable-demuxer=wv --enable-parser=aac --enable-parser=flac --enable-parser=ac3 --enable-parser=mpegaudio --enable-parser=mpeg4video --enable-parser=mpegvideo --enable-protocol=file --enable-protocol=http --enable-protocol=icecast --enable-protocol=pipe --enable-protocol=rtp --enable-protocol=tcp --enable-protocol=udp --enable-decoder=adpcm_ima_wav --enable-decoder=adpcm_ima_qt --enable-decoder=adpcm_ms --enable-libfdk-aac --enable-encoder=libfdk_aac --enable-libmp3lame --enable-encoder=libmp3lame --enable-libopus --enable-decoder=libopus --enable-encoder=libopus --enable-libshine --enable-encoder=libshine --disable-postproc
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswresample   3.  7.100 /  3.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Solution

  • If you pulled the binary and did not compile it by yourself the one who complied the binary might not have set the argument -Dffmpeg=enabled. This results in mpd just ignoring the related part in the config-file.

    (Also there seems to be no use for enabled="yes". It only disables it with "no")