Giter Site home page Giter Site logo

homebridge / ffmpeg-for-homebridge Goto Github PK

View Code? Open in Web Editor NEW
98.0 14.0 10.0 3.38 MB

Static FFmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware-accelerated decoding and encoding (h264_qsv, h264_v4l2m2m, videotoolbox).

Shell 86.14% JavaScript 13.86%
ffmpeg homebridge camera libfdk-aac omx h264-omx homekit multiarch

ffmpeg-for-homebridge's Introduction

Homebridge

Unlocking Door

Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API. It supports Plugins, which are community-contributed modules that provide a basic bridge from HomeKit to various 3rd-party APIs provided by manufacturers of "smart home" devices.

Since Siri supports devices added through HomeKit, this means that with Homebridge you can ask Siri to control devices that don't have any support for HomeKit at all. For instance, using just some of the available plugins, you can say:

  • Siri, unlock the back door. [pictured to the right]
  • Siri, open the garage door.
  • Siri, turn on the coffee maker.
  • Siri, turn on the living room lights.
  • Siri, good morning!

You can explore all available plugins at the NPM website by searching for the keyword homebridge-plugin.

Community

The official Homebridge Discord server and Reddit community are where users can discuss Homebridge and ask for help.

Homebridge Discord Homebridge Reddit

HomeKit communities can also be found on both Discord and Reddit.

Installation

raspbian

Raspberry Pi

Official Homebridge Raspberry Pi Image
Install Homebridge on Raspbian


linux

Linux

Debian or Ubuntu Linux | Red Hat, CentOS or Fedora Linux | Arch / Manjaro Linux|Install Homebridge on Arch Linux


macos

macOS

Install Homebridge on macOS


windows

Windows 10 / 11

Install Homebridge on Windows 10 / 11 Using Hyper V


docker

Docker

Install Homebridge on Docker
Synology | Unraid | QNAP | TrueNAS Scale


docker

Synology DSM

Install Homebridge on Synology DSM 7

Other Platforms

Other Platforms

Adding Homebridge to iOS

  1. Open the Home app on your device.
  2. Tap the Home tab, then tap .
  3. Tap Add Accessory, then scan the QR code shown in the Homebridge UI or your Homebridge logs.

If the bridge does not have any accessories yet, you may receive a message saying Additional Set-up Required, this is ok, as you add plugins they will show up in the Home app without the need to pair again (except for Cameras and TVs).

Cameras and most TV devices are exposed as separate accessories and each needs to be paired separately. See this wiki article for instructions.

Interacting with your Devices

Once your device has been added to HomeKit, you should be able to tell Siri to control your devices. However, realize that Siri is a cloud service, and iOS may need some time to synchronize your device information with iCloud.

One final thing to remember is that Siri will almost always prefer its default phrase handling over HomeKit devices. For instance, if you name your Sonos device "Radio" and try saying "Siri, turn on the Radio" then Siri will probably start playing an iTunes Radio station on your phone. Even if you name it "Sonos" and say "Siri, turn on the Sonos", Siri will probably just launch the Sonos app instead. This is why, for instance, the suggested name for the Sonos accessory is "Speakers".

Plugin Development

The https://developers.homebridge.io website contains the Homebridge API reference, available service and characteristic types, and plugin examples.

The Homebridge Plugin Template project provides a base you can use to create your own platform plugin.

There are many existing plugins you can study; you might start with the Homebridge Example Plugins or a plugin that already implements the device type you need.

When writing your plugin, you'll want Homebridge to load it from your development directory instead of publishing it to npm each time. Run this command inside your plugin project folder so your global installation of Homebridge can discover it:

npm link

You can undo this using the npm unlink command.

Then start Homebridge in debug mode:

homebridge -D

This will start up Homebridge and load your in-development plugin. Note that you can also direct Homebridge to load your configuration from somewhere besides the default ~/.homebridge, for example:

homebridge -D -U ~/.homebridge-dev

This is very useful when you are already using your development machine to host a "real" Homebridge instance (with all your accessories) that you don't want to disturb.

Common Issues

Home App Says Accessory Already Added

To fix this, Reset Homebridge.

My iOS App Can't Find Homebridge

Try the following:

  1. Swap between the Bonjour HAP and Ciao mDNS Advertiser options. See the wiki for more details.
  2. iOS DNS cache has gone stale or gotten misconfigured. To fix this, turn airplane mode on and back off to flush the DNS cache.

Limitations

  • One bridge can only expose 150 accessories due to a HomeKit limit. You can however run your plugins as a Child Bridge or run Multiple Homebridge Instances to get around this limitation.
  • Once an accessory has been added to the Home app, changing its name via Homebridge won't be automatically reflected in iOS. You must change it via the Home app as well.

Why Homebridge?

Technically, the device manufacturers should be the ones implementing the HomeKit API. And I'm sure they will - eventually. When they do, this project will be obsolete, and I hope that happens soon. In the meantime, Homebridge is a fun way to get a taste of the future, for those who just can't bear to wait until "real" HomeKit devices are on the market.

Credit

Homebridge was originally created by Nick Farina.

The original HomeKit API work was done by Khaos Tian in his HAP-NodeJS project.

ffmpeg-for-homebridge's People

Contributors

bwp91 avatar dependabot[bot] avatar donavanbecker avatar hjdhjd avatar oznu avatar sunoo avatar supereg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-for-homebridge's Issues

libfdk_aac is not legally redistributable

Describe The Bug:
libfdk_aac is not legally redistributable with ffmpeg.

To Reproduce:
Run /usr/local/lib/node_modules/homebridge-camera-ui/node_modules/ffmpeg-for-homebridge/ffmpeg -L, or wherever the module is found.

Expected behavior:
Something without the last two lines:

ffmpeg version 5.0.1-5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  configuration: --enable-videotoolbox --enable-nonfree --enable-gpl --enable-openssl --enable-libsvtav1 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxvid --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libsrt --enable-libspeex --disable-debug --disable-doc --disable-shared --enable-pthreads --enable-static --enable-small --enable-version3 --extra-cflags='-I/Users/Shared/ffmpeg-for-homebridge/workspace/include -I/Users/Shared/ffmpeg-for-homebridge/workspace/include/lilv-0' --extra-ldexeflags= --extra-ldflags=-L/Users/Shared/ffmpeg-for-homebridge/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/Users/Shared/ffmpeg-for-homebridge/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/Users/Shared/ffmpeg-for-homebridge/workspace --extra-version=5.0.1
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
This version of ffmpeg has nonfree parts compiled in.
Therefore it is not legally redistributable.

Screenshots:
Use above paste.

Environment:

  • Operating System: macOS, but does it really matter when the whole shtick of this project is fdk?

unable to run ffmpeg on windows 10 - 32 bit

Describe The Bug:
i have downloaded the ffmpeg.exe for windows 10 from your download page but it seems to not supported. I believe it says that it would work on 32 Bit system but when i run it, it says

ffmpeg output:

This version of C:\ffmpeg\bin\ffmpeg.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.

Screenshots:
Capture

Environment:

  • Operating System: Windows 10 Pro - 32 Bit

Support ALSA capture / playback

Is your feature request related to a problem? Please describe:
Currently, when using e.g. a Pi Zero 2 W as a camera, one can not use the ALSA audio interface for the audio capture or backchannel.

e.g. "source": "-f video4linux2 -input_format h264 -video_size 1280x720 -framerate 30 -i /dev/video0 -f alsa -channels 1 -i plughw:1"
or "returnAudioTarget": "-f alsa plughw:1"

fail in that case.

Describe the solution you'd like:
On linux systems, libasound2-dev should be installed prior to compiling ffmpeg, that should compile the ALSA support automatically.

Describe alternatives you've considered:
Compiling ffmpeg myself, which I do but it seems cumbersome.

Additional context:

Update the install package script to use /opt/homebridge/bin/node

Is your feature request related to a problem? Please describe:
Yes, dgreif/ring#1072 - issue due to this project expecting node to be available on the system $PATH but homebridge has isolated/bundled node from the wider system (reasons available here: https://www.reddit.com/r/homebridge/comments/vusfib/homebridge_and_npm_node_locations_on_raspberry_pi/) ... leading to the homebridge-ring plugin failing to install.

Describe the solution you'd like:
Update

"scripts": {
"install": "node install.js"
},

to:

  "scripts": {
    "install": "/opt/homebridge/bin/node install.js"
  },

Describe alternatives you've considered:
It's possible to workaround the issue introduced here by updating ~/.homebridge/package.json and running /opt/homebridge/node npm install inside the ~/.homebridge directory.

Additional context:
Can't think of anything else.

  • Click the "Preview" tab before you submit to ensure the formatting is correct.

ffmpeg for homebridge

Good morning all,

Homebridge is installed on a Nas Synology (previously install on a mac mini and having the same problem).
I managed to connect my first 4 cameras but not my video door entry system: Intercom Fibaro.
My intercom video stream works well on my internet explorer and on VLC.

When I include the intercom in Homebridge, it returns to me: "ERROR: FFmpeg exited with code 1"

