1

I have a live video feed from a webcam on linux (v4l2). The video has the occasional missed frame or some noise at the bottom of some frames. I suspect this is due to a USB cable that is slightly longer than it should be. This is not really an issue for the application at hand and the video shows up more or less fine on the screen when viewed with vlc.

But due to the errors in the video stream, I cannot transcode the video. This is an issue because I would like to view the video on a different computer. I can stream the raw video without problems. However this is ideal for low bandwidth connections, which is why I'd prefer to transcode it. But any transcoder I tried eventually stops working after a few frames because of the ill-formatted input stream. Is there any way I can get vlc to sanitize the stream before transcoding it. I don't mind missed frames or other artefacts.

hanno
  • 6,034
  • 7
  • 42
  • 77
  • 1
    You could perhaps use ffmpeg to dump the raw YCbCr to file and then re-encode it. This *normally* works `ffmpeg -i input.mkv out.yuv`. Check [this](https://stackoverflow.com/questions/16259588/how-to-dump-raw-rtsp-stream-to-file) for rtsp to file, just remove the `-vcodec copy` part to do transcoding. Tweek to your needs :-) – Fredrik Pihl Jun 27 '17 at 18:10
  • I need to do it on the fly... – hanno Jun 27 '17 at 20:30
  • 1
    @hanno `ffmpeg` can do it on the fly. Try https://trac.ffmpeg.org/wiki/Capture/Webcam and https://trac.ffmpeg.org/wiki/StreamingGuide. – aergistal Jun 28 '17 at 10:24

0 Answers0