I'm trying to stream webcam video to a VLC player using gstreamer 1.0.
Im use Logitech c270 webcam:
v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Index : 1
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
gst-launch-1.0 v4l2src have formats image/jpeg and video/x-raw, format=YUY2
First I tried video/x-raw, format=YUY2, because it is more like a video, but there was no result (maybe it is very different from YUYV).
Then i tried image/jpeg and it worked!
Current command:
gst-launch-1.0 -v v4l2src device=/dev/video0 \
! 'image/jpeg,width=1280,height=720,framerate=30/1' \
! multipartmux \
! tcpserversink host=192.168.1.11 port=5000
Now Im open VLC: tcp://192.168.1.11:5000 and see video.
But this image/jpeg and I think that this has a bad effect on network speed.
How can I convert this signal into video and broadcast it via RTSP to open at rtsp://192.168.1.11:5000?