RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    RetroPie Screen Mirroring / Streaming / Casting

    Scheduled Pinned Locked Moved General Discussion and Gaming
    mirrorcaststream
    22 Posts 7 Posters 11.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ClydeC
      Clyde @herb_fargus
      last edited by Clyde

      @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?

      herb_fargusH 1 Reply Last reply Reply Quote 0
      • herb_fargusH
        herb_fargus administrators @Clyde
        last edited by

        @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?

        If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

        Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

        ClydeC 1 Reply Last reply Reply Quote 0
        • ClydeC
          Clyde @herb_fargus
          last edited by Clyde

          @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 …

          1 Reply Last reply Reply Quote 0
          • ClydeC
            Clyde
            last edited by

            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 ERR_EMPTY_RESPONSE.

            ClydeC 1 Reply Last reply Reply Quote 0
            • ClydeC
              Clyde @Clyde
              last edited by Clyde

              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.

              herb_fargusH 1 Reply Last reply Reply Quote 0
              • herb_fargusH
                herb_fargus administrators @Clyde
                last edited by

                @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)

                If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                ClydeC 1 Reply Last reply Reply Quote 0
                • ClydeC
                  Clyde @herb_fargus
                  last edited by

                  @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).

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @Clyde
                    last edited by

                    @clyde said in RetroPie Screen Mirroring / Streaming / Casting:

                    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/ ?

                    ClydeC 1 Reply Last reply Reply Quote 0
                    • ClydeC
                      Clyde @mitu
                      last edited by

                      @mitu Sorry for the late answer, I somehow missed your reply. 😮

                      Your link points to a tutorial for the raspicam driver. It has an --encoding option the raspidisp driver is missing, unfortunately.

                      1 Reply Last reply Reply Quote 0
                      • H
                        HorseWithForce
                        last edited by

                        hey there,

                        I know the thread is a little old but I'm trying to install uv4l for 5 hours now and I ran into diffrent problems..... first I sadly cant install RetroPie on x64 Raspi OS with Bullseye, next was that it seems that uv4l wont run on bullseye regardless x86 nor x64 bit OS....
                        now i took a fresh retropie image to test it with buster and followed some instructions here and there https://www.linux-projects.org/uv4l/tutorials/play-retropie-in-browser/
                        but I'm always leading to a point where my browsers gives me an error "invalid video device" or with another config I get "Web socket error 1006"
                        I guess I used the wrong video output in the config, but I cant find the right one....

                        Also the Retro Pi emulation wont start cause it tells me no display connected...
                        I only use ssh to connect to my pi and i got no Display or hdmi connected to the pi
                        Should I virtually add a display in the configs or is there any other solution here?

                        I hope you can help me out!

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @HorseWithForce
                          last edited by

                          @HorseWithForce said in RetroPie Screen Mirroring / Streaming / Casting:

                          Also the Retro Pi emulation wont start cause it tells me no display connected...

                          That's probably the reason why it's not working - there's no video device initialized. You didn't mention which Pi model are you using, but as a general solution, configure a video mode in /boot/config.txt and set hdmi_force_hotplug=1 as-well so that display detection is skipped.

                          As for using the solution on the RaspiOS Bullseye, it will not work due to the fact that the MMAL/DispmanX API is no longer supported with the new KMS ARM driver.

                          Just out of curiosity, why are you trying to use this solution, if you don't have a display attached to the Pi ? Wouldn't it be easier to install the emulators on your PC/Phone to play ?

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.