3

I'm running a command in FFMPEG that uses as input a stream video (Boroscope IP stream) and transform it to an .avi output.

To do it, i ran the following command:

ffmpeg -i tcp://192.168.10.123:7060 -c:v copy out.mov 

When i ran this command, some errors appeared in console:

https://prnt.sc/r3ranr

Even with the errors, the video was encoded.

What happens is that some frames has a strange quality problem, probably because of these errors:

https://prnt.sc/r3rb1h

Im not aiming to solve this problem, all I want to do is to discard these corrupt frames through some parameter in FFMPEG, because the frames with good quality are already enough for what I need to do.

I tried to, instead of transforming the output to an .avi file, getting only the I-frames with the command:

ffmpeg -i tcp://192.168.10.123:7060 "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr teste%04d.png

With that command I was able to testify that the errors were directly connected to the frame with quality problems.

I also ran a command that would discard the corrupted frames from the input (or at least that's what I thought this command would do):

ffmpeg -err_detect bitstream -err_detect buffer -err_detect explode -err_detect aggressive -fflags discardcorrupt -i tcp://192.168.10.123:7060 -r 1 -an -f image2  snapshot-%03d.jpg

But it didn't work aswell.

This is the first time I use FFMPEG, and I don't know this framework and it's commands very well.

So, finally, is there ANY parameter in FFMPEG that can make me DISCARD all the frames where errors occurred (any type of error)?

Thanks.

atokzz
  • 63
  • 3

0 Answers0