Difference between revisions of "Mpv"
From Indie IT Wiki
imported>Plittlefield |
Plittlefield (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 29: | Line 29: | ||
mpv --start=<time> seek to given (percent, seconds, or hh:mm:ss) position | mpv --start=<time> seek to given (percent, seconds, or hh:mm:ss) position | ||
+ | |||
+ | == Subtitles == | ||
+ | |||
+ | Save the subtitles file with ''exactly'' the same name as the video file and mpv will play them automatically. | ||
+ | |||
+ | e.g. | ||
+ | |||
+ | Movie Name (2024) - HD.mp4 | ||
+ | Movie Name (2024) - HD.eng.srt | ||
+ | |||
+ | '''Over Network''' | ||
+ | |||
+ | To play subtitles automatically over the network, you will have to mount your network path locally by using something like nfs or sshfs. | ||
+ | |||
+ | e.g. | ||
+ | |||
+ | # create folder for mount | ||
+ | mkdir /home/jsmith/nas | ||
+ | |||
+ | # mount remote folder locally | ||
+ | sshfs nas:/remote/folder/to/movie/ /home/jsmith/nas/ | ||
+ | |||
+ | # play movie and subtitles | ||
+ | mpv /home/jsmith/nas/"Movie Name (2024) - HD.mp4" | ||
+ | |||
+ | # unmount remote folder | ||
+ | fusermount -u /home/jsmith/nas | ||
[[Category:Multimedia]] | [[Category:Multimedia]] | ||
[[Category:Software]] | [[Category:Software]] |
Latest revision as of 09:27, 10 August 2024
Introduction
mpv is a free open source media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types. Powerful scripting capabilities can make the player do almost anything.
Usage
Usage: mpv [options] [url|path/]filename Basic options: --no-audio do not play sound --no-video do not play video --fs fullscreen playback --sub-file=<file> specify subtitle file to use --playlist=<file> specify playlist file --list-options list all mpv options --h=<string> print options which contain the given string in their name
Keyboard Shortcuts
https://defkey.com/mpv-media-player-shortcuts
Playing Media Over SSH
mpv sftp://username:password@192.168.0.252"/path/to/Movie Name (2020).avi"
Seek To Time Before Playing
mpv --start=
Subtitles
Save the subtitles file with exactly the same name as the video file and mpv will play them automatically.
e.g.
Movie Name (2024) - HD.mp4 Movie Name (2024) - HD.eng.srt
Over Network
To play subtitles automatically over the network, you will have to mount your network path locally by using something like nfs or sshfs.
e.g.
# create folder for mount mkdir /home/jsmith/nas # mount remote folder locally sshfs nas:/remote/folder/to/movie/ /home/jsmith/nas/ # play movie and subtitles mpv /home/jsmith/nas/"Movie Name (2024) - HD.mp4" # unmount remote folder fusermount -u /home/jsmith/nas