Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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!

share|improve this question
    
What do you mean by "and never survives"? Does the video fail to produce anything or does it simply stop encoding? It isn't exactly clear what the error you are getting is from your description. –  AJ Henderson Mar 7 at 1:38
    
The ffmpeg never stops and the there is no video produced. It just keep printing such lines.... –  neoX Mar 7 at 9:49
    
You should include the first ~50 lines and the last ~50 lines of your ffmpeg console output if possible. –  LordNeckbeard Mar 7 at 19:03
    
could you pipe stderr to another process that kills and restarts ffmpeg if it detects the "invalid, clipping" comment? –  stib Mar 7 at 22:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.