intro does not fully play. Odroid XU4
-
Hello,
i have the following problem. i have a 26 sec. long recalbox intro.
(yes WITH recalbox branding! i don NOT want to rebrand recalbox!)I am using the actual version for Odroid XU4!
Here is my s02splash:
#!/bin/bash selectVideo() { IFS=' ' videoList=($(find /recalbox/system/resources/splash -name *.mp4)) videoNumber=${#videoList[*]} video=${videoList[$((RANDOM%videoNumber))]} echo "${video}" } video="`selectVideo`" do_ffmpeg_start () { if ! `which ffplay >/dev/null` || [[ ! -f $video ]] ; then return fi ffplay_opts="-hide_banner -autoexit" ffplay_srt="subtitles=/recalbox/system/resources/splash/recalboxintro.srt:force_style='FontName=/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf,Fontsize=10'" ffplay $ffplay_opts -vf "$ffplay_srt" "$video" >/dev/null 2>&1 & PID=$! count=0 while [[ ! -f "/tmp/emulationstation.ready" && ! -e "/var/run/kodi.msg" && $count -lt 200 ]]; do sleep 0.1 ((count++)) done do_ffmpeg_stop $PID show_logo } do_ffmpeg_stop () { kill -9 $1 } do_omx_start () { # odroid xu4 has not omxplayer, make it run this code make it flash if [[ ! -f $video || ! -f /usr/bin/omxplayer ]]; then return fi # Initialize dbus session OMXPLAYER_DBUS_ADDR="/tmp/omxplayerdbus.root" OMXPLAYER_DBUS_PID="/tmp/omxplayerdbus.root.pid" exec 5> "$OMXPLAYER_DBUS_ADDR" exec 6> "$OMXPLAYER_DBUS_PID" dbus-daemon --fork --print-address 5 --print-pid 6 --session until [ -s "$OMXPLAYER_DBUS_ADDR" ]; do echo "waiting for dbus address to appear" >&2 sleep .2 done DBUS_SESSION_BUS_ADDRESS=`cat $OMXPLAYER_DBUS_ADDR` DBUS_SESSION_BUS_PID=`cat $OMXPLAYER_DBUS_PID` export DBUS_SESSION_BUS_ADDRESS export DBUS_SESSION_BUS_PID # Launch the video omx_fnt="--font=/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf" omx_opt="--adev both --no-keys --layer=10000 --aspect-mode=fill" omx_srt="--no-ghost-box --lines=1 --align=left $omx_fnt --font-size=20 -- subtitles=/recalbox/system/resources/splash/recalboxintro.srt" /usr/bin/omxplayer.bin $omx_opt $omx_srt $video & PID=$! # Stop the video when ready if [[ $? -eq 0 ]]; then # Wait for emulationstation or Kodi, but not more than 20 seconds count=0 while [[ ! -f "/tmp/emulationstation.ready" && ! -e "/var/run/kodi.msg" && $count -lt 27 ]]; do sleep 1 ((count++)) done # Finish with a one second fade out. sleep 27 audio_fade=1 video_fade=250 while [[ $video_fade -gt 0 ]]; do sleep .02 dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Volume double:$audio_fade >/dev/null dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetAlpha objpath:/not/used int64:$video_fade >/dev/null audio_fade=`echo "$audio_fade .02" | awk '{printf "%.2f", $1-$2}'` ((video_fade=video_fade-5)) done # Ready flag set or timeout occured; stop video process. dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Action int32:15 >/dev/null fi } wait_for_fb () { # on some sytems, fb0 is not immediatly loaded, so, keep a chance by waiting a bit N=0 while ! test -e /dev/fb0 -o $N -gt 15 do sleep 1 let N++ done } show_logo() { wait_for_fb test -e /dev/fb0 && fbv -f -i /recalbox/system/resources/splash/logo-version.png } case "$1" in start) if [[ `cat /recalbox/recalbox.arch` == "rpi"* ]] ; then ( do_omx_start ; show_logo ) & else ( wait_for_fb ; do_ffmpeg_start ) & fi ;; stop) ;; restart|reload) ;; *) esac exit $?
I did changes here:
while [[ ! -f "/tmp/emulationstation.ready" && ! -e "/var/run/kodi.msg" && $count -lt 27 ]]; do
and here:
# Finish with a one second fade out. sleep 27
Both did not work. The video stops after 7 sec. and boots ES. When i delete this video, the splash.PNG normal loads and then ES. Videos up to 5 sec. are working without a problem!
can someone tell me how change the setting so the video will be fully played?
sincerely:
Thomas
-
@levingard change back " count -lt 27 ]]; to count -lt 20 ]];
And your your sleep 27 by sleep 7 or maybe sleep 07 it will do the job -
@levingard change back " count -lt 27 ]]; to count -lt 20 ]]; And your your sleep 27 by sleep 7 or maybe sleep 07 it will do the job :)
i have changed it to but the same problem. ES is still shown up before the intro ends, and then ES has no sounds.
-
I have the same issue you're encountering. I tried the same things you've done and it doesn't work. It do works on the RPI3, but it looks like the XU4 have a different way to boot the system.
Have you found any way to fix this? Thanks!