Here is the config files :
{
"name": "Portail",
"videoConfig": {
"source": "-re -f mjpeg -i http://login:[email protected]:1111/live/mjpeg",
"stillImageSource": "-i http://login:[email protected]:1111/live/jpeg",
"maxStreams": 1,
"maxWidth": 720,
"maxHeight": 576,
"maxFPS": 30,
"vcodec": "h264",
"audio": true,
"debug": true
}

Here is the debug file:

Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url http://Login:[email protected]:1111/live/mjpeg.
Applying option re (read input at native frame rate) with argument 1.
Applying option f (force format) with argument mjpeg.
Successfully parsed a group of options.
Opening an input file: http://Login:[email protected]:1111/live/mjpeg.

[mjpeg @ 0x7efc56f1c140] Opening 'http://Login:[email protected]:1111/live/mjpeg' for reading

[http @ 0x7efc56f1cac0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy,data'

[tcp @ 0x7efc56f1cf40] Original list of addresses:
[tcp @ 0x7efc56f1cf40] Address 192.168.0.111 port 1111
[tcp @ 0x7efc56f1cf40] Interleaved list of addresses:
[tcp @ 0x7efc56f1cf40] Address 192.168.0.111 port 1111
[tcp @ 0x7efc56f1cf40] Starting connection attempt to 192.168.0.111 port 1111

[tcp @ 0x7efc56f1cf40] Successfully connected to 192.168.0.111 port 1111

[http @ 0x7efc56f1cac0] request: GET /live/mjpeg HTTP/1.1
User-Agent: Lavf/58.38.100
Accept: /
Range: bytes=0-
Connection: close
Host: 192.168.0.111:1111
Icy-MetaData: 1

http://Login:[email protected]:1111/live/mjpeg: End of file

[4/19/2020, 3:56:10 PM] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1

Running Suggested command on macOS Catalina has hosed sudo

While attempting to install using the command suggested, my machine (Mac mini running 10.15.7 of macOS Catalina), the curl command hung, and when I attempted to control^c out of it, nothing happened. Had to kill my terminal session, and since, I have not been able to run any sudo commands...anything sudo related just hangs...

Any thoughts?

sudo curl -Lf# https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-darwin-x86_64.tar.gz | sudo tar xzfm - -C / --no-same-owner

Support for raspbian like os

Iโ€˜m using raspbian like os named OSMC. Can you take more os names in the install.js? This because without the extension the install process will download ffmpeg without omx support.
Line 53 of install.js has to look like:
if (osReleaseEnv.ID === โ€˜raspbianโ€˜ || osReleaseEnv.ID === โ€˜OSMCโ€˜) {

The /etc/os-releases of OSMC looks like:
ID=OSMC

Thanks

ffmpeg results in segmentation fault

Describe The Bug:
I have a raspberry pi zero W with 8GB micro SD card, and I installed it with official home bridge OS image.
When I type any command related to ffmpeg, it shows segmentation fault. such as ffmpeg -version.
memory still has about 100MB free space. I have installed the ffmpeg by using sudo apt

To Reproduce:
ffmpeg -version

Expected behavior:
show version

ffmpeg output:
segmentation fault

Run `ffmpeg` in a terminal window and post the output below

Screenshots:

Screenshot 2024-01-21 at 13 35 37

Environment:

  • Operating System:
Screenshot 2024-01-21 at 13 37 04

Install issues on macOS Sonoma

Describe The Bug:
Install ffmpeg via terminal for macOS Sonoma per documentation:

sudo curl -Lf# https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-darwin-$(uname -m).tar.gz | sudo tar xzfm - -C / --no-same-owner

To Reproduce:
Check ffmpeg install status with terminal command ffmpeg

Expected behavior:
Return ffmpeg version info

ffmpeg output:

dyld[2552]: Library not loaded: /usr/local/opt/libxcb/lib/libxcb.1.dylib
  Referenced from: <*****> /usr/local/bin/ffmpeg
  Reason: tried: '/usr/local/opt/libxcb/lib/libxcb.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/libxcb/lib/libxcb.1.dylib' (no such file), '/usr/local/opt/libxcb/lib/libxcb.1.dylib' (no such file), '/usr/local/lib/libxcb.1.dylib' (no such file), '/usr/lib/libxcb.1.dylib' (no such file, not in dyld cache)
zsh: abort      ffmpeg

Environment:
Intel Mac Mini 2018

Operating System:
macOS Sonoma 14.0

ffmpeg killed with signal ILL

Describe The Bug:
Cannot start stream on home app, snapshot are available, ffmpeg output to .mp4 in raspberry works but when streaming got error in ffmpeg. Already consulted in plugin repo's. Seems to be a problem with ffmpeg for homebridge

To Reproduce:
Open Home APP
Open Camera Tile
Keeps on loading, and in home bridge logs, shows SIGILL

Expected behavior:
Supposed to stream to ios device

ffmpeg output:

ffmpeg version 4.1.6-1~deb10u1+rpt1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --prefix=/usr --extra-version='1~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-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Latest Log from Homebridge

[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Starting Front Porch video stream (1280x720, 10 fps, 299 kbps, 1316 mtu)... debug enabled
[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Front Porch command: ffmpeg -rtsp_transport udp -v verbose -i rtsp://user:[email protected]:554/onvif2 -map 0:0 -vcodec h264 -pix_fmt yuv420p -r 10 -f rawvideo -preset ultrafast -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 15290808 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params uuid srtp://192.168.1.x:60881?rtcpport=60881&localrtcpport=60881&pkt_size=1316 -map 0:0 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 5874408 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params uuid srtp://192.168.1.x:58366?rtcpport=58366&localrtcpport=58366&pkt_size=188 -loglevel level+verbose
[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Front Porch: [info] 
[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Front Porch: ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers
[info]   built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
[info]   configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal --enable-indev=alsa --enable-outdev=alsa
[info]   libavutil      56. 31.100 / 56. 31.100
[info]   libavcodec     58. 54.100 / 58. 54.100
[info]   libavformat    58. 29.100 / 58. 29.100
[info]   libavdevice    58.  8.100 / 58.  8.100
[info]   libavfilter     7. 57.100 /  7. 57.100
[info]   libswscale      5.  5.100 /  5.  5.100
[info]   libswresample   3.  5.100 /  3.  5.100
[info]   libpostproc    55.  5.100 / 55.  5.100

[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Front Porch: [tcp @ 0x2bf1310] 
[7/22/2020, 12:28:10 AM] [Camera-ffmpeg] Front Porch: [verbose] Starting connection attempt to 192.168.1.201 port 554

[7/22/2020, 12:28:11 AM] [Camera-ffmpeg] Front Porch: [tcp @ 0x2bf1310] [verbose] Successfully connected to 192.168.1.201 port 554

[7/22/2020, 12:28:13 AM] [Camera-ffmpeg] Front Porch: [rtsp @ 0x2bef2f0] 
[7/22/2020, 12:28:13 AM] [Camera-ffmpeg] Front Porch: [verbose] SDP:
v=0
o=- 1421069297525233 1 IN IP4 192.168.1.201
s=H.264 Video, RtspServer_0.0.0.2
t=0 0
a=tool:RtspServer_0.0.0.2
a=type:broadcast
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42001F;sprop-parameter-sets=Z0IAH5WoFAFuQA==,aM48gA==
a=control:track1


[7/22/2020, 12:28:13 AM] [Camera-ffmpeg] Front Porch: [rtsp @ 0x2bef2f0] 
[7/22/2020, 12:28:13 AM] [Camera-ffmpeg] Front Porch: [verbose] setting jitter buffer size to 500

[7/22/2020, 12:28:15 AM] [Camera-ffmpeg] Front Porch: [h264 @ 0x2bf26e0] 
[7/22/2020, 12:28:15 AM] [Camera-ffmpeg] Front Porch: [verbose] Reinit context to 320x192, pix_fmt: yuv420p

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [info] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: Input #0, rtsp, from 'rtsp://admin:[email protected]:554/onvif2':
[info]   Metadata:
[info]     title           : H.264 Video, RtspServer_0.0.0.2
[info]   Duration: N/A, start: 0.067000, bitrate: N/A
[info]     Stream #0:0: Video: h264 (Baseline), 1 reference frame, yuv420p(progressive, left), 320x192, 15 tbr, 90k tbn, 180k tbc
[verbose] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: Matched encoder 'libx264' for codec 'h264'.

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [warning] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: Codec AVOption b (set bitrate (in bits/s)) specified for output file #1 (srtp://192.168.1.106:58366?rtcpport=58366&localrtcpport=58366&pkt_size=188) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [warning] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: Codec AVOption profile () specified for output file #1 (srtp://192.168.1.106:58366?rtcpport=58366&localrtcpport=58366&pkt_size=188) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [info] Stream mapping:
[info]   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
[info]   Stream #0:0 -> #1:0 (h264 (native) -> mpeg4 (native))
[info] Press [q] to stop, [?] for help

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [h264 @ 0x2cc9320] [verbose] Reinit context to 320x192, pix_fmt: yuv420p

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [Parsed_scale_0 @ 0x2c298a0] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [verbose] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: w:1280 h:720 flags:'bicubic' interl:0
[graph 0 input from stream 0:0 @ 0x2c9be50] [verbose] w:320 h:192 pixfmt:yuv420p tb:1/90000 fr:15/1 sar:0/1 sws_param:flags=2

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [Parsed_scale_0 @ 0x2c298a0] 
[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] Front Porch: [verbose] w:320 h:192 fmt:yuv420p sar:0/1 -> w:1280 h:720 fmt:yuv420p sar:0/1 flags:0x4

[7/22/2020, 12:28:17 AM] [Camera-ffmpeg] [Front Porch] ffmpeg exited with code: null and signal: SIGILL (Unexpected)

Screenshots:

Environment:

  • Operating System: Raspbian
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

NPM Package for importing static binaries

Is your feature request related to a problem? Please describe:

Users are currently required to install the correct version of the binary for the platform they are on. This leaves a lot of room for user error, and confusion around where the binary should be placed after it's on their computer.

Describe the solution you'd like:

An npm package that could be pulled into any homebridge project and would use the correct binary based on the current platform. This already exists in the form of https://github.com/eugeneware/ffmpeg-static, but their binaries don't include libfdk_aac, which is the main reason my users need ffmpeg.

Describe alternatives you've considered:

I could copy the binaries into homebridge-ring, but that would make them a lot less maintainable. I really appreciate that you created this project, and would simply like to leverage the work you have already done to make it super easy for users.

libmvec.so.1: cannot open shared object file

Describe The Bug:

When installing another package that depends on ffmpeg-for-homebridge I get the following error:

~/.npm# npm -g update homebridge-nest-cam2 --unsafe-perm

> [email protected] install /usr/lib/node_modules/homebridge-nest-cam2/node_modules/ffmpeg-for-homebridge
> node install.js

Downloading ffmpeg from https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-x86_64.tar.gz
100% - Download Complete
/root/.npm/_ffmpeg_for_homebridge/ffmpeg: error while loading shared libraries: libmvec.so.1: cannot open shared object file: No such file or directory
An error occured while testing the downloaded ffmpeg binary.

Apparently libmvec was introduced with in glibc 2.22, and my version of Debian goes up to 2.19.

Operating System:

Distributor ID: Debian
Description: Debian GNU/Linux 8.11 (jessie)
Release: 8.11
Codename: jessie

Upgrade scheduled or plans to fix ffmpeg issues with Pi5 in a future release?

Are there plans to provide a fix for Pi5? "Raspberry Pi 5 is currently unsupported. There are multiple known issues that will be addressed in a future release."

Pi5 doesn't have the hardware decode block for H264 (only for HEVC). h264_v4l2m2m therefore has nothing to run on.

Describe the solution you'd like:
Finding or coding a workaround for ffmpeg to use HEVC

Describe alternatives you've considered:
ffmpeg should use hevc_v4l2m2m hardware decoding

SIGILL on BCM2835 Raspberry Pis

Describe The Bug:
Iโ€™ve now had a few users reporting that theyโ€™re getting SIGILL from this version of FFmpeg when running on a BCM2835-equipped Raspberry Pi (reported on 1B+, Zero, and Zero W). The version available from apt works correctly (though obviously without sound support).

To Reproduce:
Try to decode video using this version of FFmpeg on one of the impacted models.

Expected behavior:
No SIGILL.

ffmpeg output:
An example with a Pi 1B+: Sunoo/homebridge-camera-ffmpeg#679
Another example with a Pi Zero: Debug.txt

Environment:

  • Operating System: Raspbian

I believe I have a Zero W around somewhere, so I may take a crack at figuring this out myself later if I have time.

Add support for Apple Silicon

Is your feature request related to a problem? Please describe:
I'm running homebridge on an Apple silicon Mac mini. Its architecture is arm64. The package works when homebridge is running in Rosetta on Node.js 14, but doesn't work in Node.js 16 running natively on Apple silicon because that architecture is not supported.

Describe the solution you'd like:
Build a package for Mac arm64 and add arm64 to the supported architecture list.

Describe alternatives you've considered:
I tried building ffmpeg-for-homebridge from a recent pull request that adds Apple silicon support but ran into errors compiling. Though I must admit, I'm new to compiling and could be missing something.

Support for Alsa as sound input

Is your feature request related to a problem? Please describe:
Iโ€™m using internal sound device as sound input for homebridge-camera-ffmpeg. I canโ€™t use your ffmpeg build, because it does not support Alsa as input sound device.
Here is the configuration Iโ€™m using :

-use_wallclock_as_timestamps 1 -thread_queue_size 512 -re -r 6 -s 1280x720 -f video4linux2 -i /dev/video0 -f alsa -i default:CARD=Device

Describe the solution you'd like:
Include Alsa in build options

Describe alternatives you've considered:
Iโ€™m using my own compiled version of ffmpeg with Alsa included.
Maybe there is an other option to use internal sound device without using Alsa that I donโ€™t know. Feel free to tell me!

Additional context:

Possible install issue on Apple Silicon

Describe The Bug:
Hey, I noted the install bug in v0.0.11 , after a few users reported issues with my plugin I upgraded the dependency to v0.1.0 but still a bunch of users are having the same issue, everything installs but binary never does. Im having trouble getting clear reports but essentially when my plugin goes to use the binary, its not there. They have tried installing with UI and CLI. If youre curious heres the thread: homebridge-simplisafe3/homebridge-simplisafe3#334 .

To Reproduce:
I cant test myself, users are installing on M1 macs

Expected behavior:
Plugin dependency installs and pulls ffmpeg binary

install output:

node install.js downloading ffmpeg from https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg -darwin-x86_64. tar. gz
Download Complete yld(57041]: Library not loaded: /usr/local/opt/libx11/lib/libX11.6.dylib 
Referenced from: /Users/blandgren/.npm/_ffmpeg_for_homebridge/ffmpeg 
Reason: tried: '/usr/local/opt/libx11/lib/libX11.6.dylib' (no such file), '/usr/local/lib/libX11.6.dylib' (no such file), '/usr/lib/libX11.6.dylib' (no such file)

Screenshots:

Environment:

  • Both users are on M1 macs, though I thought that is supported. One user does report was previously working with earlier version of package.

Thanks for the plugin, its been great overall.

Edit: updated to reflect that I think this is related to Apple Silicon installs

Latest binary segfaults on execute on Raspberry Pi 5

Describe The Bug:
When using the latest binary (2.1.1) for ffmpeg it segfaults on a Pi 5 running Raspbian (bookworm), even when running basic -version commands.

To Reproduce:
Execute the binary on Raspberry Pi 5

Expected behavior:
No segfault.

ffmpeg output:
Segmentation fault

Environment:

  • Operating System:
    cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian

Dropped support for High Sierra?

Describe The Bug:
Latest version no longer supports High Sierra?

To Reproduce:
Install from high Sierra machine (came with dependency with homebridge-ring)

Expected behavior:
Expected it to continue to install, is there a technician limitation that showed up?

ffmpeg output:

Wonโ€™t install on High Sierra
Screenshots:

Environment:

  • Operating System: macOS High Sierra

Update to FFmpeg 6.1.1

Describe the solution you'd like:
Can you update ffmpeg-for-homebridge to use FFMpeg 6.1.1? This version has significant number of changes including support for many more video codecs, an apparent reduction in the binary size, and support for multi-threading using the ffmpeg cli. These could have significant benefits for Homebridge users.

Additional context:
This is likely the last release before FFmpeg 7.0 is released so could tide this project over for a while until FFmpeg 7.x is stable and tested for Homebridge.

No HW acceleration with ffmpeg-for-homebridge but ok with ubuntu ffmpeg

Describe The Bug:

I'am in docker on Synology DS218+ with home bridge docker. I use homebrige unifi protect plugin, no problem with it. My issue is with hardware acceleration.

If I install ffmpeg (apt install ffmpeg) no problem hardware acceleration work but this ffmpeg version (4.X) is to old and unifi protect plugin don't work.

So I moved to ffmpeg-for-hombridge, it's work but without HW acceleration (on same docker)

To Reproduce:

Install homebridge docker on Synology than install ffmpeg-for-homebridge and try to use ffmpeg with hw acceleration
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -t 1 -f lavfi -i color=black:1920x1080 -c:v libx264 -f null -, I got :

ffmpeg -hwaccel vaapi -t  1 -f lavfi -i color=black:1920x
1080 -c:v libx264 -f null -                                                      
ffmpeg version 6.0-homebridge-alpine-x86_64-static Copyright (c) 2000-2023 the FF
mpeg developers                                                                  
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924                 
  configuration: --enable-hardcoded-tables --enable-nonfree --enable-gpl --enable
-hardcoded-tables --enable-hardcoded-tables --enable-openssl --enable-libdav1d --
enable-libsvtav1 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxv
id --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-lib
opencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --
enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable
-libsrt --enable-libvpl --enable-vaapi --disable-ffnvcodec --enable-amf --disable
-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --ext
ra-cflags='-I/build/workspace/include -I/build/workspace/include/lilv-0' --extra-
ldexeflags=-static --extra-ldflags=-L/build/workspace/lib --extra-libs='-ldl -lpt
hread -lm -lz' --pkgconfigdir=/build/workspace/lib/pkgconfig --pkg-config-flags=-
-static --prefix=/build/workspace --extra-version=homebridge-alpine-x86_64-static
  libavutil      58.  2.100 / 58.  2.100                                         
  libavcodec     60.  3.100 / 60.  3.100                                         
  libavformat    60.  3.100 / 60.  3.100                                         
  libavdevice    60.  1.100 / 60.  1.100                                         
  libavfilter     9.  3.100 /  9.  3.100                                         
  libswscale      7.  1.100 /  7.  1.100                                         
  libswresample   4. 10.100 /  4. 10.100                                         
  libpostproc    57.  1.100 / 57.  1.100                                         
Input #0, lavfi, from 'color=black:1920x1080':                                   
  Duration: N/A, start: 0.000000, bitrate: N/A                                   
  Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 
fps, 25 tbr, 25 tbn                                                              
[AVHWDeviceContext @ 0x7f70d285fb00] No VA display found for any default device. 
Device creation failed: -22.                                                     
No device available for decoder: device type vaapi needed for codec wrapped_avfra
me.                                                                              
Stream mapping:                                                                  
  Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (libx264))               
Device setup failed for decoder on input stream #0:0 : Invalid argument

Expected behavior:

I expect ffmpeg work without error, with built-in ubuntu ffmpeg :

/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/r
enderD128 -t  1 -f lavfi -i color=black:1920x1080 -c:v libx264 -f null -         
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg develope
rs                                                                               
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)                                    
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=harde
ned --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --a
rch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enab
le-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-li
bfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-lib
gsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg 
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --ena
ble-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-
libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei
0r --enable-libx264 --enable-shared                                              
  libavutil      56. 70.100 / 56. 70.100                                         
  libavcodec     58.134.100 / 58.134.100                                         
  libavformat    58. 76.100 / 58. 76.100                                         
  libavdevice    58. 13.100 / 58. 13.100                                         
  libavfilter     7.110.100 /  7.110.100                                         
  libswscale      5.  9.100 /  5.  9.100                                         
  libswresample   3.  9.100 /  3.  9.100                                         
  libpostproc    55.  9.100 / 55.  9.100                                         
Input #0, lavfi, from 'color=black:1920x1080':                                   
  Duration: N/A, start: 0.000000, bitrate: N/A                                   
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 D
AR 16:9], 25 tbr, 25 tbn, 25 tbc                                                 
Stream mapping:                                                                  
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))                      
Press [q] to stop, [?] for help                                                  
[libx264 @ 0x55a895c59140] using SAR=1/1                                         
[libx264 @ 0x55a895c59140] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2    
[libx264 @ 0x55a895c59140] profile High, level 4.0, 4:2:0, 8-bit      
Output #0, null, to 'pipe:':                                                     
  Metadata:                                                                      
    encoder         : Lavf58.76.100                                              
  Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q
=2-31, 25 fps, 25 tbn                                                            
    Metadata:                                                                    
      encoder         : Lavc58.134.100 libx264                                   
    Side data:                                                                   
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A              
frame=   25 fps= 22 q=-1.0 Lsize=N/A time=00:00:00.92 bitrate=N/A speed=0.813x
video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing over
head: unknown                                                                    
[libx264 @ 0x55a895c59140] frame I:1     Avg QP: 9.00  size:  1158               
[libx264 @ 0x55a895c59140] frame P:6     Avg QP:10.17  size:    76               
[libx264 @ 0x55a895c59140] frame B:18    Avg QP:12.67  size:    69               
[libx264 @ 0x55a895c59140] consecutive B-frames:  4.0%  0.0%  0.0% 96.0%         
[libx264 @ 0x55a895c59140] mb I  I16..4: 100.0%  0.0%  0.0%                      
[libx264 @ 0x55a895c59140] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  
0.0%  0.0%  0.0%    skip:100.0%                                                  
[libx264 @ 0x55a895c59140] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  
0.0%  direct: 0.0%  skip:100.0%                                                  
[libx264 @ 0x55a895c59140] 8x8 transform intra:0.0%                              
[libx264 @ 0x55a895c59140] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.
0% 0.0%                                                                          
[libx264 @ 0x55a895c59140] i16 v,h,dc,p: 99%  0%  1%  0%                         
[libx264 @ 0x55a895c59140] i8c dc,h,v,p: 100%  0%  0%  0%                        
[libx264 @ 0x55a895c59140] Weighted P-Frames: Y:0.0% UV:0.0%                     
[libx264 @ 0x55a895c59140] kb/s:22.78      

ffmpeg output:

ffmpeg version 6.0-homebridge-alpine-x86_64-static Copyright (c) 2000-2023 the FF
mpeg developers                                                                  
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924                 
  configuration: --enable-hardcoded-tables --enable-nonfree --enable-gpl --enable
-hardcoded-tables --enable-hardcoded-tables --enable-openssl --enable-libdav1d --
enable-libsvtav1 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxv
id --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-lib
opencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --
enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable
-libsrt --enable-libvpl --enable-vaapi --disable-ffnvcodec --enable-amf --disable
-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --ext
ra-cflags='-I/build/workspace/include -I/build/workspace/include/lilv-0' --extra-
ldexeflags=-static --extra-ldflags=-L/build/workspace/lib --extra-libs='-ldl -lpt
hread -lm -lz' --pkgconfigdir=/build/workspace/lib/pkgconfig --pkg-config-flags=-
-static --prefix=/build/workspace --extra-version=homebridge-alpine-x86_64-static
  libavutil      58.  2.100 / 58.  2.100                                         
  libavcodec     60.  3.100 / 60.  3.100                                         
  libavformat    60.  3.100 / 60.  3.100                                         
  libavdevice    60.  1.100 / 60.  1.100                                         
  libavfilter     9.  3.100 /  9.  3.100                                         
  libswscale      7.  1.100 /  7.  1.100                                         
  libswresample   4. 10.100 /  4. 10.100                                         
  libpostproc    57.  1.100 / 57.  1.100                                         
Hyper fast Audio and Video encoder                                               
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfil
e}...                                                                            
                                                                                 
Use -h to get full help or, even better, run 'man ffmpeg' 

Environment:

  • Operating System: Docker on synology

Request: Include libspeex codec

Describe The Bug:
Nestcam plugin error in homebrige : missing libspeex codec

To Reproduce:
Install ffmpeg-for-homebridge make Nest-cam pluggin work (prior error was saying FFMEG is missing).
Camera stream is visible but I can't send audio to the camera via iPhone microphone.
Error show in RED in log : This version of FFMPEG does not support the audio codec 'libspeex'. You may need to recompile FFMPEG using '--enable-libspeex' and restart homebridge.

Expected behavior:
Working bidirectionnal audio

ffmpeg output:

ffmpeg -version
ffmpeg version 6.0-homebridge-alpine-armv7l-static Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924
configuration: --enable-hardcoded-tables --enable-nonfree --enable-gpl --enable-hardcoded-tables --enable-hardcoded-tables --enable-openssl --enable-libdav1d --enable-libsvtav1 --enable-libx264 --enable-libxvid --enable-libvidstab --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable-libsrt --disable-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --extra-cflags='-I/build/workspace/include -I/build/workspace/include/lilv-0' --extra-ldexeflags=-static --extra-ldflags=-L/build/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/build/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/build/workspace --extra-version=homebridge-alpine-armv7l-static
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100

Screenshots:
Sans titre 2

Environment:

  • Operating System: cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=raspbian
    ID_LIKE=debian
  • Homebridge version: 1.7.0
  • Node.js version: v20.11.0

Direct installation for the target platform

Hello

Is there a way to install the package for the target platform using cross-compilation? In OpenWRT, I create my own IMG and I need to prepare it, so all installation takes place outside the target platform. Is it possible to download the ARM version on the x86 platform?

Add support for i386

Is your feature request related to a problem? Please describe:
I'm running my homebridge on a old Intel Edison board. Its architecture is not the common x86_64 but i386. The package doesn't work in i386 becaues that architecture is not supported.

Describe the solution you'd like:
Build a package for i386 and add i386 to the supported architecture list.

Describe alternatives you've considered:
I considered building ffmpeg when building my docker image. But it makes rebuilding the image really slow. So I think it would be nice to add it to this package and make it work for everyone else who is also running Homebridge on old devies.

Additional context:
I'd like to help or work on it if the maintainer can give me some guidance.

Audio capture is not working with armv6 build

Describe The Bug:
Starting a capture using the released binary, audio recording is not possible using ALSA because of some file location error. Other binaries work fine (like ones from https://johnvansickle.com/ffmpeg/). I wanted to use this one for testing OMX support.

...
ALSA lib conf.c:4081:(snd_config_update_r) Cannot access file /build/workspace/share/alsa/alsa.conf
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hw:0
[alsa @ 0x3471200] cannot open audio device hw:0 (No such file or directory)
hw:0: Input/output error

To Reproduce:
Start ffmpeg with command line containing eg. -f alsa -i hw:1.

Expected behavior:
Capture starts without issues.

ffmpeg output:

ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-omx-rpi --enable-mmal --enable-indev=alsa --enable-outdev=alsa
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Screenshots:

Environment:

  • Operating System: Raspbian Buster 10.4

A direct audio recording leverage of the integrated ffmpeg seems to yield some bizarre segmentation faults.

Describe The Problem:
The current integrated ffmpeg version would yield a segmentation fault when gathering audio from raspberry pi usb hw, while the ffmpeg that comes with the system works fine.

This would bring audio problems in camera streaming.
Package Integrated:

 โšก root@raspberrypi ๎‚ฐ ~ ๎‚ฐ /var/lib/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -f alsa -ac 1 -ar 44100 -i plughw:CARD=C170,DEV=0 opt.wav
ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
[1]    11942 segmentation fault   -f alsa -ac 1 -ar 44100 -i plughw:CARD=C170,DEV=0 opt.wav

System Default

 โšก root@raspberrypi ๎‚ฐ ~ ๎‚ฐ ffmpeg -f alsa -ac 1 -ar 44100 -i plughw:CARD=C170,DEV=0 opt.wav
ffmpeg version 4.3.4-0+deb11u1+rpt2 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1+rpt2 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --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-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --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-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  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
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, alsa, from 'plughw:CARD=C170,DEV=0':
  Duration: N/A, start: 1658839712.663060, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'opt.wav':
  Metadata:
    ISFT            : Lavf58.45.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
    Metadata:
      encoder         : Lavc58.91.100 pcm_s16le
size=     316kB time=00:00:03.66 bitrate= 705.7kbits/s speed=0.998x
video:0kB audio:316kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024126%
Exiting normally, received signal 2.

To Reproduce:
Run the following command:

/var/lib/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg -f alsa -ac 1 -ar 44100 -i plughw:CARD=C170,DEV=0 opt.wav

Logs:
And as we can see, there's few encoding support in the integrated ffmpeg

 โšก root@raspberrypi ๎‚ฐ ~ ๎‚ฐ ldd /var/lib/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg
	linux-vdso.so.1 (0x0000007fb30c1000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007fb0d99000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fb0d85000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fb0d54000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007fb0d2a000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fb0bb4000)
	/lib/ld-linux-aarch64.so.1 (0x0000007fb3091000)
 โšก root@raspberrypi ๎‚ฐ ~ ๎‚ฐ ldd /usr/bin/ffmpeg
	linux-vdso.so.1 (0x0000007fbc24e000)
	libavdevice.so.58 => /lib/aarch64-linux-gnu/libavdevice.so.58 (0x0000007fbc172000)
	libavfilter.so.7 => /lib/aarch64-linux-gnu/libavfilter.so.7 (0x0000007fbbdad000)
	libavformat.so.58 => /lib/aarch64-linux-gnu/libavformat.so.58 (0x0000007fbbb1c000)
	libavcodec.so.58 => /lib/aarch64-linux-gnu/libavcodec.so.58 (0x0000007fba794000)
	libavresample.so.4 => /lib/aarch64-linux-gnu/libavresample.so.4 (0x0000007fba76f000)
	libpostproc.so.55 => /lib/aarch64-linux-gnu/libpostproc.so.55 (0x0000007fba753000)
	libswresample.so.3 => /lib/aarch64-linux-gnu/libswresample.so.3 (0x0000007fba72b000)
	libswscale.so.5 => /lib/aarch64-linux-gnu/libswscale.so.5 (0x0000007fba6a8000)
	libavutil.so.56 => /lib/aarch64-linux-gnu/libavutil.so.56 (0x0000007fba3e9000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007fba33e000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fba30d000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fba197000)
	/lib/ld-linux-aarch64.so.1 (0x0000007fbc21e000)
	libraw1394.so.11 => /lib/aarch64-linux-gnu/libraw1394.so.11 (0x0000007fba177000)
	libavc1394.so.0 => /lib/aarch64-linux-gnu/libavc1394.so.0 (0x0000007fba162000)
	librom1394.so.0 => /lib/aarch64-linux-gnu/librom1394.so.0 (0x0000007fba14e000)
	libiec61883.so.0 => /lib/aarch64-linux-gnu/libiec61883.so.0 (0x0000007fba131000)
	libjack.so.0 => /lib/aarch64-linux-gnu/libjack.so.0 (0x0000007fba0cd000)
	libopenal.so.1 => /lib/aarch64-linux-gnu/libopenal.so.1 (0x0000007fb9fd7000)
	libxcb.so.1 => /lib/aarch64-linux-gnu/libxcb.so.1 (0x0000007fb9f9f000)
	libxcb-shm.so.0 => /lib/aarch64-linux-gnu/libxcb-shm.so.0 (0x0000007fb9f8b000)
	libxcb-shape.so.0 => /lib/aarch64-linux-gnu/libxcb-shape.so.0 (0x0000007fb9f77000)
	libxcb-xfixes.so.0 => /lib/aarch64-linux-gnu/libxcb-xfixes.so.0 (0x0000007fb9f5f000)
	libcdio_paranoia.so.2 => /lib/aarch64-linux-gnu/libcdio_paranoia.so.2 (0x0000007fb9f47000)
	libcdio_cdda.so.2 => /lib/aarch64-linux-gnu/libcdio_cdda.so.2 (0x0000007fb9f2f000)
	libdc1394.so.25 => /lib/aarch64-linux-gnu/libdc1394.so.25 (0x0000007fb9ea7000)
	libasound.so.2 => /lib/aarch64-linux-gnu/libasound.so.2 (0x0000007fb9d9a000)
	libcaca.so.0 => /lib/aarch64-linux-gnu/libcaca.so.0 (0x0000007fb9cc3000)
	libGL.so.1 => /lib/aarch64-linux-gnu/libGL.so.1 (0x0000007fb9bcc000)
	libpulse.so.0 => /lib/aarch64-linux-gnu/libpulse.so.0 (0x0000007fb9b6f000)
	libSDL2-2.0.so.0 => /lib/aarch64-linux-gnu/libSDL2-2.0.so.0 (0x0000007fb99dd000)
	libsndio.so.7.0 => /lib/aarch64-linux-gnu/libsndio.so.7.0 (0x0000007fb99bc000)
	libdrm.so.2 => /lib/aarch64-linux-gnu/libdrm.so.2 (0x0000007fb9999000)
	libepoxy.so.0 => /lib/aarch64-linux-gnu/libepoxy.so.0 (0x0000007fb9843000)
	libXv.so.1 => /lib/aarch64-linux-gnu/libXv.so.1 (0x0000007fb982e000)
	libX11.so.6 => /lib/aarch64-linux-gnu/libX11.so.6 (0x0000007fb96e1000)
	libXext.so.6 => /lib/aarch64-linux-gnu/libXext.so.6 (0x0000007fb96bb000)
	libpocketsphinx.so.3 => /lib/aarch64-linux-gnu/libpocketsphinx.so.3 (0x0000007fb9663000)
	libsphinxbase.so.3 => /lib/aarch64-linux-gnu/libsphinxbase.so.3 (0x0000007fb960f000)
	libbs2b.so.0 => /lib/aarch64-linux-gnu/libbs2b.so.0 (0x0000007fb95fa000)
	liblilv-0.so.0 => /lib/aarch64-linux-gnu/liblilv-0.so.0 (0x0000007fb95cf000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fb95b9000)
	librubberband.so.2 => /lib/aarch64-linux-gnu/librubberband.so.2 (0x0000007fb9573000)
	libmysofa.so.1 => /lib/aarch64-linux-gnu/libmysofa.so.1 (0x0000007fb9555000)
	libflite_cmu_us_awb.so.1 => /lib/aarch64-linux-gnu/libflite_cmu_us_awb.so.1 (0x0000007fb9186000)
	libflite_cmu_us_kal.so.1 => /lib/aarch64-linux-gnu/libflite_cmu_us_kal.so.1 (0x0000007fb9012000)
	libflite_cmu_us_kal16.so.1 => /lib/aarch64-linux-gnu/libflite_cmu_us_kal16.so.1 (0x0000007fb8c28000)
	libflite_cmu_us_rms.so.1 => /lib/aarch64-linux-gnu/libflite_cmu_us_rms.so.1 (0x0000007fb87bf000)
	libflite_cmu_us_slt.so.1 => /lib/aarch64-linux-gnu/libflite_cmu_us_slt.so.1 (0x0000007fb83ef000)
	libflite.so.1 => /lib/aarch64-linux-gnu/libflite.so.1 (0x0000007fb83a2000)
	libfribidi.so.0 => /lib/aarch64-linux-gnu/libfribidi.so.0 (0x0000007fb8377000)
	libass.so.9 => /lib/aarch64-linux-gnu/libass.so.9 (0x0000007fb833c000)
	libva.so.2 => /lib/aarch64-linux-gnu/libva.so.2 (0x0000007fb82ff000)
	libvidstab.so.1.1 => /lib/aarch64-linux-gnu/libvidstab.so.1.1 (0x0000007fb82dc000)
	libzmq.so.5 => /lib/aarch64-linux-gnu/libzmq.so.5 (0x0000007fb8215000)
	libOpenCL.so.1 => /lib/aarch64-linux-gnu/libOpenCL.so.1 (0x0000007fb81f6000)
	libfontconfig.so.1 => /lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000007fb81a1000)
	libfreetype.so.6 => /lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000007fb80dc000)
	libxml2.so.2 => /lib/aarch64-linux-gnu/libxml2.so.2 (0x0000007fb7f2d000)
	libbz2.so.1.0 => /lib/aarch64-linux-gnu/libbz2.so.1.0 (0x0000007fb7f0c000)
	libgme.so.0 => /lib/aarch64-linux-gnu/libgme.so.0 (0x0000007fb7eb5000)
	libopenmpt.so.0 => /lib/aarch64-linux-gnu/libopenmpt.so.0 (0x0000007fb7ce3000)
	libchromaprint.so.1 => /lib/aarch64-linux-gnu/libchromaprint.so.1 (0x0000007fb7cc1000)
	libbluray.so.2 => /lib/aarch64-linux-gnu/libbluray.so.2 (0x0000007fb7c67000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007fb7c3d000)
	libgnutls.so.30 => /lib/aarch64-linux-gnu/libgnutls.so.30 (0x0000007fb7a1d000)
	librabbitmq.so.4 => /lib/aarch64-linux-gnu/librabbitmq.so.4 (0x0000007fb79f7000)
	libsrt-gnutls.so.1.4 => /lib/aarch64-linux-gnu/libsrt-gnutls.so.1.4 (0x0000007fb7939000)
	libssh-gcrypt.so.4 => /lib/aarch64-linux-gnu/libssh-gcrypt.so.4 (0x0000007fb789e000)
	libvpx.so.6 => /lib/aarch64-linux-gnu/libvpx.so.6 (0x0000007fb76ee000)
	libwebpmux.so.3 => /lib/aarch64-linux-gnu/libwebpmux.so.3 (0x0000007fb76d5000)
	libwebp.so.6 => /lib/aarch64-linux-gnu/libwebp.so.6 (0x0000007fb7673000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007fb763d000)
	libdav1d.so.4 => /lib/aarch64-linux-gnu/libdav1d.so.4 (0x0000007fb7545000)
	librsvg-2.so.2 => /lib/aarch64-linux-gnu/librsvg-2.so.2 (0x0000007fb6c47000)
	libgobject-2.0.so.0 => /lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x0000007fb6bda000)
	libglib-2.0.so.0 => /lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000007fb6a97000)
	libcairo.so.2 => /lib/aarch64-linux-gnu/libcairo.so.2 (0x0000007fb6971000)
	libzvbi.so.0 => /lib/aarch64-linux-gnu/libzvbi.so.0 (0x0000007fb68d7000)
	libsnappy.so.1 => /lib/aarch64-linux-gnu/libsnappy.so.1 (0x0000007fb68be000)
	libaom.so.0 => /lib/aarch64-linux-gnu/libaom.so.0 (0x0000007fb65aa000)
	libcodec2.so.0.9 => /lib/aarch64-linux-gnu/libcodec2.so.0.9 (0x0000007fb57bc000)
	libgsm.so.1 => /lib/aarch64-linux-gnu/libgsm.so.1 (0x0000007fb57a1000)
	libmp3lame.so.0 => /lib/aarch64-linux-gnu/libmp3lame.so.0 (0x0000007fb5721000)
	libopenjp2.so.7 => /lib/aarch64-linux-gnu/libopenjp2.so.7 (0x0000007fb56bb000)
	libopus.so.0 => /lib/aarch64-linux-gnu/libopus.so.0 (0x0000007fb565d000)
	libshine.so.3 => /lib/aarch64-linux-gnu/libshine.so.3 (0x0000007fb5641000)
	libspeex.so.1 => /lib/aarch64-linux-gnu/libspeex.so.1 (0x0000007fb561a000)
	libtheoraenc.so.1 => /lib/aarch64-linux-gnu/libtheoraenc.so.1 (0x0000007fb55d9000)
	libtheoradec.so.1 => /lib/aarch64-linux-gnu/libtheoradec.so.1 (0x0000007fb55b0000)
	libtwolame.so.0 => /lib/aarch64-linux-gnu/libtwolame.so.0 (0x0000007fb557e000)
	libvorbis.so.0 => /lib/aarch64-linux-gnu/libvorbis.so.0 (0x0000007fb5545000)
	libvorbisenc.so.2 => /lib/aarch64-linux-gnu/libvorbisenc.so.2 (0x0000007fb5493000)
	libwavpack.so.1 => /lib/aarch64-linux-gnu/libwavpack.so.1 (0x0000007fb545d000)
	libx264.so.160 => /lib/aarch64-linux-gnu/libx264.so.160 (0x0000007fb520d000)
	libx265.so.192 => /lib/aarch64-linux-gnu/libx265.so.192 (0x0000007fb4f3d000)
	libxvidcore.so.4 => /lib/aarch64-linux-gnu/libxvidcore.so.4 (0x0000007fb4e4c000)
	libudev.so.1 => /lib/aarch64-linux-gnu/libudev.so.1 (0x0000007fb4e15000)
	libsoxr.so.0 => /lib/aarch64-linux-gnu/libsoxr.so.0 (0x0000007fb4dac000)
	libva-drm.so.2 => /lib/aarch64-linux-gnu/libva-drm.so.2 (0x0000007fb4d99000)
	libva-x11.so.2 => /lib/aarch64-linux-gnu/libva-x11.so.2 (0x0000007fb4d83000)
	libvdpau.so.1 => /lib/aarch64-linux-gnu/libvdpau.so.1 (0x0000007fb4d6f000)
	librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007fb4d55000)
	libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fb4b7d000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fb4b59000)
	libXau.so.6 => /lib/aarch64-linux-gnu/libXau.so.6 (0x0000007fb4b45000)
	libXdmcp.so.6 => /lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000007fb4b2f000)
	libcdio.so.19 => /lib/aarch64-linux-gnu/libcdio.so.19 (0x0000007fb4af3000)
	libusb-1.0.so.0 => /lib/aarch64-linux-gnu/libusb-1.0.so.0 (0x0000007fb4ac7000)
	libslang.so.2 => /lib/aarch64-linux-gnu/libslang.so.2 (0x0000007fb479e000)
	libncursesw.so.6 => /lib/aarch64-linux-gnu/libncursesw.so.6 (0x0000007fb4755000)
	libtinfo.so.6 => /lib/aarch64-linux-gnu/libtinfo.so.6 (0x0000007fb4717000)
	libGLdispatch.so.0 => /lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000007fb458a000)
	libGLX.so.0 => /lib/aarch64-linux-gnu/libGLX.so.0 (0x0000007fb4547000)
	libpulsecommon-14.2.so => /usr/lib/aarch64-linux-gnu/pulseaudio/libpulsecommon-14.2.so (0x0000007fb44bc000)
	libdbus-1.so.3 => /lib/aarch64-linux-gnu/libdbus-1.so.3 (0x0000007fb4457000)
	libXcursor.so.1 => /lib/aarch64-linux-gnu/libXcursor.so.1 (0x0000007fb443c000)
	libXinerama.so.1 => /lib/aarch64-linux-gnu/libXinerama.so.1 (0x0000007fb4427000)
	libXi.so.6 => /lib/aarch64-linux-gnu/libXi.so.6 (0x0000007fb4407000)
	libXrandr.so.2 => /lib/aarch64-linux-gnu/libXrandr.so.2 (0x0000007fb43ed000)
	libXss.so.1 => /lib/aarch64-linux-gnu/libXss.so.1 (0x0000007fb43d9000)
	libXxf86vm.so.1 => /lib/aarch64-linux-gnu/libXxf86vm.so.1 (0x0000007fb43c4000)
	libgbm.so.1 => /lib/aarch64-linux-gnu/libgbm.so.1 (0x0000007fb43a6000)
	libwayland-egl.so.1 => /lib/aarch64-linux-gnu/libwayland-egl.so.1 (0x0000007fb4392000)
	libwayland-client.so.0 => /lib/aarch64-linux-gnu/libwayland-client.so.0 (0x0000007fb4373000)
	libwayland-cursor.so.0 => /lib/aarch64-linux-gnu/libwayland-cursor.so.0 (0x0000007fb435b000)
	libxkbcommon.so.0 => /lib/aarch64-linux-gnu/libxkbcommon.so.0 (0x0000007fb430a000)
	libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000007fb42e5000)
	libblas.so.3 => /lib/aarch64-linux-gnu/libblas.so.3 (0x0000007fb427c000)
	liblapack.so.3 => /lib/aarch64-linux-gnu/liblapack.so.3 (0x0000007fb3d3d000)
	libserd-0.so.0 => /lib/aarch64-linux-gnu/libserd-0.so.0 (0x0000007fb3d17000)
	libsord-0.so.0 => /lib/aarch64-linux-gnu/libsord-0.so.0 (0x0000007fb3cfc000)
	libsratom-0.so.0 => /lib/aarch64-linux-gnu/libsratom-0.so.0 (0x0000007fb3ce3000)
	libsamplerate.so.0 => /lib/aarch64-linux-gnu/libsamplerate.so.0 (0x0000007fb3b64000)
	libfftw3.so.3 => /lib/aarch64-linux-gnu/libfftw3.so.3 (0x0000007fb3a99000)
	libflite_usenglish.so.1 => /lib/aarch64-linux-gnu/libflite_usenglish.so.1 (0x0000007fb3a5f000)
	libflite_cmulex.so.1 => /lib/aarch64-linux-gnu/libflite_cmulex.so.1 (0x0000007fb39b9000)
	libharfbuzz.so.0 => /lib/aarch64-linux-gnu/libharfbuzz.so.0 (0x0000007fb38c9000)
	libgomp.so.1 => /lib/aarch64-linux-gnu/libgomp.so.1 (0x0000007fb387a000)
	libsodium.so.23 => /lib/aarch64-linux-gnu/libsodium.so.23 (0x0000007fb3830000)
	libpgm-5.3.so.0 => /lib/aarch64-linux-gnu/libpgm-5.3.so.0 (0x0000007fb37ce000)
	libnorm.so.1 => /lib/aarch64-linux-gnu/libnorm.so.1 (0x0000007fb3699000)
	libgssapi_krb5.so.2 => /lib/aarch64-linux-gnu/libgssapi_krb5.so.2 (0x0000007fb363b000)
	libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000007fb3601000)
	libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000007fb35e9000)
	libpng16.so.16 => /lib/aarch64-linux-gnu/libpng16.so.16 (0x0000007fb35a2000)
	libbrotlidec.so.1 => /lib/aarch64-linux-gnu/libbrotlidec.so.1 (0x0000007fb3587000)
	libicuuc.so.67 => /lib/aarch64-linux-gnu/libicuuc.so.67 (0x0000007fb338f000)
	libmpg123.so.0 => /lib/aarch64-linux-gnu/libmpg123.so.0 (0x0000007fb332c000)
	libvorbisfile.so.3 => /lib/aarch64-linux-gnu/libvorbisfile.so.3 (0x0000007fb3313000)
	libudfread.so.0 => /lib/aarch64-linux-gnu/libudfread.so.0 (0x0000007fb32fa000)
	libp11-kit.so.0 => /lib/aarch64-linux-gnu/libp11-kit.so.0 (0x0000007fb31ab000)
	libidn2.so.0 => /lib/aarch64-linux-gnu/libidn2.so.0 (0x0000007fb317b000)
	libunistring.so.2 => /lib/aarch64-linux-gnu/libunistring.so.2 (0x0000007fb2fed000)
	libtasn1.so.6 => /lib/aarch64-linux-gnu/libtasn1.so.6 (0x0000007fb2fc9000)
	libnettle.so.8 => /lib/aarch64-linux-gnu/libnettle.so.8 (0x0000007fb2f76000)
	libhogweed.so.6 => /lib/aarch64-linux-gnu/libhogweed.so.6 (0x0000007fb2f1e000)
	libgmp.so.10 => /lib/aarch64-linux-gnu/libgmp.so.10 (0x0000007fb2e96000)
	libssl.so.1.1 => /lib/aarch64-linux-gnu/libssl.so.1.1 (0x0000007fb2df7000)
	libcrypto.so.1.1 => /lib/aarch64-linux-gnu/libcrypto.so.1.1 (0x0000007fb2b46000)
	libgcrypt.so.20 => /lib/aarch64-linux-gnu/libgcrypt.so.20 (0x0000007fb2a76000)
	libgpg-error.so.0 => /lib/aarch64-linux-gnu/libgpg-error.so.0 (0x0000007fb2a43000)
	libcairo-gobject.so.2 => /lib/aarch64-linux-gnu/libcairo-gobject.so.2 (0x0000007fb2a29000)
	libgdk_pixbuf-2.0.so.0 => /lib/aarch64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x0000007fb29f3000)
	libgio-2.0.so.0 => /lib/aarch64-linux-gnu/libgio-2.0.so.0 (0x0000007fb27ee000)
	libpangocairo-1.0.so.0 => /lib/aarch64-linux-gnu/libpangocairo-1.0.so.0 (0x0000007fb27cf000)
	libpango-1.0.so.0 => /lib/aarch64-linux-gnu/libpango-1.0.so.0 (0x0000007fb276e000)
	libffi.so.7 => /lib/aarch64-linux-gnu/libffi.so.7 (0x0000007fb2755000)
	libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000007fb26e1000)
	libpixman-1.so.0 => /lib/aarch64-linux-gnu/libpixman-1.so.0 (0x0000007fb266d000)
	libxcb-render.so.0 => /lib/aarch64-linux-gnu/libxcb-render.so.0 (0x0000007fb2650000)
	libXrender.so.1 => /lib/aarch64-linux-gnu/libXrender.so.1 (0x0000007fb2637000)
	libogg.so.0 => /lib/aarch64-linux-gnu/libogg.so.0 (0x0000007fb261d000)
	libnuma.so.1 => /lib/aarch64-linux-gnu/libnuma.so.1 (0x0000007fb25fb000)
	libXfixes.so.3 => /lib/aarch64-linux-gnu/libXfixes.so.3 (0x0000007fb25e5000)
	libsystemd.so.0 => /lib/aarch64-linux-gnu/libsystemd.so.0 (0x0000007fb251f000)
	libwrap.so.0 => /lib/aarch64-linux-gnu/libwrap.so.0 (0x0000007fb2505000)
	libsndfile.so.1 => /lib/aarch64-linux-gnu/libsndfile.so.1 (0x0000007fb2472000)
	libasyncns.so.0 => /lib/aarch64-linux-gnu/libasyncns.so.0 (0x0000007fb245c000)
	libwayland-server.so.0 => /lib/aarch64-linux-gnu/libwayland-server.so.0 (0x0000007fb2438000)
	libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000007fb241c000)
	libgfortran.so.5 => /lib/aarch64-linux-gnu/libgfortran.so.5 (0x0000007fb22b0000)
	libgraphite2.so.3 => /lib/aarch64-linux-gnu/libgraphite2.so.3 (0x0000007fb227e000)
	libkrb5.so.3 => /lib/aarch64-linux-gnu/libkrb5.so.3 (0x0000007fb2194000)
	libk5crypto.so.3 => /lib/aarch64-linux-gnu/libk5crypto.so.3 (0x0000007fb2156000)
	libcom_err.so.2 => /lib/aarch64-linux-gnu/libcom_err.so.2 (0x0000007fb2142000)
	libkrb5support.so.0 => /lib/aarch64-linux-gnu/libkrb5support.so.0 (0x0000007fb2123000)
	libbrotlicommon.so.1 => /lib/aarch64-linux-gnu/libbrotlicommon.so.1 (0x0000007fb20f2000)
	libicudata.so.67 => /lib/aarch64-linux-gnu/libicudata.so.67 (0x0000007fb05cb000)
	libgmodule-2.0.so.0 => /lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x0000007fb05b7000)
	libmount.so.1 => /lib/aarch64-linux-gnu/libmount.so.1 (0x0000007fb0544000)
	libselinux.so.1 => /lib/aarch64-linux-gnu/libselinux.so.1 (0x0000007fb0509000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007fb04e2000)
	libpangoft2-1.0.so.0 => /lib/aarch64-linux-gnu/libpangoft2-1.0.so.0 (0x0000007fb04bb000)
	libthai.so.0 => /lib/aarch64-linux-gnu/libthai.so.0 (0x0000007fb04a2000)
	libzstd.so.1 => /lib/aarch64-linux-gnu/libzstd.so.1 (0x0000007fb03d4000)
	liblz4.so.1 => /lib/aarch64-linux-gnu/liblz4.so.1 (0x0000007fb03a5000)
	libnsl.so.2 => /lib/aarch64-linux-gnu/libnsl.so.2 (0x0000007fb037d000)
	libFLAC.so.8 => /lib/aarch64-linux-gnu/libFLAC.so.8 (0x0000007fb0339000)
	libkeyutils.so.1 => /lib/aarch64-linux-gnu/libkeyutils.so.1 (0x0000007fb0324000)
	libblkid.so.1 => /lib/aarch64-linux-gnu/libblkid.so.1 (0x0000007fb02be000)
	libpcre2-8.so.0 => /lib/aarch64-linux-gnu/libpcre2-8.so.0 (0x0000007fb022d000)
	libdatrie.so.1 => /lib/aarch64-linux-gnu/libdatrie.so.1 (0x0000007fb0215000)
	libtirpc.so.3 => /lib/aarch64-linux-gnu/libtirpc.so.3 (0x0000007fb01d6000)

