Stian Remvik Datagrafikk

Loop audio

Looping playlist script

You can use the same script as when looping video. Create a script named for example “audioplayer.sh”:

#!/bin/sh

Next line is the path to the audio files:

AUDIOPATH="/audiofiles/" 

The program we are using:

SERVICE="omxplayer"

now for our infinite loop!

while true; do
	if ps ax | grep -v grep | grep $SERVICE > /dev/null
	then
	sleep 1;
else
	for entry in $AUDIOPATH/*
	do
		clear
		omxplayer $entry > /dev/null
	done
fi
done

Save the script, make it executable:

$ sudo chmod +x filename

and then run it as follows:

$ ./audioplayer.sh

More options can be added to the omxplayer. E.g. force audo out of minijack:

The line:

omxplayer $entry > /dev/null

can be replaced with

omxplayer -o local $entry > /dev/null
"BITWaves" iOS app
Raspberry Pi Notes
"Neighbours" video installation
Electronic Vintage Bit20 concert visuals
"Late into that night, and all the following nights" installation
"Bergen Leser" installation
"Cubes" animation
NRK3 identity film
"Hush!" installation
"The sound of pictures" installation
Photographs
Concert visuals Knekklectic
Hulen Bergen posters and design
Notes on programming and other technical difficulties
-----------------------------------------------------

Multi screen video with Multiscreener on Mac
Seamless looping video player on Raspberry Pi using openFrameworks