locast2plex
locast2plex copied to clipboard
ffmpeg streams sometimes don't die (docker container 0.6.2)
I'm finding that sometimes, ffmpeg streams aren't dying properly. After a few days, I'll find ffmpeg still running in the container. I've got a workaround that just restarts the container once at 3am every morning, but it's kind of a hacky workaround. Could we add something to kill off ffmpeg processes that have been running for > 12 hours or something maybe?
Other than that, I'm a big fan of the project. Good work!
@tgorgdotcom I fixed this in fHDHR by adding except GeneratorExit:
. This allows ffmpeg to safely shut down when a client disconnects. However I'll also note that I run the ffmpeg subprocess in a generator.
So this is fixed in the current (> 0.6.2) docker build then?
@scumola fHDHR is a project similar to l2p and I was just suggesting to tgorgdotcom what seems to have fixed it for that project.
I'm still seeing streams open for > 24 hours (see the ffmpeg stream that was open since Jan24)
root@docker01:~/locast2plex# ps auxw | grep ffmpeg
root 1716435 0.0 0.4 84696 37720 ? S Jan24 0:02 ffmpeg -i https://den.locastnet.org/proxy/den/variant/wBCLh5JpeYVNoiPQfzjoXY6Z9YZu6impsGhWTCeCDx2zglPu3GGZ1WihqUXFQrKWamm9OkjMVEYpuD5UbWnf5ikkslNjPf2LC67rLFM2ygp.m3u8 -c:v copy -c:a copy -f mpegts -nostats -hide_banner -loglevel warning pipe:1
root 1785025 0.4 0.4 85068 39032 ? S 07:00 0:24 ffmpeg -i https://hls.locastnet.org/proxy/srte2b1/variant/TIRj39AB6tIYoXQPLubozOLG1m10NK9Bzy4dAV6HRi5KdZ5AhXJpAYa7eJ5VCfEHGY8oMn1hcNJnXXFItwpZmw.m3u8 -c:v copy -c:a copy -f mpegts -nostats -hide_banner -loglevel warning pipe:1