tik0 / mat2gstreamer

Open camera by OpenCV and send it to gstreamer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For hands-on information see gstreamer.md

mat2gstreamer

Open camera by OpenCV and send it to UDP/RTP

  • Preliminars for Ubuntu 14.04
    • Install gstreamer1.0 and 0.10: `add-apt-repository ppa:mc3man/gstffmpeg-keep && apt-get update && apt-get install libgstreamer1.0* gstreamer1.0* libgstreamer0.10* gstreamer0.10*``
    • Build opencv without gstreamer 0.10 support: -D WITH_GSTREAMER=ON -D WITH_GSTREAMER_0_10=OFF
  • Configure the source code: Maybe you have another cameradevice, etc.
  • Build: cmake . && make
  • Run a standalone gstreamer udtsrc and display the video strea (sampling, depth, width, and height might differ): gst-launch-1.0 -v udpsrc port=5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)BGR, depth=(string)8, width=(string)640, height=(string)480" ! rtpvrawdepay ! videoconvert ! ximagesink
  • Notes
    • If the caps string is not correct, just open up a gstreamer udpsink for you webcam and investigate the caps section of the verbose output. This string needs to be put into the caps section of the udpsrc
    • Do not use gstreamer0.10

Hints

Links

About

Open camera by OpenCV and send it to gstreamer

License:GNU General Public License v3.0


Languages

Language:C++ 71.5%Language:CMake 28.5%