繁体   English   中英

带有 gstremer 的 JSMPEG 相机流

[英]JSMPEG Camera stream with gstremer

如示例中所述 - 流媒体设置示例:Raspberry Pi Live Webcam 我们可以使用 ffmpeg 在浏览器中流式传输网络摄像头,但是如何使用 gstreamer 进行流式传输? .

总之需要与 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 

使用 gstreamer 我如何将mpeg1编解码器发送到 websoket-relay http://localhost:8081/supersecret

能够使用gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! autovideosink启动网络摄像头gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! autovideosink gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! autovideosink

但是需要将它发送到 websocket-relay,所以尝试使用gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! tcpclientsink host=localhost port=8081 gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! tcpclientsink host=localhost port=8081 gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! tcpclientsink host=localhost port=8081但没有工作.. :(

提前致谢。

我们可以使用以下命令使用 gstreamer 进行流式传输

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM