RetroPie Screen Mirroring / Streaming / Casting
6Alli last edited by
This post is deleted!
@herb_fargus Hi, I finally got to install Retropie 4.4, but I ran into a problem with UV4L. I followed your instructions by the letter. Starting the server got me this:
$ uv4l --auto-video_nr --driver raspidisp --server-option '--enable-webrtc=yes' <notice> [core] Trying to loading driver 'raspidisp' from built-in drivers... <notice> [core] Loading driver 'raspidisp' from external plug-in's... <notice> [driver] RaspiDisp Video4Linux2 Driver built Jan 31 2017 <notice> [core] Device detected! <notice> [core] Registering device node /dev/video0
The server is running on pids 3215 and 3065 according to
pidof uv4l. But when I try to connect by
http://ip.of.my.raspi:9080/stream/webrtc/, the browser says:
Page Not Found or Access Denied
The PC I'm trying to connect from runs Kubuntu Linux 14.04. The error occurs in Firefox 59.0.2 as well as Chromium 65.0.3325.181.
What could be wrong?
@clyde hrm. I don't remember mine saying /dev/video0, it was dev something else I forget. Did you try it with sudo /rebooting the pi?
@herb_fargus Rebooting didn't change the error, but uv4l only has one pid now.
I also have an issue with dispmanx vnc. It works, but although it shows approx. 13 fps on the Pi, krdc on my pc only gets appros 2 fps with high quality and 3 fps with medium quality. Low quality doesn't show a picture at all.
edit: The poor vnc performance might be because my Retropi runs on 1600x1200 …
Update: I can connect to the server's menu via http://ip.of.my.raspi:8080. There, "Server Info" says:
Streaming Server Informations and Statistics
- basic HTTP/HTTPS authentication: disabled
- underlying video device node: /dev/video0
- current connections: 1, queued: 0, total handled: 15
- max. simultaneous streams allowed: 3, max. threads: 5
- raw HTTP/HTTPS video streams in MJPEG, JPEG (continuous stills) and H264 formats - if supported - are available under the /stream/video.mjpeg, /stream/video.jpeg, and /stream/video.h264 URL paths respectively
But none of the listed url paths work. They give the error
Okay, I got it: I just had to use your URL with my server's port 8080. I don't know why your server has a different port, since I only followed your instructions. But it works now with an acceptable framerate, albeit not as high as the original.
So, thanks very much for this solution! Do you have any tipps for optimizing the frame rate? My video projector's resolution is 1280x720, I'd like to render the stream in this resolution. If you happen to know the options to do that, I'd be thankful. Otherwise, I'll try to read them up.
@clyde glad you got it figured out. you probably know as much about it as I do at this point. Uv4l has manpages with different settings that could probably be tweaked to improve performance.
If you/I were really ambitious we could develop a custom web app plug-in specific to streaming for retropie (uv4l had an example of an app for face tracking)
@herb_fargus One feature I'd like would be a direct stream without any web interface that could be viewed by a network-compatible media player like vlc. If that's possible already, I didn't figure it out although I read many uv4l docs and tutorials.
Do you know (or suspect) which video format the webrtc plugin streams to /dev/video0 in? I tried to grab that device with cvlc and stream it to another cvlc running on my pc with Kubuntu like described in this tutorial, but cvlc on the Pi didn't recognize the format coming from /dev/video0 (even calling it "garbage" at one point).
As for developing a custom plug-in, I am open for that in principle, but I have no programming expertise at all, apart from some very basic bash scripting (example).
Do you know (or suspect) which video format the webrtc plugin streams to /dev/video0 in?
Something like this - https://www.linux-projects.org/uv4l/tutorials/rtsp-server/ ?
@mitu Sorry for the late answer, I somehow missed your reply. 😮
Your link points to a tutorial for the raspicam driver. It has an
--encodingoption the raspidisp driver is missing, unfortunately.