Skip to content

Commit 6f794cb

Browse files
committed
Minor changes
1 parent c57205d commit 6f794cb

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

source/_components/binary_sensor.ffmpeg.markdown

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ footer: true
1010
logo: ffmpeg.png
1111
ha_category: Binary Sensor
1212
ha_release: 0.27
13+
ha_iot_class: "Local Polling"
1314
---
1415

1516

16-
The `ffmpeg` platform allows you to use every video or audio feed with [FFmpeg](http://www.ffmpeg.org/) as varius sensors in Home Assistant. Avilable are: **noise**, **motion**. If ffmpeg process is brocken, sensor going to unavilable. It exists a service to restart a instance with *binary_sensor.ffmpeg_restart*.
17+
The `ffmpeg` platform allows you to use every video or audio feed with [FFmpeg](http://www.ffmpeg.org/) for various sensors in Home Assistant. Available are: **noise**, **motion**. If the `ffmpeg` process is brocken, the sensor going to unavailable. It exists a service to restart a instance with *binary_sensor.ffmpeg_restart*.
1718

1819
<p class='note'>
19-
You need a ffmpeg binary in your system path. On debain 8 you can install it from backports. If you want HW support on raspberry you need self build from source. Windows binary are avilable on ffmpeg homepage.
20+
You need a `ffmpeg` binary in your system path. On Debain 8 you can install it from backports. If you want Hardware support on a Raspberry Pi you need to build it from sourceby ourself. Windows binary are avilable on [FFmpeg](http://www.ffmpeg.org/) homepage.
2021
</p>
2122

2223
### {% linkable_title Noise %}
@@ -39,23 +40,24 @@ camera:
3940
Configuration variables:
4041
4142
- **input** (*Required*): A ffmpeg compatible input file, stream or feed.
42-
- **tool** (*Required*): is fix set to 'noise'.
43+
- **tool** (*Required*): Is fix set to `noise`.
4344
- **name** (*Optional*): This parameter allows you to override the name of your camera.
44-
- **ffmpeg_bin** (*Optional*): Default 'ffmpeg'.
45+
- **ffmpeg_bin** (*Optional*): Default `ffmpeg`.
4546
- **peak** (*Optional*): Default -30. A peak of dB to detect it as noise. 0 is very loud and -100 is low.
4647
- **duration** (*Optional*): Default 1 seconds. How long need the noise over the peak to trigger the state.
47-
- **reset** (*Optional*): Default 20 seconds. The time to reset the state after none new noise is over the peak.
48-
- **extra_arguments** (*Optional*): Extra option they will pass to ffmpeg. i.e. audio frequence filtering.
49-
- **output** (*Optional*): Allow you to send the audio output of this sensor to a icecast server or other ffmpeg supported output. i.e. to stream with sonos after state is trigger.
48+
- **reset** (*Optional*): Defaults to 20 seconds. The time to reset the state after none new noise is over the peak.
49+
- **extra_arguments** (*Optional*): Extra option they will pass to `ffmpeg`, like audio frequence filtering.
50+
- **output** (*Optional*): Allow you to send the audio output of this sensor to a icecast server or other ffmpeg supported output, eg. to stream with sonos after state is trigger.
5051

5152
For playing with values:
53+
5254
```bash
53-
ffmpeg -i YOUR_INPUT -vn -filter:a silencedetect=n=-30dB:d=1 -f null -
55+
$ ffmpeg -i YOUR_INPUT -vn -filter:a silencedetect=n=-30dB:d=1 -f null -
5456
```
5557

5658
### {% linkable_title Motion %}
5759

58-
FFmpeg don't have a motion detection filter so it use a scene filter to detect a new scene/motion. In fact you can set how big a object or size of image they need change to detect a motion. The option 'changes' is the percent value of change between frames. You can add a denoice filter to video if you want a realy small value for 'changes'.
60+
FFmpeg don't have a motion detection filter so it use a scene filter to detect a new scene/motion. In fact you can set how big a object or size of image they need change to detect a motion. The option 'changes' is the percent value of change between frames. You can add a denoise filter to video if you want a realy small value for 'changes'.
5961

6062
To enable your FFmpeg with motion detection in your installation, add the following to your `configuration.yaml` file:
6163

@@ -78,16 +80,17 @@ camera:
7880
Configuration variables:
7981

8082
- **input** (*Required*): A ffmpeg compatible input file, stream or feed.
81-
- **tool** (*Required*): is fix set to 'motion'.
83+
- **tool** (*Required*): Is fix set to `motion`.
8284
- **name** (*Optional*): This parameter allows you to override the name of your camera.
83-
- **ffmpeg_bin** (*Optional*): Default 'ffmpeg'.
84-
- **changes** (*Optional*): Default 10 percent. A lower value is more sensitive. I use 4 / 3.5 on my cameras. It describe how mutch of two frames need to change to detect it as motion. See on descripton.
85+
- **ffmpeg_bin** (*Optional*): Default `ffmpeg`.
86+
- **changes** (*Optional*): Default 10 percent. A lower value is more sensitive. I use 4 / 3.5 on my cameras. It describe how much of two frames need to change to detect it as motion. See on descripton.
8587
- **reset** (*Optional*): Default 20 seconds. The time to reset the state after none new motion is detect.
8688
- **repeat** (*Optional*): Default 0 repeats (deactivate). How many motion need to detect in *repeat_time* to trigger a motion.
87-
- **repeat_time** (*Optional*): Default 0 seconds (deactivate). The time to repeats befor it trigger a motion.
89+
- **repeat_time** (*Optional*): Default 0 seconds (deactivate). The time to repeats before it trigger a motion.
8890
- **extra_arguments** (*Optional*): Extra option they will pass to ffmpeg. i.e. video denoise filtering.
8991

9092
For playing with values (changes/100 is the scene value on ffmpeg):
93+
9194
```bash
92-
ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 -
95+
$ ffmpeg -i YOUR_INPUT -an -filter:v select=gt(scene\,0.1) -f framemd5 -
9396
```

0 commit comments

Comments
 (0)