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

Loading Rom completely while displaying video splash

Scheduled Pinned Locked Moved Ideas and Development
runcommand-onstload screenvideo splash
8 Posts 6 Posters 1.8k 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.
  • F
    Fummlah
    last edited by Fummlah 20 Jan 2020, 21:44

    Hi everybody.

    First I want to thank y'all for all sharing all those ideas an experiences. Finally finishing my bartop I was looking for a possibilty to display a custom loading-screen-video while loading a game with Emulationstation.

    I found the runcommand-onstart.sh option for displaying images on start. This could easily be changed to play videos:

    1. create a textfile named runcommand-onstart.sh in /retropie/configs/all
    2. Add a single line: omxplayer -o both -b --layer 10001 /path/to/video.mp4

    I nearly liked it. But i recognized the game didn't start loading bevor the video finished playing. I am really not into Linux bash scripting but found the discription of background processing (https://likegeeks.com/linux-bash-scripting-awesome-guide-part5/). It say a process can be started as a parallel task. So the script wont "wait" for the process to finish before continuing. Anyway here is the code I use now:

    nohup omxplayer -o both -b --layer 10001 /path/to/video.mp4 &
    exit

    The Video will be displayed like an overlay covering the contens on the screen. If the video playtime matches the games loading/preloading time the result is a game start right after the custom video.

    known requirements:

    • disable "Launch Menu Art"
    • disable ingame menu (the one you can start by pressing a button right bevor loading a game)
    • don't put launching.png in /opt/retropie/configs/your emulator/

    The displaying of the video is actually interrupted by a tiny moment of blackscreen after 2-3 seconds. I couldn't find the reason for it yet. It might be something in the loading process of the game causing omx-player to show blackscreen for a couple frames..anyway I am happy with that solution.

    Happy tweaking

    C E 2 Replies Last reply 22 Jan 2020, 17:48 Reply Quote 1
    • C
      Clyde @Fummlah
      last edited by 22 Jan 2020, 17:48

      @Fummlah Nice idea! I dream about something like this for the Launch Menu Art for a long time now (i.e. a static image I use to show the game's flyer or box art). Could you point me in the right direction on how to modify your solution for that, please?

      C 1 Reply Last reply 24 Jan 2020, 19:44 Reply Quote 0
      • E
        ExarKunIv @Fummlah
        last edited by 23 Jan 2020, 16:46

        @Fummlah thats sweet. was always wondering if there was a way to do just that.
        ill have to give it a shot when i have a chance

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        1 Reply Last reply Reply Quote 0
        • C
          Clyde @Clyde
          last edited by 24 Jan 2020, 19:44

          @Clyde said in Loading Rom completely while displaying video splash:

          I dream about something like this for the Launch Menu Art for a long time now (i.e. a static image I use to show the game's flyer or box art).

          And, after a little research, I found a extremely simple solution. To avoid cluttering this thread, I opened another with due credit to yours: Loading ROM completely while displaying launch image

          I chose the nearly identical title, because the given task is nearly the same (just with images instead of videos). If you don't like it, I'd be happy to change it on a short notice. Thanks for the inspiration and motivation to finally do this.

          1 Reply Last reply Reply Quote 0
          • R
            roslof
            last edited by roslof 26 Jan 2020, 06:51

            I wager there is a way to intercept the ROM name being loaded. If so, there must be a way to load an MP4 in a scraped folder (like ./media/videos).

            For instance, if you tried to load "pacman123.zip" and could isolate "pacman123" -- then if you have a corresponding "pacman123.mp4" file in a separate folder, there's probably a way to load it. That way, each ROM may have its own video if desired.

            I'm not quite savvy enough to figure this out, but I would wager this is possible with some clever command-line work.

            R 1 Reply Last reply 26 Jan 2020, 07:20 Reply Quote 0
            • R
              roslof @roslof
              last edited by roslof 26 Jan 2020, 07:20

              Okay, the variation below works (will pull a video based on the name of the ROM) but relies on an absolute path:

              nohup omxplayer -o both -b --layer 10001 "/home/pi/RetroPie/roms/arcade/media/videos/$(ps a | grep RetroPie/roms | awk -F "/" 'NR==1 { print $NF }' | sed 's/\.[^.]*$//g; s/\\//g')".mp4 &
              exit

              This assumes a ROM being launched from /RetroPie/roms/arcade has a corresponding video in /Retropie/roms/media/videos.

              I tried relative paths like "./media/videos" but it didn't actually work as expected. I think this is close... Will keep looking into it, unless somebody beats me to it.

              FWIW: The magic here came from a previously posted command-line from @mitu who worked with Clyde to create a command-line for capturing screenshots with TriggerHappy. I figured this would work, but again, I'm still a bit junior (thus can't find a way to handle the path yet).

              J 1 Reply Last reply 26 Jan 2020, 10:55 Reply Quote 0
              • J
                jandalf81 @roslof
                last edited by 26 Jan 2020, 10:55

                @roslof Take a look at https://retropie.org.uk/docs/Runcommand/#runcommand-onstart-and-runcommand-onend-scripts
                There's an easy way to get the name of the ROM and more. I'd look at the parameter $3 and create the path to the video from that with some BaSh magic...

                C 1 Reply Last reply 26 Jan 2020, 14:41 Reply Quote 1
                • C
                  cyperghost @jandalf81
                  last edited by 26 Jan 2020, 14:41

                  @jandalf81 Indeed :)
                  @roslof Or ask the forum seach engine

                  https://retropie.org.uk/forum/post/170818
                  https://retropie.org.uk/forum/post/150918
                  https://retropie.org.uk/forum/post/144863
                  https://retropie.org.uk/forum/post/124474

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    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.

                    This community forum collects and processes your personal information.
                    consent.not_received