JSMPEG Camera stream with gstremer

511 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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