What is ffplay ?
ffplay is a simple media player based on SDL and on the FFmpeg libraries.
So you can read video from command line with it !
It use SDL video output so it is fast on raspberry pi cause there is no other fastest video output which works on windowed and fullscreen mode until the raspberry pi fondation build some open gl driver.
How to install it ?
It is include in ffmpeg, open a terminal and type :
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ffmpeg
So now you can read videos in windoded mode, resize or fullscreen with ffplay.
How to use it ?
It is simple :
Ok but when I try to play a HD Video is too slow !!!
Yes, we need a version on libavcodec with hardware video decoding.
You can download it or build it.
To build it or download it, see my tutorial here :
I install libavcodec with hardware video decoding codec. What do I need now ?
If you want the hardware acceleration for reading videos you need to tell it to ffplay :
To play an hd video type, you must specify the codec “h264_mmal” :
ffplay -vcodec h264_mmal video.mp4
If you don’t want to type it everytime you can do alias in your .bash_aliases :
Edit .bash_aliases file and write :
alias ffplay264=“ffplay -vcodec h264_mmal”
save the file and launch a new terminal the type :
Is there some GUI for ffplay ?
ffplay don’t have GUI but you have a lot of key shortcuts :
q, ESC quit
f toggle full screen
p, SPC pause
a cycle audio channel in the current program
v cycle video channel
t cycle subtitle channel in the current program
c cycle program
w cycle video filters or show modes
s activate frame-step mode
left/right seek backward/forward 10 seconds
down/up seek backward/forward 1 minute
page down/page up seek backward/forward 10 minutes
mouse click seek to percentage in file corresponding to fraction of width
Mor help can be found here : http://www.herongyang.com/Flash/Video-Stream-FFmpeg-ffplay-Interactive-Command.html