eroji / rtsp2mjpg

RTSP to MJPEG stream conversion using FFmpeg and FFserver
99 stars 41 forks source link

"Past duration 0.###### too large" stops container from working #31

Open epheterson opened 1 year ago

epheterson commented 1 year ago

This Docker container works great most of the time, but often gets stuck printing errors like below and requires I manually restart it. After restarting the container it works fine again for a while until the errors start again. I'm using a Eufy camera as the source.

Past duration 0.744987 too large
stef1949 commented 9 months ago

also having this issue

epheterson commented 9 months ago

To increase uptime I wrote a one-liner if anyone wants to add to a scheduled task:

if docker logs rtsp2mjpg -n 5 | grep -q "too large" ; then echo "Issue detected, clearing logs and restarting container."; docker stop rtsp2mjpg; rm /volume1/@docker/containers/95da8b5321d6825e70d0abc994a6afb2066f8ae5146e6c5e2323a86061ce9ad7/log.db; docker start rtsp2mjpg; else echo "No issue detected."; fi
stef1949 commented 9 months ago

How do I run this scheduled task? X

epheterson commented 9 months ago

You’ll want to find your log path directory and update it, as well as the container name. Try it manually via terminal first, on the host running docker not within the docker.

I run this on my Synology NAS which has a scheduled task feature in the control panel. For other systems look into cron jobs.

stef1949 commented 9 months ago

Changed the log level

Screenshot 2023-11-30 at 16 36 34