Raspberry Pi omxplayer playlist daemon and YouTube player
Clone or download
Latest commit 0b44d1f Aug 27, 2018

README

omxd(1) --  daemon to maintain a playlist and play it via omxplayer
===================================================================

## SYNOPSIS

 service omxd start|stop|restart
 omxd [OPTIONS]

 echo <command> [abs-path] > /var/run/omxctl
 omxd <command> [rel-path]

## DESCRIPTION

The omxd daemon plays your playlist even if you've disconnected from your
Raspberry Pi, to allow the easy implementation of various media centre apps.
After install, omxd is started automatically at boot.

## OPTIONS (or config in /etc/omxd.conf)

 -h	Print this help text
 --version	Print omxd version
 -d	Start daemon with debug logging enabled (debug=1)
 -n	No fork, run in foreground, log to stderr (fg=1)
 -g	Gap mode, do not prepare next track (gap=1)

## COMMANDS

omxd listens for commands through the /var/run/omxctl FIFO,
please write one command at a time into it, for example:

echo A /home/foo/bar.mp3 > /var/run/omxctl

Playlist commands: Files shall be absolute paths or URLs playable by omxplayer.

 i file	insert to playlist before current item
 a file	add to playlist after current item
 A file	append to end of playlist
 I file	interrupt playlist, play file on default output, then continue playlist
 H file	interrupt playlist, play file on HDMI, then continue playlist
 J file	interrupt playlist, play file on Jack, then continue playlist
 L file	pLay file on default after current item, then continue playlist
 .	replay current item
 h	change default output to HDMI
 j	change default output to Jack
 n	next
 N	previous
 g num	go to nth track, counted from zero
 d	next directory
 D	previous directory
 x	delete current item from playlist, play next
 x num	delete nth item from playlist, counted from zero
 X	delete entire playlist, terminate playback
 l	looping playback (default)
 e	stop at End of playlist
 u	unsorted playback (shuffle)

Other commands control the running omxplayer instance.

 f	forward 30s
 r	rewind  30s
 F	forward 600s
 R	rewind  600s
 p	play/pause
 P	pause playlist, stop omxplayer
 k	next audio stream
 K	previous audio stream
 o	next chapter
 m	next subtitle stream
 M	previous subtitle stream
 s	toggle subtitles
 -	volume down
 +	volume up

Client commands:

 S	show what's playing now

Pass additional omxplayer options:

 O opts	add omxplayer Options, valid from now on, restart player
 O	clear additional omxplayer Options, restart player

## CLIENT MODE

You can call omxd with the above commands as arguments, it writes them
into /var/run/omxctl, but translates relative paths into absolute ones
and performs commands recursively if you specify a directory as the file.

## FILES

When you start 'omxd -d' as an unprivileged user the files below
will be created in the current directory instead of the locations below,
to allow easier testing.

     /var/run/omxctl	FIFO to write commands into
     /var/local/omxplay	playlist file, actual item indicated by >
     /var/log/omxlog	log file
     /var/log/omxstat	status log file
     /var/log/omxplayer.log.<pid>
     /etc/omxd.conf	configuration, see options above
     /etc/init.d/omxd	init script

## BUGS

Fix audio problems in default low-gap mode (without activating Gap mode):
Add `audio_pwm_mode=0` to the RPi's `/boot/config.txt` file.