使用 Gstreamer 流式传输帧缓冲区

Die*_*per 5 framebuffer gstreamer raspberry-pi

如何使用 Gstreamer 读取帧缓冲区 (/dev/fb0)?

我正在尝试使用 RP 上的硬件 h264 编码器读取 Raspberry PI 上的帧缓冲区并将其流式传输到我的笔记本电脑。

首先我尝试了这个链接:https : //www.raspberrypi.org/forums/viewtopic.php?t=43227&p=486061

并使用了命令:

gst-launch-1.0 -v multifilesrc location=/dev/fb0 ! videoparse format=29 framerate=30/1 ! decodebin ! videoconvert ! omxh264enc ! rtph264pay ! gdppay ! tcpserversink host=192.168.11.100 port=5000
Run Code Online (Sandbox Code Playgroud)

但是视频没有垂直同步。

然后我在 Qt 中找到了这个Render OpenGL 场景并将其流式传输到 HTML5 界面

并尝试:

gst-launch-1.0 -v filesrc location=/dev/fb0 blocksize=1920000 ! video/x-raw,format=BGRA,width=800,height=600,framerate=1/1 ! videoconvert ! video/x-raw,format=RGB,framerate=1/1 ! videoflip method=vertical-flip ! videoscale ! video/x-raw,width=400,height=300 ! imagefreeze ! video/x-raw,format=RGB,framerate=30/2 ! clockoverlay shaded-background=true font-desc="Sans 38" ! omxh264enc ! rtph264pay ! gdppay ! tcpserversink host=192.168.11.100 port=5000
Run Code Online (Sandbox Code Playgroud)

但它只在黑屏上显示一个时钟。

我正在使用此命令来观看流:

gst-launch-1.0 -v tcpclientsrc host=192.168.11.100 port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
Run Code Online (Sandbox Code Playgroud)