如果我将多个缓冲区汇入一个图像,我可以从 GStreamer 恢复多个图像吗?

Can I recover multiple images from GStreamer if I sink multiple buffers to one image?

我有兴趣在 Ubuntu 18.04 上使用 gstreamer 从我的 USB 3.0 网络摄像头同时捕获两张图像。使用此管道,我注意到如果我将 num-buffers 增加到 2,我会使用单个图像获得双倍的文件大小。

gst-launch-1.0 v4l2src device=/dev/video3 num-buffers=1 ! image/jpeg,width=4208,height=3120 ! filesink location=/root/test3.jpg

有没有办法将文件拆分回两个单独的图像?

我想你想在这种情况下使用 multifilesink 而不是 filesink

gst-launch-1.0 v4l2src device=/dev/video3 num-buffers=2 ! image/jpeg,width=4208,height=3120 ! multifilesink location=/root/test_%05d.jpg