brianstormi
Posts: 8
Joined: Tue Feb 10, 2015 11:33 am

Reliable and good image quality way for streaming in real-time Raspian desktop in Pi 4?

Mon Feb 17, 2020 11:29 pm

Hi...
I was trying different solutions to stream my Raspian desktop to a second computer using Raspberry Pi 4b 4GB. I tested solutions closed source like UV4L (raspidisp) or open-source like v4l2tools/v4l2rtspserver with similar outcomes. The goal is trying to stream desktop compressed at a minimum of 720p/25fps, but in both cases, although the connection is reliable, the image produced is full of artifacts, sometimes 30% bottom of the screen is totally distorted for some seconds. This happens mostly in scenes with too much movement or big changes between frames (games, videos, quickly browsing up/down webpages...) and not still desktop images, making it unusable. These video glitches are present in all raspberry versions from 2 to 4.
In the background, these tools seem to use OMX for h264 encoding, and that seems to be causing the issues. When configured for using libx264 as encoder these issues disappear, but consumes all CPU resources being unable to keep up the pace
Is anybody aware of any other alternatives not affected by this issue? Gstreamer V4L2 pipeline?.
Regards,

brianstormi
Posts: 8
Joined: Tue Feb 10, 2015 11:33 am

Re: Reliable and good image quality way for streaming in real-time Raspian desktop in Pi 4?

Tue Feb 18, 2020 7:55 am

The graphical issues I talk about are similar to the examples provided in this thread:
viewtopic.php?t=200306
The workaround/patches discussed here apply to OMX encoder paths in Gstreamer. Taking into account that OMX seems to not be further developed in the near future, Does anybody have any experience using V4L2 one with Gstreamer? Is there any efficient way to capture Raspbian desktop with Gstreamer (Dispmanx support?...)?

renice123
Posts: 198
Joined: Tue Oct 15, 2019 3:56 pm

Re: Reliable and good image quality way for streaming in real-time Raspian desktop in Pi 4?

Thu Apr 23, 2020 9:04 am

I don’t quite understand why you need to transfer the video stream to another computer through a video stream.
From my own experience, I know that it’s easier to use some kind of network solutions without transmitting video. For example, run a remote client program that displays graphics on a local X ‑ server. A user usually opens a terminal emulator and connects to a remote machine using telnet or SSH. Then it issues a command indicating the display on which the graphic should be displayed (for example, export DISPLAY = [user computer name]: 0 when using bash). Finally, the user launches the client program. It will connect to the local X-server and will display the graphics on the local screen and receive input from local input devices. Another option is to use a small utility program that connects to the remote machine and launches the desired client application on it.

Return to “Graphics, sound and multimedia”