Operation not permitted error

Describe The Bug:

I built my own ffmpeg-for-homebridge by cloning this repo and running the build-ffmpeg script myself. I'm on an older Mac mini running an old OS. I had to update a few linker paths and install a few libs with MacPorts to get it to work (specifically libiconv and liblzma), but eventually got it to build and link seemingly successfully.

I'm using this custom-built ffmpeg with the Simplisafe3 plugin for HomeBridge, as the custom ffmpeg path. I am not supplying any other custom arguments.

When I open a camera stream, I get "Operation not permitted" and "Error writing trailer" errors, as shown below. Please note that I have already been discussing with the Simplisafe3 plugin developers, and they seem to think this is an ffmpeg issue.

[1/12/2022, 12:27:18 PM] [Simplisafe Alarm] Start streaming video for camera 'Front Door'
[1/12/2022, 12:27:18 PM] [Simplisafe Alarm] /usr/local/bin/ffmpeg -re -headers Authorization: Bearer <REDACTED>/flv?x=1280&audioEncoding=AAC -map 0:0 -vcodec libx264 -tune zerolatency -preset superfast -pix_fmt yuv420p -r 20 -f rawvideo -vf scale=1280:-2 -b:v 284k -bufsize 568k -maxrate 284k -payload_type 99 -ssrc 5209053 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params QdPw9T7GaKdfqo/HiOqCC1/cWP6vNFgnuQzO/biq srtp://192.168.1.44:53597?rtcpport=53597&localrtcpport=53597&pkt_size=1378 -map 0:1 -acodec libfdk_aac -flags +global_header -profile:a aac_eld -ac 1 -ar 16k -b:a 24k -bufsize 48k -payload_type 110 -ssrc 11426258 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params sW1zV49wp2SayN7f5Ilc0UrTCI6TTcN72GyOQSj+ srtp://192.168.1.44:57188?rtcpport=57188&localrtcpport=57188&pkt_size=188
[1/12/2022, 12:27:18 PM] [Simplisafe Alarm] FFMPEG received first frame
[1/12/2022, 12:27:18 PM] [Simplisafe Alarm] ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --enable-videotoolbox --pkgconfigdir=/Users/<REDACTED>/dev/ffmpeg-for-homebridge-master/workspace/lib/pkgconfig --prefix=/Users/<REDACTED>/dev/ffmpeg-for-homebridge-master/workspace --pkg-config-flags=--static --extra-cflags=-I/Users/<REDACTED>/dev/ffmpeg-for-homebridge-master/workspace/include --extra-ldflags='-L/Users/<REDACTED>/dev/ffmpeg-for-homebridge-master/workspace/lib -L/opt/local/lib' --extra-libs='-lpthread -lm -lz -liconv' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp

[1/12/2022, 12:27:18 PM] [Simplisafe Alarm]   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
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

[1/12/2022, 12:27:18 PM] [Simplisafe Alarm] [https @ 0x7fd9fbc17380] No trailing CRLF found in HTTP header. Adding it.

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Input #0, flv, from 'https://<REDACTED>/v1/<REDACTED>/flv?x=1280&audioEncoding=AAC':
  Metadata:
    encoder         : Lavf56.40.101
  Duration: 
[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] 00:00:00.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 20 fps, 20 tbr, 1k tbn, 40 tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, 96 kb/s

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #1:0
[1/12/2022, 12:27:22 PM] [Simplisafe Alarm]  (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Output #1, rtp, to 'srtp://192.168.1.44:57188?rtcpport=57188&localrtcpport=57188&pkt_size=188':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #1:0: Audio: aac (libfdk_aac) (ELD), 16000 Hz, mono, s16, 24 kb/s
    Metadata:
      encoder         : Lavc58.91.100 libfdk_aac

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] [swscaler @ 0x7fd9fc14b600] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x7fd9fc85f000] using SAR=1/1
[libx264 @ 0x7fd9fc85f000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] [libx264 @ 0x7fd9fc85f000] profile High, level 3.1, 4:2:0, 8-bit
Output #0, rtp, to 'srtp://192.168.1.44:53597?rtcpport=53597&localrtcpport=53597&pkt_size=1378':
  Metadata:
    encoder         : Lavf58.45.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 284 kb/s, 20 fps, 90k tbn, 20 tbc
    Metadata:
      encoder         : Lavc58.91.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 284000/0/284000 buffer size: 568000 vbv_delay: N/A

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] av_interleaved_write_frame(): Operation not permitted

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Error writing trailer of srtp://192.168.1.44:53597?rtcpport=53597&localrtcpport=53597&pkt_size=1378: Operation not permitted
frame=    1 fps=0.0 q=40.0 Lsize=       2kB time=00:00:00.17 bitrate=  80.0kbits/s speed=0.805x    
video:2kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] [libx264 @ 0x7fd9fc85f000] frame I:1     Avg QP:33.03  size:  1712
[libx264 @ 0x7fd9fc85f000] mb I  I16..4: 99.0%  0.4%  0.6%

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] [libx264 @ 0x7fd9fc85f000] 8x8 transform intra:0.4%
[libx264 @ 0x7fd9fc85f000] coded y,uvDC,uvAC intra: 0.7% 0.6% 0.0%
[libx264 @ 0x7fd9fc85f000] i16 v,h,dc,p: 88%  7%  5%  0%
[libx264 @ 0x7fd9fc85f000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 12% 57%  5%  0%  5%  2%  0%  5%
[libx264 @ 0x7fd9fc85f000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 12% 22%  4%  4%  4%  9%  2%  8%
[libx264 @ 0x7fd9fc85f000] i8c dc,h,v,p: 96%  1%  3%  0%
[libx264 @ 0x7fd9fc85f000] kb/s:273.92

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Conversion failed!

[1/12/2022, 12:27:22 PM] [Simplisafe Alarm] Error: FFmpeg exited with code 1

To Reproduce:

  • Install Simplisafe3 plugin, enable Camera support, set the custom ffmpeg path to the ffmpeg binary built using this repo.
  • In the Home App (e.g. on iOS or on a Mac), click on a Simplisafe camera to open its live feed.
  • Observe the messages above in the log.

Expected behavior:

I expect to see a live view in the Home App, and no errors in the log.

ffmpeg output:

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-libzvbi --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-zlib --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --disable-securetransport --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-libzimg --enable-libdav1d --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Environment:

  • Operating System: macOS 10.11.6 (El Capitan), running on an old Mac Mini
  • MacPorts 2.7.1
  • Node.js v16.13.2
  • npm v8.3.0

Error "FFmpeg exited with code: 1 and signal: null (Error) Front Door Doorbell"

Tbh not sure if I should post this here or not. I've also posted it on the plugin page but haven't gotten a fix yet.

Describe The Bug:
Whenever I try to view my camera in the home app I see the error "FFmpeg exited with code: 1 and signal: null (Error) Front Door Doorbell" in the homebridge logs. The home app just shows "No response"

Expected behavior:
Expected to have ffmpeg working and be able to view camera

ffmpeg output:

Run ffmpeg in a terminal window and post the output below
Here is what the homebridge UI terminal outputs when I enter the command.
image

And here is what the hyper-v VM outputs when trying to enter the same command there
image

Screenshots:
See above.

Environment:

  • Operating System: Ubuntu (I think?) The Homebridge UI System Information says "OS: Ubuntu Focal Fossa (20.04.5 LTS)>

Executing ffmpeg on raspabian: No such file or directory

Describe The Bug:
/usr/local/bin $ ./ffmpeg
-bash: ./ffmpeg: No such file or directory

To Reproduce:
Execute this command after installing raspabian binaries:
/usr/local/bin $ ./ffmpeg

Expected behavior:
I can execute ffmpeg

ffmpeg output:
-bash: ./ffmpeg: No such file or directory

Run `ffmpeg` in a terminal window and post the output below

/usr/local/bin $ ./ffmpeg
-bash: ./ffmpeg: No such file or directory

  • Operating System:
    raspabian

Question: How to completely reinstall ffmpeg for home bridge?

Describe The Bug:

I can no longer get streaming audio/video for any camera plugins in Homebridge, running on intel Mac OS Monterey. Thus I'd like to clear any instances of ffmpeg for home bridge, and reinstall it, but I can't find it's storage location etc. I tried using the terminal commands provided for Mac OS, assuming it would just overwrite itself, but it just output "100%" but nothing about installation completed, etc. Tried to look through the readMe but no luck.

ffmpeg output:

roccofiorentino@Roccos-Mac-Pro .Homebridge % ffmpeg
ffmpeg version 5.0.1-5.0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.62)
configuration: --enable-videotoolbox --enable-nonfree --enable-gpl --enable-openssl --enable-libsvtav1 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxvid --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libsrt --enable-libspeex --disable-debug --disable-doc --disable-shared --enable-pthreads --enable-static --enable-small --enable-version3 --extra-cflags='-I/Users/Shared/ffmpeg-for-homebridge/workspace/include -I/Users/Shared/ffmpeg-for-homebridge/workspace/include/lilv-0' --extra-ldexeflags= --extra-ldflags=-L/Users/Shared/ffmpeg-for-homebridge/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/Users/Shared/ffmpeg-for-homebridge/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/Users/Shared/ffmpeg-for-homebridge/workspace --extra-version=5.0.1
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Environment:

Mac Pro 2020

  • Operating System:

Mac OS 12.3 Monterey

Cannot open shared library libasound_module_conf_pulse.so

ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/build/workspace/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
[alsa @ 0x3a787a0] cannot open audio device default (No such file or directory)
default: Input/output error
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, sdp, from 'pipe:':
Metadata:
title : No Name
Duration: N/A, bitrate: N/A
Stream #0:0: Audio: aac, 16000 Hz, mono, s16
Stream mapping:
Stream #0:0 -> #0:0 (aac (libfdk_aac) -> pcm_s16le (native))
pipe:: Connection timed out
-async is forwarded to lavfi similarly to -af aresample=async=16000:min_hard_comp=0.100000:first_pts=0.
ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/build/workspace/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
[alsa @ 0x3e55f10] cannot open audio device default (No such file or directory)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error
Error initializing output stream 0:0 --
Conversion failed!

VAAPI HW Acceleration - Synology Docker

Describe The Bug:

Am using mrlt8_Wyze_bridge, which intuen use FFMPEG for homebridge in Synology DS720+ Docker.
When I tries to customize the command to use VAAPI for HW accelartion, I got device creation failed -12 from FFMPEG.
I defined device in docker yml to be "device" = "/dev/dri/:/dev/dri"
And grant cmod 444 RenderD128
And installed vainfo, and checked the output and I can see VAAPI for i965 defined in docker container.
Also I defined in environment LIBVA_DRIVER_NAME=i965
But still all failed.

root@mrlt8-wyze-bridge_dev:/# ls -la /dev/dri
total 0
drwxr-xr-x 2 root root 80 Nov 13 23:34 .
drwxr-xr-x 13 root root 13860 Nov 13 23:34 ..
crw------- 1 root root 226, 0 Nov 13 23:34 card0
crw-rw---- 1 root 937 226, 128 Nov 13 23:34 renderD128

root@mrlt8-wyze-bridge_dev:/# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Gemini Lake - 2.3.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

To Reproduce:

FFMPEG -hide_banner -loglevel info -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -flags low_delay -fflags +genpts -i - -c:a copy -c:v libx264 -tune zerolatency -preset slow -coder ac -b:v 820K -crf 23 -maxrate 1920K -bufsize 4M -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554

Expected behavior:

FFMPEG to start HW transcode the stream.
ffmpeg output:
device creation failed -12

Run `ffmpeg` in a terminal window and post the output below

Screenshots:

Screenshot_20211122-015104_Samsung Internet

Environment:
{
"CapAdd" : [],
"CapDrop" : [],
"cmd" : "python3 /app/wyze_bridge.py",
"cpu_priority" : 90,
"device" : "/dev/dri/:/dev/dri/",
"enable_publish_all_ports" : false,
"enable_restart_policy" : true,
"enabled" : true,
"env_variables" : [
{
"key" : "LIBVA_DRIVER_NAME",
"value" : "i965"
},
{
"key" : "PATH",
"value" : "/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
},
{
"key" : "LANG",
"value" : "C.UTF-8"
},
{
"key" : "GPG_KEY",
"value" : "E3FF2839C048B25C084DEBE9B26995E310250568"
},
{
"key" : "PYTHON_VERSION",
"value" : "3.9.8"
},
{
"key" : "PYTHON_PIP_VERSION",
"value" : "21.2.4"
},
{
"key" : "PYTHON_SETUPTOOLS_VERSION",
"value" : "57.5.0"
},
{
"key" : "PYTHON_GET_PIP_URL",
"value" : "https://github.com/pypa/get-pip/raw/3cb8888cc2869620f57d5d2da64da38f516078c7/public/get-pip.py"
},
{
"key" : "PYTHON_GET_PIP_SHA256",
"value" : "c518250e91a70d7b20cceb15272209a4ded2a0c263ae5776f129e0d9b5674309"
},
{
"key" : "PYTHONUNBUFFERED",
"value" : "1"
},
{
"key" : "RTSP_PROTOCOLS",
"value" : "tcp"
},
{
"key" : "RTSP_READTIMEOUT",
"value" : "30s"
},
{
"key" : "RTSP_READBUFFERCOUNT",
"value" : "4096"
},
{
"key" : "RTSP_LOGLEVEL",
"value" : "warn"
},
{
"key" : "SDK_KEY",
"value" : "AQAAADQA6XDOFkuqH88f65by3FGpOiz2Dm6VtmRcohNFh/rK6OII97hoGzIJJv/qRjS3EDx17r7hKtmDA/a6oBLGOTC5Gml7PgFGe26VYBaZqQF34BwIwAMQX7BGsONLW8cqQbdI5Nm560hm50N6cYfT2YpE9ctsv5vP5S49Q5gg864IauaY3NuO1e9ZVOvJyLcIJqJRy95r4fMkTAwXZiQuFDAb"
},
{
"key" : "RTSP_API",
"value" : "Yes"
},
{
"key" : "RTSP_APIADDRESS",
"value" : "0.0.0.0:9997"
},
{
"key" : "RTSP_PPROF",
"value" : "Yes"
},
{
"key" : "RTSP_READBUFFERSIZE",
"value" : "65536"
},
{
"key" : "FRESH_DATA",
"value" : "True"
},
{
"key" : "FFMPEG_CMD",
"value" : "-loglevel error -use_wallclock_as_timestamps 1 -fflags +genpts -flags low_delay -i - -c copy -rtsp_transport tcp -f rtsp rtsp://0.0.0.0:8554"
},
{
"key" : "MQTT_HOST",
"value" : "False"
},
{
"key" : "WYZE_EMAIL",
"value" : "[email protected]"
},
{
"key" : "WYZE_PASSWORD",
"value" : "Alborg2001!"
},
{
"key" : "NET_MODE",
"value" : "LAN"
},
{
"key" : "QUALITY",
"value" : "HD120"
},
{
"key" : "RTSP_RTMPDISABLE",
"value" : "Yes"
},
{
"key" : "RTSP_HLSDISABLE",
"value" : "Yes"
},
{
"key" : "TZ",
"value" : "Asia/Amman"
}
],
"exporting" : false,
"id" : "745a134d7ea9e1414cbe0c1204509a43dfc5c9322bd8abeee9976658cb36bf2b",
"image" : "mrlt8-wyze-bridge_dev:20211120",
"is_ddsm" : false,
"is_package" : false,
"links" : [],
"memory_limit" : 6442450944,
"memory_limit_slider" : 6144,
"name" : "mrlt8-wyze-bridge_dev",
"network" : [
{
"driver" : "bridge",
"name" : "bridge"
}
],
"network_mode" : "bridge",
"port_bindings" : [
{
"container_port" : 8554,
"host_port" : 8554,
"type" : "tcp"
},
{
"container_port" : 9997,
"host_port" : 9997,
"type" : "tcp"
},
{
"container_port" : 9999,
"host_port" : 9999,
"type" : "tcp"
}
],
"privileged" : true,
"shortcut" : {
"enable_shortcut" : false,
"enable_status_page" : false,
"enable_web_page" : false,
"web_page_url" : ""
},
"use_host_network" : false,
"volume_bindings" : []
}

  • Operating System:
  • Docker 20.10.3 -1239 over Synology DS720J+ (DSM 7.1)
    Intel Celeron J4125, 4 core, 2Ghz burst upto 2.7

Cannot find libasound_module_conf_pulse.so

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

user@ubuntuvm:~$ ffmpeg -f alsa -i hw:0,0 -f null -
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
  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
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/build/workspace/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM hw:0,0
[alsa @ 0x55b6f2da4700] cannot open audio device hw:0,0 (No such file or directory)
hw:0,0: Input/output error

My workaround:

sudo mkdir -p /build/workspace/lib/alsa-lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so /build/workspace/lib/alsa-lib/

armv6 binaries

Is your feature request related to a problem? Please describe:
The binaries don't work on RasPi zero W

Describe the solution you'd like:
Binaries for armv6 would be nice

Describe alternatives you've considered:
Compiling them myself on my Pi Zero W seems unrealistic

Additional context:

The ffmpeg v6.0 binaries are huge vs prior versions of this package

Describe The Bug:
Honestly, this is perhaps not really a bug, but as I was updating my project to use these newer libraries I noticed that the size of the docker image had increased by more than 25%, from 75MB to more than 100MB, at least for the x86_64 and arm64 builds (the 32-bit arm builds increased less, but still probably 15%).

At first I couldn't find why because nothing in my build process had changed, but in comparing ffmpeg I saw that the new 6.0 binaries are more than 2x the size of the 5.0 binaries, moving from 32MB to 74 MB. I also noticed that these new binaries show as fully static builds, while the prior versions used the dynamic linker, so I'm assuming that might be part of the size increase and may very well be intentional.

Mostly filing this bug just to find out if this was an intentional change or some unintended side effect of a new build process.

To Reproduce:
You can just look at the binaries or even the tar.gz files.

Expected behavior:
Maybe this is expected, I'm just asking to be sure.

ffmpeg output:

ffmpeg version 6.0-homebridge-alpine-x86_64-static Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r10) 20220924
  configuration: --enable-hardcoded-tables --enable-nonfree --enable-gpl --enable-hardcoded-tables --enable-hardcoded-tables --enable-openssl --enable-libdav1d --enable-libsvtav1 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxvid --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable-libsrt --enable-libvpl --enable-vaapi --disable-ffnvcodec --enable-amf --disable-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --extra-cflags='-I/build/workspace/include -I/build/workspace/include/lilv-0' --extra-ldexeflags=-static --extra-ldflags=-L/build/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/build/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/build/workspace --extra-version=homebridge-alpine-x86_64-static
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Hyper fast Audio and Video encoder
$ file ffmpeg
ffmpeg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

