5

How do I read framebuffer (/dev/fb0) with Gstreamer?

I'm trying to read the framebuffer on my Raspberry PI and stream it to my notebook, using the hardware h264 encoder on the RP.

First I tried this link: https://www.raspberrypi.org/forums/viewtopic.php?t=43227&p=486061

And used the command:

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

But the video doesn't have vertical sync.

Then I found this one Render OpenGL scene in Qt and stream it to HTML5 interface

And tried:

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

But it only shows a clock on a blackscreen.

I'm using this command to watch the stream:

gst-launch-1.0 -v tcpclientsrc host=192.168.11.100 port=5000 ! gdpdepay ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false
Community
  • 1
  • 1
DieChopper
  • 61
  • 1
  • 4

0 Answers0