First of all, "The only player that will utilize the GPU acceleration is the omxplayer
. It should be installed by default, but it is also so basic that it is CLI only." - Debian Forums
This means that your only option is to use omxplayer.
I am not sure if it is able to play webm
files, so that means that we should convert it. I have found that .mov
files work well with the pi, so that is what we will convert it to.
Stage 1 - Conversion
Go to Leawo.com and download either the Mac or PC version of the software.
Upload your .webm
file into the program.
Select .mov
as the video output.
Click on the convert
button.
Stage 2 - Download OMXPlayer and Put Your Video Into the Pi
Now, we download OMXPlayer
. In the terminal, type:
sudo apt-get update
sudo apt-get upgrade
Then, download OMXPlayer
sudo apt-get omxplayer
If you haven't already put the video file onto your Pi, email your self the video and save it wherever you want to.
Stage 3 - The Loop Script
We are almost done. Run this bash
script to start the auto loop. Here is the source link:
http://www.raspberrypi.org/phpBB3/viewtopic.php?p=285237#p285237
Enjoy!
#!/bin/bash
# autoloop-patch.sh
# autoloop patch for raspbian
# v.0.2
# Raspberry Pi Forum User denjell
# http://www.raspberrypi.org/phpBB3/memberlist.php?mode=viewprofile&u=56730
# copyleft 2013 / no guarantees of fitness for any purpose
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# READ THIS FIRST BEFORE RUNNING THE FILE!
# ----------------------------------------
# this script creates 2 files on your system and modifies /etc/inittab.
# 1) /etc/init.d/startup
# 2) /home/{user}/autoloop.sh
# 3) /etc/inittab
# it assumes general knowledge of stuff like debian and media files / codecs
# it should work on most raspians, however I recommend a clean image.
# Step0: follow the instructions here to make your RPi distro:
# http://elinux.org/RPi_Easy_SD_Card_Setup
# choose medium overclocking
# do not activate the window manager (ie only command line interface)
# Step1: place this script in your /home/%user folder (on the Rpi)
# type: (without the quotes)
# "nano /home/pi/autoloop-patch.sh"
# copy this script with ctl-c
# paste it in into the nano editor with shift-ctl-v
# save it with ctl-x
# Step2: place your media file in /home/pi or whatever:
# e.g. /home/pi/movie.mp4
# it must be h264 video and PCM 16bit signed little endian audio stream
# Step3: type (without the quotes and use your user name instead of pi):
# "sudo bash /home/pi/autoloop-patch.sh /home/pi/movie.mp4"
# you can run this script anytime you want a new film to loop
# it will re-run the setup and restart your RPi.
# Step4: how to exit the loop.
# http://en.wikipedia.org/wiki/Magic_SysRq_key
# This works for me. However, I cannot guarantee it will work for you.
# I do not manage a help desk, and this patch is provided "as is".
# Good luck. Have fun. Do stuff.
#find the user
user=${PWD##*/}
file=$1
# create the startup script
sudo echo "#! /bin/sh
case \$1 in
start)
sudo bash /home/"${user}"/omx-loop.sh "${file}" >/dev/null 2>&1
;;
esac
exit 0" > /etc/init.d/startup.sh
sudo chmod 755 /etc/init.d/startup.sh
sudo update-rc.d startup.sh defaults -nn
echo "/etc/init.d/startup created and initialized"
echo "#!/bin/sh
SERVICE='omxplayer'
while true; do
setterm -blank off -powerdown off > /dev/tty0
clear > /dev/tty0
setterm -cursor off > /dev/tty0
echo;echo;echo;echo;echo;echo;
clear > /dev/tty0
if ps ax | grep -v grep | grep \$SERVICE > /dev/null
then
echo; # sleep 1
else
echo;echo;echo;echo;echo;echo;
omxplayer -o hdmi \$1 & > /dev/null
clear > /dev/tty0
fi
done" > /home/${user}/omx-loop.sh
echo "/home/pi/omx-loop.sh created"
sudo chmod 755 /home/${user}/omx-loop.sh
# remove the old inittab
sudo rm /etc/inittab
# write a new inittab
sudo echo "
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# modified by denjell
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
# z6:6:respawn:/sbin/sulogin
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
# 1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100" > '/etc/inittab'
echo "it seems we got this far."
read -p "Restart System Now? (y/n) " RESP
if [ "$RESP" = "y" ]; then
echo "Restarting."
sudo reboot
fi
echo "You must restart your system to initialize autostarting autoloop."