MPlayer is a great movie player. SSH is a great tool to connect and transfer data over the network securely. Combining these 2 great tools together will be greater. You may already has a small server storing some movies or videos or music and playing them on your laptop will be convenient. In this post, we will introduce three methods to play movie using MPlayer over SSH.
Here, we use the example that we want to play the movie file ~/movie.mp4 on email@example.com.
Table of Contents
-X option of the ssh client, we can enable X11 forwarding. (Read: ssh manual)
ssh -X firstname.lastname@example.org mplayer ~/movie.mp4
Use ssh as a data transfer tunnel
MPlayer can play content from STDIN. We can use ssh to transfer the movie file
ssh email@example.com cat ~/movie.mp4 | mplayer -
This is also handy. The drawback is that you can not seek back when you play the movie.
Mount remote directory over ssh
This method is my favorite one.
sshfs firstname.lastname@example.org: ~/remote
Read more on mount remote folder by ssh at https://www.systutorials.com/mounting-remote-folder-through-ssh/.
Then you can just use MPlayer open the movie under ~/remote by: