[英]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.