hello everyone,
I want to make an underwater drone with 2 raspberry pi zero 2w one in the control and one in the drone. these already have ethernet cable communication.
now i am working on video streaming with low latency. using GStreamer i can send the signal that the bed picks up and i receive it in my control where i have a 480x800 screen connected by HDMI.
i already have a video image, but it plays in a small window in the middle of my screen and i need it to be fullscreen.
with this command I send the camera signal.
this is the code with which I receive the signal
I'm still testing and I want to solve this to continue with the other actuators (motors, lights, joysticks, etc.) so I hope I can scale my code without problems. do you have any idea how to solve this? I need my video to be seen in full screen and I still can't figure out how.
I want to make an underwater drone with 2 raspberry pi zero 2w one in the control and one in the drone. these already have ethernet cable communication.
now i am working on video streaming with low latency. using GStreamer i can send the signal that the bed picks up and i receive it in my control where i have a 480x800 screen connected by HDMI.
i already have a video image, but it plays in a small window in the middle of my screen and i need it to be fullscreen.
with this command I send the camera signal.
Code:
gst-launch-1.0 v4l2src device=/dev/video0 ! image/jpeg,width=320,height=240 ! \jpegdec ! videoconvert ! video/x-raw,format=I420 ! x264enc speed-preset=ultrafast tune=zerolatency ! \rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.4.2 port=5000Code:
#!/usr/bin/env python3import gigi.require_version('Gst', '1.0')gi.require_version('Gtk', '3.0')from gi.repository import Gst, GtkGst.init(None)Gtk.init(None)class VideoPlayer: def __init__(self): self.pipeline = Gst.parse_launch( "udpsrc port=5000 caps=\"application/x-rtp, media=video, encoding-name=H264, payload=96\" " "! rtph264depay ! avdec_h264 ! autovideosink" ) self.window = Gtk.Window() self.window.connect("destroy", self.quit) self.window.fullscreen() self.window.show_all() self.pipeline.set_state(Gst.State.PLAYING) def quit(self, widget): self.pipeline.set_state(Gst.State.NULL) Gtk.main_quit()player = VideoPlayer()Gtk.main()Statistics: Posted by Juancho1998 — Sun May 04, 2025 9:15 pm