home-assistant-libs / ha-ffmpeg

A python library that handling with ffmpeg for home-assistant
BSD 3-Clause "New" or "Revised" License
16 stars 13 forks source link

Speed up starting camera streams #76

Closed bdraco closed 1 year ago

bdraco commented 1 year ago

closing fds can take a long time and its unlikely python is going to implement the close_range() system call [https://lwn.net/Articles/789023/] any time soon. Since we do not need to close the fds here as it does not cause any issues for ffmpeg we can spawn ffmpeg stream much faster in HA after https://github.com/home-assistant/core/pull/87958