有没有办法将 RFB (vnc) 流保存到文件? [GStreamer]

Is there a way to save RFB (vnc) streams to file? [GStreamer]

我正在寻找连接到 VNC 并使用 GStreamer 录制视频的方法。到目前为止,我可以连接到 VNC 服务器,但只能使用 autovideosink 观看视频。我想将视频保存到文件中。

这是我尝试过并且正在工作的方法:

gst-launch-1.0 -e -vvv rfbsrc host=127.0.0.1 width=1024 height=768 shared=true view-only=true ! videoscale ! video/x-raw,width=1024,height=576 ! videorate ! videoconvert ! autovideosink

这是为了使用 filesink 保存视频文件:

gst-launch-1.0 -e -vvv rfbsrc host=127.0.0.1 width=1024 height=768 shared=true view-only=true ! videoscale ! video/x-raw,width=1024,height=576 ! videorate ! videoconvert ! filesink location=video.flv

结果: 文件保存过大无法播放

任何输入都会有很大帮助。提前谢谢你。

终于成功了。对 mov 输出文件进行了一些更改:

gst-launch-1.0 -e -vvvv rfbsrc host=127.0.0.1 port=5900 ! videoconvert ! x264enc ! video/x-h264, profile=baseline ! qtmux ! filesink location=output.mov

已发布答案以供日后参考。谢谢。