jooola / earhorn

Listen, monitor and archive your Icecast streams!
GNU General Public License v3.0
10 stars 4 forks source link

ffmpeg not restarting after crash #172

Closed paddatrapper closed 1 year ago

paddatrapper commented 1 year ago

Describe the bug

After ffmpeg exists 0, it is restarted, but exits 1. In this case, there is no attempt to restart again and earhorn continues to run without actually running ffmpeg. Logs are:

2023-03-12 14:06:38,703 | INFO     | earhorn.stream:listen:123 - ffmpeg command exited with 0
2023-03-12 14:06:46,945 | INFO     | earhorn.stream:listen:128 - stream listener stopped
2023-03-12 14:06:47,747 | ERROR    | earhorn.stream:check_stream:83 - could not stream from 'https://edge.iono.fm/xice/uctradio_live_medium.aac'
2023-03-12 14:06:53,229 | ERROR    | earhorn.stream:check_stream:83 - could not stream from 'https://edge.iono.fm/xice/uctradio_live_medium.aac'
2023-03-12 14:06:59,205 | INFO     | earhorn.stream:listen:96 - starting stream listener
2023-03-12 14:06:59,205 | INFO     | earhorn.stream:listen:101 - preparing ArchiveHandler 
2023-03-12 14:06:59,207 | INFO     | earhorn.stream_silence:parse_process_output:66 - starting to parse stdout
2023-03-12 14:07:00,377 | INFO     | earhorn.stream:listen:123 - ffmpeg command exited with 1

Environment

jooola commented 1 year ago

Weird, the child threads handling the output of the parent 'listening thread' should be joined and automatically stop after the process exited.

I'll check if I can reproduce.

paddatrapper commented 1 year ago

Even exiting completely is a valid solution here - for me, it runs in Kubernetes, so gets restarted anyway. The issue is having the parent continuing, but not actually listening to the stream.

jooola commented 1 year ago

Could you check if the new release fixes your issue ?