Stream webcam video with gstreamer 1.0 over UDP to PC

浪子不回头ぞ 提交于 2019-12-03 08:57:44

Found hints to the solution from http://www.z25.org/static/rd/videostreaming_intro_plab/

The following worked very well for streaming video from Logitech c270 on raspberry pi to a windows 7 pc:

PC side:

gst-launch-1.0 -e -v udpsrc port=5001 ! ^
application/x-rtp, encoding-name=JPEG,payload=26 ! ^
rtpjpegdepay ! jpegdec !  ^
autovideosink 

RPi side:

gst-launch-1.0 -v v4l2src device=/dev/video0  \
! "image/jpeg,width=1280, height=720,framerate=30/1" \
! rtpjpegpay \
! udpsink host=$myip port=$myport

I suspect that it was the encoding of the webcam video to h264 that was too slow on the raspberry pi, however the webcamera already gave jpeg frames and thus no encoding was nescessary using "image/jpeg"

I have used for my webcamstream the MJPG-Streamer and get a 0,2 seconds delay. http://wiki.ubuntuusers.de/MJPG-Streamer

And the advantage is that you can watch it with the webbrowser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!