No audio: unknown encoder 'libfdk_aac'
Closed this issue · 2 comments
Describe The Problem:
Using this plugin to pass a local video stream to homekit. Video stream and snapshot work without audio. When "Enable Audio" selected the video stream no longer works (and no audio). Logs below show the error: unknown encoder 'libfdk_aac'. Audio confirmed working using VLC player with local feed. FFmpeg shows libfdk_aac as a supported encoder. There were a few similar issues posted in the past, but I could not find any resolutions.
Does an option need to be enabled for this specific encoder? I cannot find any audio preferences to adjust.
To Reproduce:
Enable audio with the below config.
Logs:
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] Video stream requested: 1280 x 720, 30 fps, 299 kbps
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] Starting video stream: 1280 x 720, 30 fps, 299 kbps (AAC-eld)
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] Stream command: ffmpeg -i rtmp://xxx.xxx.xxx.xxx:xxxx/local/xxxxxx -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 30 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -payload_type 99 -ssrc 16167332 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params gKGQLFrUdIqbOgYZMMKLTVNFFYEDG6vVnJ7BvjN0 srtp://xxx.xxx.xxx.xxx:xxxxx?rtcpport=xxxxx&pkt_size=1316 -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 2280034 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params BVe8IruhQX4TFdPc2mgVtfswTmCXz1vfVtKeYRlv srtp://xxx.xxx.xxx.xxx:xxxxx?rtcpport=xxxxx&pkt_size=188 -loglevel level+verbose -progress pipe:1
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] ffmpeg version 4.1.11-0+deb10u1+rpt1 Copyright (c) 2000-2023 the FFmpeg developers
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] built with gcc 8 (Raspbian 8.3.0-6+rpi1)
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] WARNING: library configuration mismatch
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avutil configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avcodec configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avformat configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avdevice configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avfilter configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] avresample configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] swscale configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] swresample configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] postproc configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavutil 56. 22.100 / 56. 22.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavcodec 58. 35.100 / 58. 35.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavformat 58. 20.100 / 58. 20.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavdevice 58. 5.100 / 58. 5.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavfilter 7. 40.101 / 7. 40.101
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libavresample 4. 0. 0 / 4. 0. 0
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libswscale 5. 3.100 / 5. 3.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libswresample 3. 3.100 / 3. 3.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [info] libpostproc 55. 3.100 / 55. 3.100
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [tcp @ 0x181a8e0] [verbose] Starting connection attempt to xxx.xxx.xxx.xxx port xxxx
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [tcp @ 0x181a8e0] [verbose] Successfully connected to xxx.xxx.xxx.xxx port xxxx
[10/25/2023, 10:21:15 PM] [Camera FFmpeg] [Cam] [h264 @ 0x181ca50] [verbose] Reinit context to 1920x1088, pix_fmt: yuvj420p
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] Input #0, flv, from 'rtmp://xxx.xxx.xxx.xxx:xxxx/local/xxxxxx':
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] Metadata:
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] encoder : Lavf58.20.100
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] Duration: 00:00:00.00, start: 46939.146000, bitrate: N/A
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] Stream #0:0: Video: h264 (Main), 1 reference frame, yuvj420p(pc, bt709, progressive, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 1610 kb/s, 10 fps, 10 tbr, 1k tbn, 20 tbc
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [info] Stream #0:1: Audio: aac (LC), 44100 Hz, mono, fltp, 24 kb/s
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [fatal] Unknown encoder 'libfdk_aac'
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [AVIOContext @ 0x1827820] [verbose] Statistics: 0 seeks, 0 writeouts
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] [AVIOContext @ 0x181c550] [verbose] Statistics: 325834 bytes read, 0 seeks
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] FFmpeg exited with code: 1 and signal: null (Error)
[10/25/2023, 10:21:19 PM] [Camera FFmpeg] [Cam] Stopped video stream.
Homebridge Config:
{
"name": "Camera FFmpeg",
"cameras": [
{
"name": "Cam",
"manufacturer": "",
"model": "",
"serialNumber": "",
"firmwareRevision": "",
"motion": false,
"unbridge": false,
"videoConfig": {
"source": "-i rtmp://xxx.xxx.xxx.xxx:xxxx/local/xxxxxx",
"stillImageSource": "-i rtmp://xxx.xxx.xxx.xxx:xxxx/local/xxxxxx",
"vcodec": "libx264",
"audio": true,
"debug": true
}
}
],
"platform": "Camera-ffmpeg"
}
Screenshots:
n/a
Environment:
- Node.js Version: v18.18.2
- NPM Version: v5.8.0
- Homebridge Version: v1.6.1
- Homebridge Camera FFmpeg Version: v3.1.4
- Homebridge Config UI X Plugin Version: v4.51.0
- Operating System: Raspian
Sounds like you probably didn’t end up with ffmpeg-for-homebridge somehow. I know sometimes reinstalling the plugin has fixed that.
That worked! Thank you and awesome project!