RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    RetroPie + Emulation station + play video from rom menu? Continued...

    Scheduled Pinned Locked Moved Help and Support
    help neededomxplayeremulationstaton
    4 Posts 2 Posters 1.2k 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.
    • S
      shotokan
      last edited by

      Re: RetroPie + Emulation station + play video from rom menu?

      Hi, first post here! I'm trying to follow the advice from the previous topic above, I've been able to add the following to the es_systems.cfg file, and my emulationstation has booted correctly and I see the menu item now.

        <system>
          <name>Media</name>
          <fullname>Movies</fullname>
          <path>/home/pi/RetroPie/roms/movies</path>
          <extension>.avi .avi .mp4 .MP4 .mkv .MKV</extension>
          <command>/opt/retropie/supplementary/runcommand/joy2key.py /dev/input/js0 kcub1 kcuf1 kcuu1 kcud1 0x70 0x71 &
      omxplayer -o hdmi %ROM%
      killall joy2key.py</command> 
        </system>
      

      But, when I go in to play a video that I put in the roms/movies folder, I get an error saying joy2key.py is not able to be found. I'm suspecting that this might have worked 8 months ago, but might not anymore.

      So I've reduced the command in the cfg to just be:

          <command>omxplayer -o hdmi %ROM%</command> 
      

      Which is what lot of people say to use to just simply play a video with omxplayer. After doing this, and trying to launch a video, I just get a black screen with a message saying :

      Have a nice day ;)
      

      from omxplayer.

      I just updated retropie/emulationstation to the latest version I think. Anybody have a working setup to play simple h264 videos from the emulationstation menu, and have a little button controls to rewind or fast forward, or end the video?

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

        joy2key has bee updated some time ago and split into its own package. It now lives in /opt/retropie/admin/joy2key.

        However, the command syntax doesn't look right, there's no & after the omxplayer command and the killall command is added as a parameter to omxplayer (which probably doesn't know what to do with it).

        I advise you to create a separate launcher script with all the commands and use it in the command node for es_systems.cfg, instead of stuffing all commands into one line.

        S 1 Reply Last reply Reply Quote 0
        • S
          shotokan @mitu
          last edited by shotokan

          @mitu Thanks for the clarifications there. I've been able to get a video running with omxplayer now along with the joy2key settings from Danell/Lupin. Where can I find more informaiton on how to configure joy2key settings?

          /dev/input/js0 kcub1 kcuf1 kcuu1 kcud1 0x70 0x71
          

          With this, how does joy2key know to use the controller dpad left for "kcub1" which is key_left aka left-arrow key?

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

            @shotokan the script maps the gamepad inputs to keyboard codes. The inputs used are ['left', 'right', 'up', 'down', 'a', 'b', 'x', 'y', 'pageup', 'pagedown'] and are mapped to the codes given as parameters.
            So left= kcub1, right= kcuf1, etc.
            The parameter codes are given as terminfo values, listed in https://pubs.opengroup.org/onlinepubs/7908799/xcurses/terminfo.html.

            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.