2016年2月21日 星期日

play video on raspberry


安裝

sudo apt-get update
sudo apt-get -y install omxplayer

To play a video file you just need to type :
omxplayer myvideo.mp4
If you are using HDMI you should use this command to pass audio over the HDMI interface :
omxplayer -o hdmi myvideo.mp4

check video info

omxplayer -i  filename


omxplayer

Usage: omxplayer [OPTIONS] [FILE]
Options :
-h / --help                print this help
-n / --aidx  index         audio stream index    : e.g. 1
-o / --adev  device        audio out device      : e.g. hdmi/local
-i / --info                dump stream format and exit
-s / --stats               pts and buffer stats
-p / --passthrough         audio passthrough
-d / --deinterlace         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
-l / --pos                 start position (in seconds)
    --boost-on-downmix     boost volume when downmixing
    --subtitles path       external subtitles in UTF-8 srt form at
    --font path            subtitle font
                           (default: /usr/share/fonts/truetype/
                                      freefont/FreeSans.ttf)
    --font-size size       font size as thousandths of screen height
                           (default: 55)
    --align left/center    subtitle alignment (default: left)
    --lines n              number of lines to accommodate in the
                           subtitle buffer (default: 3)

Reference : http://www.raspberrypi-spy.co.uk/2013/06/playing-videos-on-the-raspberry-pi-command-line/

沒有留言:

張貼留言