missing man omxplayer

6 posts
by elatllat » Thu Jun 28, 2012 10:11 pm
"omxplayer --help" gives CLI arg options only.
spacebar is play/pause,
can't seem to find any other options short of reading the source code ~
Posts: 1027
Joined: Sat Dec 17, 2011 5:05 pm
by KenT » Fri Jun 29, 2012 5:53 am
Pi Presents - A toolkit to produce multi-media interactive displays for museums, visitor centres, and more
Download from http://pipresents.wordpress.com
Posts: 576
Joined: Tue Jan 24, 2012 9:30 am
Location: Hertfordshire, UK
by elatllat » Fri Jul 06, 2012 9:55 pm

Thanks a link to a link to the source.

The answer:
p #play/pause (or space)
q #quits
$'\x1b\x5b\x44' #seek -30(left)
$'\x1b\x5b\x43' #seek +30(right)
$'\x1b\x5b\x41' #seek -600(down)
$'\x1b\x5b\x42' #seek +600(up)
z #info
1 #slower
2 #faster
j #previous audio track
k #next audio track
+ #volume up
- #volume down
i #previous chapter
o #next chapter
n #previous subtitle track
m #next subtitle track
s #toggle subtitles

These can also be send via named pipe (remote control):
mkfifo /tmp/omxplayer.pipe
omxplayer -ohdmi mymedia.avi < /tmp/omxplayer.pipe
echo . > /tmp/omxplayer.pipe #(initial wait for input via the fifo)
Posts: 1027
Joined: Sat Dec 17, 2011 5:05 pm
by ninjasFTW » Wed Jul 11, 2012 10:35 am
Does echoing commands to the named pipe once omxplayer is running work?

Nothing seems to happen when I try it after the initial echo to the pipe starts it
Posts: 1
Joined: Wed Jul 11, 2012 10:33 am
by psypi » Tue Jul 31, 2012 11:50 pm
I found you nedded to add the -n option to get control to work
echo -n p >tmp/cmd
also thanks for the control codes for left arrow, right arrow I can now control omxplayer from PHP
$com = 'echo -n p >/var/www/mysite/tsmuxercontrol/fifo ';
exec("$com ",$sigresults);
Posts: 3
Joined: Tue Jul 31, 2012 11:45 pm
by elatllat » Thu Jul 17, 2014 5:52 pm
Latest version:
Code: Select all
omxplayer -v
omxplayer - Commandline multimedia player for the Raspberry Pi
        Build date: Sat, 22 Mar 2014 20:58:15 +0000
        Version   : 39e6342 [master]
        Repository: https://github.com/popcornmix/omxplayer.git

Code: Select all
omxplayer -h
Usage: omxplayer [OPTIONS] [FILE]
Options :
         -h / --help                    print this help
         -v / --version                 print version info
         -k / --keys                    print key bindings
         -n / --aidx  index             audio stream index    : e.g. 1
         -o / --adev  device            audio out device      : e.g. hdmi/local/both
         -i / --info                    dump stream format and exit
         -s / --stats                   pts and buffer stats
         -p / --passthrough             audio passthrough
         -d / --deinterlace             force deinterlacing
              --nodeinterlace           force no deinterlacing
         -w / --hw                      hw audio decoding
         -3 / --3d mode                 switch tv into 3d mode (e.g. SBS/TB)
         -y / --hdmiclocksync           adjust display refresh rate to match video (default)
         -z / --nohdmiclocksync         do not adjust display refresh rate to match video
         -t / --sid index               show subtitle with index
         -r / --refresh                 adjust framerate/resolution to video
         -g / --genlog                  generate log file
         -l / --pos n                   start position (hh:mm:ss)
         -b / --blank                   set background to black
              --loop                    loop file. Ignored if file is not seekable, start position applied if given
              --no-boost-on-downmix     don't boost volume when downmixing
              --vol n                   Set initial volume in millibels (default 0)
              --amp n                   Set initial amplification in millibels (default 0)
              --no-osd                  do not display status information on screen
              --subtitles path          external subtitles in UTF-8 srt format
              --font path               subtitle font
                                        (default: /usr/share/fonts/truetype/freefont/FreeSans.ttf)
              --italic-font path        (default: /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf)
              --font-size size          font size as thousandths of screen height
                                        (default: 55)
              --align left/center       subtitle alignment (default: left)
              --no-ghost-box            no semitransparent boxes behind subtitles
              --lines n                 number of lines to accommodate in the subtitle buffer
                                        (default: 3)
              --win "x1 y1 x2 y2"       Set position of video window
              --audio_fifo  n           Size of audio output fifo in seconds
              --video_fifo  n           Size of video output fifo in MB
              --audio_queue n           Size of audio input queue in MB
              --video_queue n           Size of video input queue in MB
              --threshold   n           Amount of buffered data required to come out of buffering in seconds
              --orientation n           Set orientation of video (0, 90, 180 or 270)
              --fps n                   Set fps of video where timestamps are not present
              --live                    Set for live tv or vod type stream
              --layout                  Set output speaker layout (e.g. 5.1)
              --dbus_name name          Set D-Bus bus name
                                        (default: org.mpris.MediaPlayer2.omxplayer)
              --key-config <file>       Uses key bindings specified in <file> instead of the default
              --layer n                 Set the video render layer number (higher numbers are on top)

Code: Select all
omxplayer -k
Key bindings :
        1                  decrease speed
        2                  increase speed
        <                  rewind
        >                  fast forward
        z                  show info
        j                  previous audio stream
        k                  next audio stream
        i                  previous chapter
        o                  next chapter
        n                  previous subtitle stream
        m                  next subtitle stream
        s                  toggle subtitles
        d                  decrease subtitle delay (- 250 ms)
        f                  increase subtitle delay (+ 250 ms)
        q                  exit omxplayer
        p / space          pause/resume
        -                  decrease volume
        + / =              increase volume
        left arrow         seek -30 seconds
        right arrow        seek +30 seconds
        down arrow         seek -600 seconds
        up arrow           seek +600 seconds
Posts: 1027
Joined: Sat Dec 17, 2011 5:05 pm