So I’ve been playign with trying to do a boot image or a boot movie with the Raspberry Pi for a while now, and all the comments and tips keep going back to a tutorial on how to boot a static image. It works, but there are a lot of problems with it like failing gracefully and not returning the console window back if you aren’t booting to X. So I decided to come up with another way. This is based off the tutorial found here: http://www.edv-huber.com/index.php/problemloesungen/15-custom-splash-screen-for-raspberry-pi-raspbian and looks like this when finished:
Instead of using the program fbi, we will use omxplayer to playback a video file while the Raspberry Pi is booting in the background.
First off, you will want to copy the 15 to 20 second movie file to your Raspberry Pi device. Anything shorter and the video will end before it’s finished booting and you will continue to see the kernel messages. You can use any video file that omxplayer can play back, but I like .mov and .mp4 files.
You will need to edit your /boot/cmdline.txt file:
sudo nano /boot/cmdline.txt
Add quiet to the end of the line. It will look something like this:
Press ctrl-x, type y to confirm save, then press enter to return to the command line.
Copy your video somewhere to the Raspberry Pi. I keep mine in /home/pi/ and call the video video.mov
You will now need to create a startup script that will run omxplayer at bootup. I have modified the script from the above link.
sudo nano /etc/init.d/asplashscreen
### BEGIN INIT INFO
# Provides: asplashscreen
# Default-Start: S
# Short-Description: Show custom splashscreen
# Description: Show custom splashscreen
### END INIT INFO
As you saw in my previous post / video, I was running Youtube videos in fullscreen on my little display. I was using an application (really just a 2000+ line perl script) that does this for me. The program is called youtube-viewer (github)
Gcala posted a nice guide on how to set it up and has given me permission to also repost it here. I’m making some modifications as I had to do a couple changes, but it works.
Now just type youtube-viewer on the command line and you are good to go 🙂
List of Commands
all : play all the results in order
next : go to the next page (same as <ENTER>)
back : return to the previous page
login : will prompt you for login
logout : will delete the authentication key
[integer] : play the corresponding video
i, info [i] : show more informations about one video
c, comments [i] : show video comments (e.g.: c 19)
r, related [i] : show related videos (e.g.: r 6)
v, videos [i] : show author's latest videos
p, playlists [i] : show author's latest playlists
subscribe [i] : subscribe to author's channel
like, dislike [i] : like or dislike a video
fav, favorite [i] : favorite a video (e.g.: fav 3)
[keywords] : search for youtube videos
3-8, 3..8 : same as 3 4 5 6 7 8
8 2 12 4 6 5 1 : play the videos in your order
-argv -argv2=v : set some arguments (e.g.: -u=google)
e, edit-config : edit and apply the configuration
load-config : (re)load the configuration file
/my?[regex]*$/ : play videos matched by a regex (/i)
reset, reload : restart the application
q, quit, exit : close the application
This weekend has been fun. I got my 2.0″ LCD Display from Adafruit in! It’s an amazing little screen. Bright, Sharp, Colorful. MAME, Quake, NeoGeo games all look great on it. A concern I had was how to power the little screen. It can take 5v – 12v, and the connector is just two bare wires for power.
After testing the screen with a regular power supply, I decided I wanted to see if I could power it via the GPIO power pins on the Raspberry Pi itself. I was concerned about the amperage it would require, but after connecting it to pins 2 and 6 (5v and GND), and powering on the Pi, they both turned on and I was watching Raspbian bootup.
On the Raspberry Pi Forums, gcala contributed a post with a how to on getting Youtube to play from the command line to omxplayer.
Here is a video I took after getting youtube-viewer running on my Pi: