Using HA 0.91.0, dietpi, a PS3 Eye and am out of ideas.
From the command line I am detecting silence without a problem:
dietpi@DietPi:~$ ffmpeg -f alsa -ac 1 -i plughw:1 -vn -filter:a silencedetect=n=-10dB:d=1 -f null -
ffmpeg version N-93529-g8e3b01e20e Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration:
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 48.101 / 58. 48.101
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, alsa, from 'plughw:1':
Duration: N/A, start: 1554460206.016594, bitrate: 768 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf58.26.101
Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
encoder : Lavc58.48.101 pcm_s16le
[silencedetect @ 0x2940730] silence_start: 0.0157292
[silencedetect @ 0x2940730] silence_end: 4.87194 | silence_duration: 4.85621
[silencedetect @ 0x2940730] silence_start: 4.87925
size=N/A time=00:00:08.36 bitrate=N/A speed= 1x
video:0kB audio:778kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[silencedetect @ 0x2940730] silence_end: 8.36667 | silence_duration: 3.48742
configuration.yaml
binary_sensor:
- platform: ffmpeg_noise
initial_state: true
input: -f alsa -ac 1 -i plughw:1 -vn
peak: -32
duration: 2
reset: 60
It’s always unavailable and whenever I try to start it the following warning ends up in the logs
WARNING (MainThread) [haffmpeg.core] FFmpeg isn't running!