#!/bin/bash do_videostart () { video="$1" # Launch the video omx_fnt="--font=/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf" omx_opt="--no-keys --layer=10000 --aspect-mode=fill" omx_srt="--no-ghost-box --lines=1 --align=left $omx_fnt --font-size=20 --subtitles=/usr/share/batocera/splash/splash.srt" # Disable sound omx_nosound="-n -1" # -911 = Volume set to 35% (On omxplayer) # 1/(10^(911/2000)) = 0.35034828830157 /usr/bin/omxplayer -o both --vol -2500 $omx_opt $omx_srt $omx_nosound $video & PID=$! } videopath="/userdata/videoloadingscreens" if [[ "$1" == "gameStart" && -n "$2" ]]; then video="${videopath}/$2.mp4" # Filecheck [[ -f "$video" ]] || exit 1 else exit 1 fi do_videostart "$video" #wait $PID exit 0