我正在尝试从网络摄像头获取流,然后使用 tee 获取两个接收器(filesink 和 autovideosink),以便我可以在窗口中可视化视频并同时将其保存到文件夹中。当我运行这个命令时,我在窗口中只得到一个冻结的图像,而不是视频流。它适用于两个自动视频接收器(我有两个带有两个视频流的窗口),所以我猜问题出在文件接收器部分。文件接收器单独工作完美。
gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
videoconvert ! autovideosink \
t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
x264enc ! mpegtsmux ! filesink location=~/Videos/test1.mp4
Run Code Online (Sandbox Code Playgroud)
小智 3
尝试向文件接收器添加async=0属性。
gst-launch-1.0 -v v4l2src device=/dev/video0 ! tee name=t \
t. ! queue ! videoscale ! video/x-raw,framerate=30/1,width=320,height=240 ! \
videoconvert ! autovideosink \
t. ! queue ! video/x-raw,framerate=30/1,width=320,height=240 ! \
x264enc ! mpegtsmux ! filesink **async=0** location=~/Videos/test1.mp4
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
930 次 |
| 最近记录: |