#!/bin/bash # Adds system specific loading screen videos to x86 builds of batocera via VLC # Add your .mp4 videos to /userdata/loadingscreens naming them each with the same as in your roms folder i.e named snes.mp4 to play a video before for each snes game. # Add this script in /userdata/system/scripts then chmod+x /userdata/system/scripts/videolaunchx86.sh in terminal to give this script permissions to run do_videostart () { video="$1" vlc play --fullscreen --no-video-title-show --play-and-exit $video } # Comment out the above phrase and uncomment this one to enable playing loading videos concurrently with emulator launch instead of before (experimental) #do_videostart () #{ # video="$1" # vlc_opt="play --fullscreen --no-video-title-show --play-and-exit" # vlc $vlc_opt $video & # PID=$! #} videopath="/userdata/loadingscreens" if [[ "$1" == "gameStart" && -n "$2" ]]; then video="${videopath}/$2.mp4" [[ -f "$video" ]] || exit 1 else exit 1 fi do_videostart "$video" #wait $PID exit 0 # Replace or comment out all the other code above except for the first bash line then uncomment the following phrase to enable a single loading splash for all systems. It should be named default.mp4 in the same folder as above. #default="/userdata/loadingscreens/default.mp4" #case $1 in # gameStart) # vlc play --fullscreen --no-video-title-show --play-and-exit $default # ;; # #esac # #exit 0