我想在 Google+ 环聊中使用循环视频剪辑作为我的网络摄像头源。我安装了 v4l2loopback 并创建了一个视频环回设备。但我还没有弄清楚如何将视频帧写入设备。给定的例子是:
gst-launch videotestsrc ! v4l2sink device=/dev/video1
Run Code Online (Sandbox Code Playgroud)
因此,在阅读了 gst-launch 的手册页并试图了解发生了什么之后,我做出了无力的尝试:
sudo gst-launch-0.10 filesrc location=/home/briankb/Videos/darthvaderdancing.mp4 ! v4l2sink device=/dev/video0
Run Code Online (Sandbox Code Playgroud)
这导致:
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
(gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `GST_IS_CAPS (caps)' failed
New clock: GstSystemClock
(gst-launch-0.10:12622): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed
Caught SIGSEGV accessing address (nil)
#0 0x00007fc1890f0b03 in poll () from …Run Code Online (Sandbox Code Playgroud)