Reputation: 323
As mentioned in the example - Example Setup for Streaming: Raspberry Pi Live Webcam. We are able to stream webcam in browser with ffmpeg but how can I stream with gstreamer?.
Inshort need similar command with gstreamer...
ffmpeg \
-f v4l2 \
-framerate 25 -video_size 640x480 -i /dev/video0 \
-f mpegts \
-codec:v mpeg1video -s 640x480 -b:v 1000k -bf 0 \
http://localhost:8081/supersecret
with gstreamer how can i send mpeg1
codec to websoket-relay http://localhost:8081/supersecret
Able to start webcam with
gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! autovideosink
But need to send it to websocket-relay, So tried with gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! tcpclientsink host=localhost port=8081
but did`t worked.. :(
Thanks in advance.
Upvotes: -1
Views: 602
Reputation: 323
We can be able to stream with gstreamer with below command
GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! video/x-raw,framerate=30/1 ! avenc_mpeg1video ! mpegtsmux ! curlhttpsink location=http://127.0.0.1:8081/supersecret
Upvotes: 0