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

    using uv4l to record gameplay in retropie with raspberry pi 3

    Scheduled Pinned Locked Moved General Discussion and Gaming
    uv4l
    5 Posts 1 Posters 743 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.
    • M
      manit
      last edited by

      Hi,
      I am using raspberry pi 3 having

      $ lsb_release  -a
      No LSB modules are available.
      Distributor ID: Raspbian
      Description:    Raspbian GNU/Linux 10 (buster)
      Release:        10
      Codename:       buster
      
      pi@retropie:~/RetroPie-Setup $ git show
      commit 21a099a766c40c1725316f9859921fea9ed61368 (HEAD -> master, origin/master, origin/HEAD)
      Author: Jools Wills <buzz@exotica.org.uk>
      Date:   Tue Apr 28 00:04:14 2020 +0100
      
         retropie-setup - bump version to 4.6
      
      diff --git a/retropie_packages.sh b/retropie_packages.sh
      index be85fab3..1a41403a 100755
      --- a/retropie_packages.sh
      +++ b/retropie_packages.sh
      @@ -9,7 +9,7 @@
      # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
      #
      
      -__version="4.5.20"
      +__version="4.6"
      
      [[ "$__debug" -eq 1 ]] && set -x
      

      I followed step by step instructions from
      https://retropie.org.uk/forum/topic/17459/retropie-screen-mirroring-streaming-casting/20

      Namely

      pi@retropie:~ $ curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add -
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 26703  100 26703    0     0  15043      0  0:00:01  0:00:01 --:--:-- 15052
      OK
      pi@retropie:~ $
      pi@retropie:~ $
      pi@retropie:~ $
      pi@retropie:~ $ sudo vi /etc/apt/sources.list
      pi@retropie:~ $ sudo apt-get update
      Hit:1 http://archive.raspberrypi.org/debian buster InRelease
      Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
      Get:3 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch InRelease [1,450 B]
      Get:4 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf Packages [3,553 B]
      Fetched 5,003 B in 2s (2,340 B/s)
      Reading package lists... Done
      pi@retropie:~ $ sudo apt-get install uv4l  uv4l-server uv4l-webrtc uv4l-raspidisp uv4l-raspidisp-extras
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following additional packages will be installed:
        libssl1.0.2 uv4l-decoder2 uv4l-encoder uv4l-renderer
      The following NEW packages will be installed:
        libssl1.0.2 uv4l uv4l-decoder2 uv4l-encoder uv4l-raspidisp uv4l-raspidisp-extras uv4l-renderer uv4l-server uv4l-webrtc
      0 upgraded, 9 newly installed, 0 to remove and 89 not upgraded.
      Need to get 6,091 kB of archives.
      After this operation, 19.6 MB of additional disk space will be used.
      Do you want to continue? [Y/n] y
      Get:2 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l armhf 1.9.17 [354 kB]
      Get:1 http://mirror.ossplanet.net/raspbian/raspbian buster/main armhf libssl1.0.2 armhf 1.0.2q-2 [893 kB]
      Get:3 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-server armhf 1.1.125 [1,689 kB]
      Get:4 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-webrtc armhf 1.92 [2,988 kB]
      Get:5 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-encoder armhf 1.20 [15.3 kB]
      Get:6 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-decoder2 armhf 1.3 [21.9 kB]
      Get:7 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-raspidisp armhf 1.10 [41.9 kB]
      Get:8 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-raspidisp-extras armhf 1.13 [66.7 kB]
      Get:9 http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch/main armhf uv4l-renderer armhf 1.10 [20.1 kB]
      Fetched 6,091 kB in 3min 44s (27.1 kB/s)
      Preconfiguring packages ...
      Selecting previously unselected package libssl1.0.2:armhf.
      (Reading database ... 109175 files and directories currently installed.)
      Preparing to unpack .../0-libssl1.0.2_1.0.2q-2_armhf.deb ...
      Unpacking libssl1.0.2:armhf (1.0.2q-2) ...
      Selecting previously unselected package uv4l.
      Preparing to unpack .../1-uv4l_1.9.17_armhf.deb ...
      Unpacking uv4l (1.9.17) ...
      Selecting previously unselected package uv4l-server.
      Preparing to unpack .../2-uv4l-server_1.1.125_armhf.deb ...
      Unpacking uv4l-server (1.1.125) ...
      Selecting previously unselected package uv4l-webrtc.
      Preparing to unpack .../3-uv4l-webrtc_1.92_armhf.deb ...
      Unpacking uv4l-webrtc (1.92) ...
      Selecting previously unselected package uv4l-encoder.
      Preparing to unpack .../4-uv4l-encoder_1.20_armhf.deb ...
      Unpacking uv4l-encoder (1.20) ...
      Selecting previously unselected package uv4l-decoder2.
      Preparing to unpack .../5-uv4l-decoder2_1.3_armhf.deb ...
      Unpacking uv4l-decoder2 (1.3) ...
      Selecting previously unselected package uv4l-raspidisp.
      Preparing to unpack .../6-uv4l-raspidisp_1.10_armhf.deb ...
      Unpacking uv4l-raspidisp (1.10) ...
      Selecting previously unselected package uv4l-raspidisp-extras.
      Preparing to unpack .../7-uv4l-raspidisp-extras_1.13_armhf.deb ...
      Unpacking uv4l-raspidisp-extras (1.13) ...
      Selecting previously unselected package uv4l-renderer.
      Preparing to unpack .../8-uv4l-renderer_1.10_armhf.deb ...
      Unpacking uv4l-renderer (1.10) ...
      Setting up libssl1.0.2:armhf (1.0.2q-2) ...
      Setting up uv4l (1.9.17) ...
      Setting up uv4l-server (1.1.125) ...
      Setting up uv4l-raspidisp (1.10) ...
      Setting up uv4l-raspidisp-extras (1.13) ...
      Created symlink /etc/systemd/system/multi-user.target.wants/uv4l_raspidisp.service → /etc/systemd/system/uv4l_raspidisp.service.
      Created symlink /etc/systemd/system/multi-user.target.wants/raspidisp_server.service → /etc/systemd/system/raspidisp_server.service.
      Setting up uv4l-webrtc (1.92) ...
      Setting up uv4l-renderer (1.10) ...
      Setting up uv4l-decoder2 (1.3) ...
      Setting up uv4l-encoder (1.20) ...
      Processing triggers for libc-bin (2.28-10+rpi1) ...
      Processing triggers for man-db (2.8.5-2) ...
      

      All went well .
      Now I run in ssh session
      uv4l --auto-video_nr --driver raspidisp --server-option '--enable-webrtc=yes'

      I can see on my desktop
      ![https://pasteboard.co/JqQv1oZB.png](image url)

      As you can see that remote and local window is empty .

      How do I debug this issue ?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • M
        manit
        last edited by

        I saw that on choosing '640x480 30fps' in remote peer options and choosing green call button at the bottom.

        I am able to see and listen hdmi output of my raspberry.

        To send keystrokes my web browser I had to choose 'send key codes' in data channels.

        The best tutorial I found for this is at http://www.linux-projects.org/uv4l/tutorials/play-retropie-in-browser/ . Just use http instead of https in wget commands .

        Now my problem that remains is that my gamepad is not detected via web browser ?

        Can anybody help me in this.

        Thanks.

        1 Reply Last reply Reply Quote 0
        • M
          manit
          last edited by

          As said above that my gamepad is not detected when it is connected to laptop instead of raspberry pi .
          But when I close emulation station and restart it then screen says ' 1 gamepad detected ' , unfortunately I am unable to configure it as pressing any key on gamepad for long time still has no effect .

          Has anybody been able to use gamepad on laptop via web browser ?

          It is strange that I do not get any response on my posts . I thought there are experts on this forum who can provide helpful suggestion.

          M 1 Reply Last reply Reply Quote 0
          • M
            manit @manit
            last edited by

            I have not connected any gamepad directly to pi.
            I found that after bootup the emulation station says no gamepad detected .
            Then I connect to it via web browser and choose 'send keycodes' then I press f4 on my laptop keyboard then emulation station exits .
            I restart emulationstation - this time it says 1 gamepad detected . Please note that currently my usb gamepad is nowhere in picture . So I assume that emulation station is calling my laptop keyboard as gamepad . The problem is that on pressing any laptop key for long time nothing happens.
            I was thinking that at least my keyboard is detected by retropie via browser . So once if I map laptop keyboard to game pad then I will think of mapping my usb gamepad to laptop keys for same effect .
            Can you suggest ?

            Thanks.

            1 Reply Last reply Reply Quote 0
            • M
              manit
              last edited by

              I notice that when I connect to pi via web browser
              These get created

              $cat /proc/bus/input/devices
              I: Bus=0006 Vendor=046d Product=c31c Version=0001
              N: Name="virtual-keyboard"
              P: Phys=
              S: Sysfs=/devices/virtual/input/input2
              U: Uniq=
              H: Handlers=sysrq kbd event0
              B: PROP=0
              B: EV=3
              B: KEY=1ffffff ffefffff ffffffff fffffffe
              
              I: Bus=0014 Vendor=0079 Product=0006 Version=0001
              N: Name="virtual-joystick"
              P: Phys=
              S: Sysfs=/devices/virtual/input/input3
              U: Uniq=
              H: Handlers=event1 js0
              B: PROP=0
              B: EV=b
              B: KEY=f 0 0 0 0 0 0 0 7fff0000 0 0 0 0 0 0 0 0 0
              B: ABS=1b
              

              This leads me to think that connecting two gamepad to laptop and playing with them simultaneously (games like contra) may not be possible.

              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.