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

    Stopped Working: Game launching video loading screens

    Scheduled Pinned Locked Moved Help and Support
    runcommandvideo
    3 Posts 2 Posters 146 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.
    • R
      retrodad
      last edited by retrodad

      I had this function (video launching while rom loads) working yesterday, I made some changes today to the splash screen (unrelated, well, I think unrelated) and now the videos are no longer launching.

      Pi Model or other hardware: 4B
      Power Supply used: Kilros (shipped with the kit)
      RetroPie Version Used: 4.6.1
      Built From: SD Image from RetroPie
      USB Devices connected: DragonRise Controllers (2), Arcade1Up trackball, logitech keyboard
      Error messages received: I checked the /dev/shm/runcommand.log, I see the following...

      /opt/retropie/configs/all/runcommand-onstart.sh: line 8: $'\r': command not found
      /opt/retropie/configs/all/runcommand-onstart.sh: line 12: syntax error near unexpected token `elif'
      /opt/retropie/configs/all/runcommand-onstart.sh: line 12: ` elif [[ -f $ifsystem ]]; then
      

      ...at the top.

      Now, I followed the instructions here:
      https://retropie.org.uk/forum/topic/20322/game-launching-video-loading-screens

      And on that page, there are 3 iterations of runcommand-onstart.sh file. The lines listed above can be found in one of the versions of the code on that page. I can't remember which one I used when I had it working, but I have been trying to fix it and have tried all three - all failed. I have gone back and changes it to the one at the top of the page - one that does not use the lines which the error is referring to. However, the runcommand.log, which updates upon running a ROM, shows the same error, identifying the same code. It is as if it is not reading the new code. So I re-booted, ran a rom, and looked at the runcommand.log again and the log file was unchanged (except the part below which called a different rom.

      Here is the contents of my runcommand-onstart.sh file (/opt/retropie/configs/all):

       gname="$(basename "$3")"
       # build path to file and remove extension from ROM to add mp4 extension
       # $HOME variable will help users that are not stick to raspberry ;)
       ifgame="$HOME/RetroPie/videoloadingscreens/${gname%.*}.mp4"
       ifsystem="$HOME/RetroPie/videoloadingscreens/$1.mp4"
       default="$HOME/RetroPie/videoloadingscreens/default.mp4"
      
       # If condition to check filename with -f switch, f means regular file
       if [[ -f $ifgame ]]; then
           omxplayer "$ifgame" > /dev/null 2>&1
       elif [[ -f $ifsystem ]]; then
            omxplayer "$ifsystem" > /dev/null 2>&1
       elif [[ -f $default ]]; then
          omxplayer "$default" > /dev/null 2>&1
       fi
      

      I have also gone in to the shell (?) and run, 'omxplayer $HOME/RetroPie/videoloadingscreens/mame-libretro.mp4' and the video plays.

      • Menu art is off.

      • I did mention above that I was trying to get the splash screen video to work, and it does, but occasionally is stops working and I have to go back in an enable it from EmulationStation. I only mention it in case it is important in debugging this issue.

      I appreciate your assistance [first post, please be kind]~~~~

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

        Please surround the script contents with code tags (```) to make it more readable.
        You error is probably related to the scripts file line ending - you should make sure the editor you're using to modify the script has Unix line endings enabled for the file.

        1 Reply Last reply Reply Quote 1
        • R
          retrodad
          last edited by

          It was indeed an issue related to the format of the runcommand-onstart.sh file - it was in DOS format. I opened/resaved it in MAC format (using nano). Problem solved. Thank you for your help!

          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.