gstreamer - 有没有办法将 RFB (vnc) 流保存到文件中?[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
发布答案以供将来参考。谢谢。
推荐阅读
- python - Kivymd:无法在 Scrollview 中添加多个文本字段和按钮
- sql - SQL FOR XML 属性和值
- php - 使用 FTP 类从 codeigniter 2 中的 ftp 下载文件
- node.js - 对于 next.js proejct 的纱线工作区子包,我应该使用 commonjs 还是 es 模块?
- javascript - Ckeditor 5 Pagination,使用自定义按钮浏览页面
- javascript - Vue
在 iOS 上滑回时不起作用 - model - 我不知道如何提取constant?
- http - HAProxy - HTTP/1.1 前端和 HTTP/2 后端?一个好主意?
- jquery - 我想对 Scripts.Render 使用 defer 并使用 Styles.Render 预加载
- haskell - 在 Dijkstra 的 Haskell 实现中无法发现代码中的问题