使用 gstreamer 提高桌面录制性能

使用 gstreamer 提高桌面录制性能

如何使用带有集成网络摄像头流的 gstreamer 来提高桌面录制的性能?

我尝试了下面的管道,它可以工作,但性能很差。仅记录网络摄像头流中的一小部分帧。

// webcam into screencast to file WEBM [fixed position]
gst-launch-1.0  --gst-debug=3 \
videomixer name=mix \
! videoconvert \
! queue \
! videorate \
! vp8enc  min_quantizer=10 max_quantizer=10 cpu-used=2 deadline=1000000  threads=2 \
! queue \
! mux. pulsesrc \
! queue \
! audioconvert \
! vorbisenc \
! queue \
! mux. webmmux name=mux \
! filesink location=screencast.webm ximagesrc \
! mix. v4l2src do-timestamp=true \
! video/x-raw,format=YUY2,width=640, height=480, interlaced=false, pixel-aspect-ratio=1/1, framerate=30/1 \
! videobox border-alpha=0 top=-20 left=-25 \
! mix.

答案1

经过几次测试我认为我找到了一些令我满意的东西,我认为它仍然可以改进,但当时我会使用这个:

//DESKTOP RECORDING WITH WEBCAM WITH SOUND
gst-launch-1.0  --gst-debug=3 \
ximagesrc \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! videomixer name=mix \
! videoconvert \
! videorate \
! vp8enc  min_quantizer=10 max_quantizer=10 cpu-used=2 deadline=1000000  threads=2 \
! mux. pulsesrc \
! audioconvert \
! vorbisenc \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! mux. webmmux name=mux \
! filesink location=screencast.webm v4l2src do-timestamp=true \
! video/x-raw,format=YUY2,width=640, height=480, interlaced=false, pixel-aspect-ratio=1/1, framerate=30/1 \
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \
! mix.

相关内容