Pipe Raspberry Pi Video into ffmpeg and opencv: A Failure So Far

Trying to get video off of raspberry pi in a low latency way.


Piping raspivid through netcat as suggested in raspicam documentation

Mplayer does a decent job. Maybe 0.1 second latency. Pretty dang good.

VLC did not do so good. Maybe 3 second latency. Perhaps some fiddling would fix?

Eventually, we want the stream in a program somewhere, hopefully python is acceptably fast. Here is a site that I heavily cribbed from


The colors are screwed up. This is not fast enough for our purposes. If you want, I believe you can fix it with cv2.cvtColor

You can see that I’ve tried a bunch of ffmpeg tags but none seem to help.

It does not appear that python is the speed hangup. I inspected with python -m cProfile



2 thoughts on “Pipe Raspberry Pi Video into ffmpeg and opencv: A Failure So Far”

    1. Hi, I recently came across another approach you might try.
      It seems like a fairly turn key solution that has been demonstrated to work on the pi. I have not tried it yet though.
      Also gstream seems like another option, but people report less ease or success.
      Try googling or youtubing those.


Leave a Reply

Your email address will not be published. Required fields are marked *