简体   繁体   中英

Streaming live wih Raspberry PI Camera on a C# Application

I'm trying to use a raspberry pi to guide a car from a C# Application from a computer. The raspberry and computer are booth connected to a router. What I want is to receive live streaming from raspberry camera to computer so I can control the car. I've seen how to broadcast on browser, but I want to receive the live streaming directly into my C# Application. Is there any way to do this?

I'm making some assumptions here since there's not much detail in the question, but, if you want to stream from Raspberry Pi, it's as easy as using ffmpeg. There's a thousand command line parameters, but something like this will do the trick;

ffmpeg -y -loglevel warning -f dshow -i video="screen-capture-recorder" -vf crop=690:388:136:0 -r 30 -s 962x388 -threads 2 -vcodec libx264 -vpre baseline -vpre my_ffpreset -f flv rtmp:///live/myStream.sdp

See here for more docs: https://trac.ffmpeg.org/wiki/StreamingGuide

On the C# side, you just need to receive the video stream. There's quite a few options for RTMP and/or RTSP, here's one: https://code.google.com/p/rtmp-mediaplayer/ but there are many others.

Depending on what exactly you're doing with the video (overlays? vision?) you'll want to pick the right format, bitrate, and container to make processing simpler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM