fierostetz
Posts: 1
Joined: Tue Dec 11, 2012 1:01 am

playing omxplayer video at boot

Tue Dec 11, 2012 1:15 am

Hi all - I work at a college and as a project I'm trying to build some digital signage. So far, I've got my pi loaded with raspbian. It boots, creates a local mountpoint, then mounts an FTP share as a local folder, copies content into a folder, and plays the content fullscreen. When I add this to /etc/init.d, I get text floating in the black bars above and below the video I'm playing. If I launch the exact same script manually, it suppresses the text. I'll paste my script here - if someone could take a look and let me know what I'm missing, I'd be very appreciative.

---- Boot script (in /etc/init.d) ----
#Create mount point for content share
mkdir /mnt/video
#mount FTP destination as a local folder
curlftpfs display:[email protected] /mnt/video
#fetch content from remote video share and move local
cp -Rv /mnt/video/* /tv/
sh /tv/playvidloop.sh
---- End boot script ----


---- player script ----
#!/bin/bash
while :
do
setterm -blank off -powerdown off > /dev/tty0
clear > /dev/tty0
setterm -cursor off > /dev/tty0
omxplayer -r /tv/video.mov
clear > /dev/tty0
done
---- end player script ----

I've tried lumping it all together in the /etc/init.d script but it doesn't make a difference. Thoughts?
Image

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: playing omxplayer video at boot

Tue Dec 11, 2012 6:13 am

The text being displayed is from omxplayer....

Perhaps you could add echo's which would be blank lines before calling omxplayer in your script a bunch of times like:

echo ; echo ; echo ; echo ; echo;
omxplayer -r /tv/video.mov

This will position the text that omxplayer puts out in the same section that the video actually displays which would cover it.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

User avatar
Dweeber
Posts: 606
Joined: Fri Aug 17, 2012 3:35 am
Location: Mesa, AZ
Contact: Website

Re: playing omxplayer video at boot

Tue Dec 11, 2012 7:12 am

Did a short video showing this happening...

http://youtu.be/wiqYxQtfB7k

The video shows the end of the boot process which then calls the video loop script. Just be running the omxplayer script, it clears the screen like you are doing but then echo's a number of lines so that the text of that the omxplayer outputs is in a position that is covered by the video when it starts.

The video finishes and you can see it loop again before the video sample ends.

Script I am using is a bit different, but basically does the same thing...

Code: Select all

#!/bin/bash
while :
do
        setterm -blank off -powerdown off > /dev/tty0
        clear > /dev/tty0
        setterm -cursor off > /dev/tty0
        echo;echo;echo;echo;echo;echo;
        omxplayer  /src/Test_1440x576_WVC1_6Mbps.wmv
        clear > /dev/tty0
done
The colors lights that are showing on the left when the video is dark is the reflection from the Xmas tree to the right of the TV. Had to add a sound track because the cats were playing around in the background and I had sound turned on when I recorded the video on my phone.
Dweeber A.K.A. Kevin...
My RPI Info Pages including Current Setup - http://rpi.tnet.com

asinha
Posts: 2
Joined: Sun Jul 27, 2014 2:23 pm

Re: playing omxplayer video at boot

Sun Jul 27, 2014 2:33 pm

To eliminate the text output I do:
omxplayer filename > /dev/null

That seems to work for me

Return to “Troubleshooting”