Environment:

  • Operating System: Ubuntu 22.04, Docker 24.0.7, NodeJS 18.18.1

Update FFmpeg version

Is your feature request related to a problem? Please describe:
I am trying to utilize the V4L2 codecs (specifically h264_v4l2m2m) and the current ffmpeg version is missing some patches which cause the video to encode with a green tint. I have been able to manually build a ffmpeg version locally on the 4.3.1 release which solves the problem.

Describe the solution you'd like:

Provide an updated build using a release 4.3.x or greater version of ffmpeg.

Describe alternatives you've considered:

I have attempted to modify this project to do so but I am unable to figure out the build process (qemu + the GitHub builder specifically) and I have also had compile failures trying to hack up the docker file to build locally.

Additional context:

My ultimate goal is to enable hardware decoding/encoding within docker containers. I'm utilizing docker-homebridge + homebridge-camera-ffmpeg on a Raspberry Pi and while I have been able to get the codecs working inside the container the encoder output is currently green which makes it quite a bit less exciting to share with others who would likely appreciate this capability.

close stream on install

Dears,

on install, i'm receiving an error :

100%
100%
-
Download Complete
events.js:180 throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'listener', 'Function');
 ^ TypeError [ERR_INVALID_ARG_TYPE]: 
 The "listener" argument must be of type Function at _addListener (events.js:180:11) 
 at WriteStream.addListener (events.js:240:10) 
 at WriteStream.close (fs.js:2302:10) 
 at WriteStream.file.on (/var/www/html/plugins/homebridge/resources/node_modules/ffmpeg-for-homebridge/install.js:128:14) 
 at WriteStream.emit (events.js:164:20) 
 at finishMaybe (_stream_writable.js:605:14) 
 at afterWrite (_stream_writable.js:456:3) 
 at onwrite (_stream_writable.js:446:7) 
 at fs.js:2246:5 
 at FSReqWrap.wrapper [as oncomplete] (fs.js:703:5) 
 npm ERR!  code ELIFECYCLE npm ERR! errno 1 
 npm ERR!  [email protected] install: node install.js` 
 npm ERR!  Exit status 1 
 npm ERR! 
 npm ERR!  Failed at the [email protected] install script. 
 npm ERR!  This is probably not a problem with npm.  There is likely additional logging output above. 
 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-30T16_29_56_234Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.