I have an ffmpeg process which saves a stream from wowza server, but when the stream in wowza is interrupted for a second or so sometimes ffmpeg cycles in:
[segment @ 0x671a10] st:0 PTS: 9600015 DTS: 9600015 < 9629949 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9601935 DTS: 9601935 < 9629950 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9603855 DTS: 9603855 < 9629951 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9605775 DTS: 9605775 < 9629952 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9607695 DTS: 9607695 < 9629953 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9609615 DTS: 9609615 < 9629954 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9611535 DTS: 9611535 < 9629955 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9613455 DTS: 9613455 < 9629956 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9615375 DTS: 9615375 < 9629957 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9632160 DTS: 9614160 < 9649231 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9624960 DTS: 9617760 < 9649232 invalid, clipping
[segment @ 0x671a10] st:0 PTS: 9621360 DTS: 9621360 < 9649233 invalid, clipping
It never survives, even when the source is healthy and missed only a few seconds. It would be great if the ffmpeg can exit or restart (It is enough to exit on error. I can execute it in an endless while.) My command is:
ffmpeg -shortest -re -y -err_detect aggressive -i rtmp://127.0.0.1/movies/my.stream timeout=10 -codec copy -map 0 -bsf:v h264_mp4toannexb,dump_extra -f segment -segment_time 60 /video/my.stream#%09d.ts
I have tested with -err_detect explode/careful/compliant/aggressive and on error in the input stream ffmpeg did not stop. Sometimes it gets a timeout (because the timeout option I set for the rtmp), but some time it keep printing:
[segment @ 0x671a10] st:0 PTS: 9621360 DTS: 9621360 < 9649233 invalid, clipping
It never survives - no exits, no output, so I have no saved stream until I manually restart the ffmpeg!
ffmpeg
console output if possible.