mpv 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

mpv 命令安装:


-bash/zsh: mpv command not not found

# Windows (WSL2)
sudo apt-get update sudo apt-get install mpv

# Debian
apt-get install mpv

# Ubuntu
apt-get install mpv

# Alpine
apk add mpv

# Arch Linux
pacman -S mpv

# Kali Linux
apt-get install mpv

# OS X
brew install mpv

# Raspbian
apt-get install mpv

# Docker
docker run cmd.cat/mpv mpv

mpv 命令补充说明:


mpv 是一款免费的命令行媒体播放器。它支持多种媒体文件格式、音频和视频编解码器以及字幕类型。

mpv 具有基于 OpenGL、Vulkan 和 D3D11 的视频输出,能够实现许多视频发烧友喜爱的功能,例如使用流行的高质量算法进行视频缩放、色彩管理、帧定时、插值、HDR 等。

mpv 命令语法:


mpv [options] [file|URL|-]
mpv [options] --playlist=PLAYLIST
mpv [options] files
mpv [options] {group of files and options}
mpv [bd]://[title][/device] [options]
mpv dvd://[title|[start_title]-end_title][/device] [options]
mpv dvdnav://[longest|menu|title][/device] [options]
mpv vcd://[/device]
mpv tv://[channel][/input_id] [options]
mpv radio://[channel|frequency][/capture] [options]
mpv pvr:// [options]
mpv dvb://[card_number@]channel [options]
mpv mf://[filemask|@listfile] [-mf options] [options]
mpv cdda://track[-endtrack][:speed][/device] [options]
mpv [file|mms[t]|http|httpproxy|rt[s]p|ftp|udp|smb]://[user:pass@]URL[:port] [options]
mpv edl://[edl specification as in edl-mpv.rst]

mpv 命令选项:


mpv has a fully configurable, command-driven  control  layer  which  allows  you  to  control  mpv  using
 keyboard,  mouse,  joystick or remote control (with LIRC). See the --input- options for ways to customize
 it.

Keyboard Control
 LEFT and RIGHT
        Seek backward/forward 10 seconds. Shift+arrow does a 1 second exact seek (see --hr-seek).

 UP and DOWN
        Seek forward/backward 1 minute. Shift+arrow does a 5 second exact seek (see --hr-seek).

 PGUP and PGDWN
        Seek forward/backward 10 minutes.

 [ and ]
        Decrease/increase current playback speed by 10%.

 { and }
        Halve/double current playback speed.

 BACKSPACE
        Reset playback speed to normal.

 < and >
        Go backward/forward in the playlist.

 ENTER  Go forward in the playlist, even over the end.

 p / SPACE
        Pause (pressing again unpauses).

 .      Step forward. Pressing once will pause movie, every consecutive press will play one frame and then
        go into pause mode again.

 ,      Step backward. Pressing once will pause movie, every consecutive press  will  play  one  frame  in
        reverse and then go into pause mode again.

 q / ESC
        Stop playing and quit.

 Q      Like  q,  but  store the current playback position. Playing the same file later will resume at the
        old playback position if possible.

 U      Stop playing (and quit if --idle is not used).

 + and -
        Adjust audio delay by +/- 0.1 seconds.

 / and *
        Decrease/increase volume.

 9 and 0
        Decrease/increase volume.

 ( and )
        Adjust audio balance in favor of left/right channel.

 m      Mute sound.

 _      Cycle through the available video tracks.

 #      Cycle through the available audio tracks.

 TAB (MPEG-TS and libavformat only)
        Cycle through the available programs.

 f      Toggle fullscreen (see also --fs).

 T      Toggle stay-on-top (see also --ontop).

 w and e
        Decrease/increase pan-and-scan range.

 o      Toggle OSD states: none / seek / seek + timer / seek + timer + total time.

 d      Toggle frame dropping states: none / skip display / skip decoding (see --framedrop).

 v      Toggle subtitle visibility.

 j and J
        Cycle through the available subtitles.

 F      Toggle displaying "forced subtitles".

 x and z
        Adjust subtitle delay by +/- 0.1 seconds.

 V      Toggle subtitle VSFilter aspect compatibility  mode.  See  --ass-vsfilter-aspect-compat  for  more
        info.

 r and t
        Move subtitles up/down.

 s      Take a screenshot.

 S      Take a screenshot, without subtitles. (Whether this works depends on VO driver support.)

 I      Show filename on the OSD.

 P      Show progression bar, elapsed time and total duration on the OSD.

 ! and @
        Seek  to the beginning of the previous/next chapter. In most cases, "previous" will actually go to
        the beginning of the current chapter; see --chapter-seek-threshold.

 D (--vo=vdpau, --vf=yadif only)
        Activate/deactivate deinterlacer.

 A      Cycle through the available DVD angles.

 c      Change YUV colorspace.

 (The following keys are valid only when using a video output that supports the corresponding  adjustment,
 or the software equalizer (--vf=eq).)

 1 and 2
        Adjust contrast.

 3 and 4
        Adjust brightness.

 5 and 6
        Adjust gamma.

 7 and 8
        Adjust saturation.

 (The following keys are valid only on OSX.)

 command + 0
        Resize movie window to half its original size.

 command + 1
        Resize movie window to its original size.

 command + 2
        Resize movie window to double its original size.

 command + f
        Toggle fullscreen (see also --fs).

 command + [ and command + ]
        Set movie window alpha.

 (The following keys are valid if you have a keyboard with multimedia keys.)

 PAUSE  Pause.

 STOP   Stop playing and quit.

 PREVIOUS and NEXT
        Seek backward/forward 1 minute.

 (The following keys are only valid if you compiled with TV or DVB input support.)

 h and k
        Select previous/next channel.

 n      Change norm.

 u      Change channel list.

Mouse Control
 button 3 and button 4
        Seek backward/forward 1 minute.

 button 5 and button 6
        Decrease/increase volume.

mpv 命令实例:


mpv 从网址或文件播放视频或音频:

mpv url|path/to/file'

mpv 向后/向前跳跃 5 秒:

LEFT <or> RIGHT

mpv 向前/向后跳转 1 分钟:

DOWN <or> UP

mpv 播放速度降低或提高 10%:

[ <or> ]

mpv 截取当前帧的屏幕截图(默认保存为 `./mpv-shotNNNN.jpg`):

s

mpv 以指定速度播放文件(默认速度为 1):

mpv --speed 0.01..100 path/to/file

mpv 使用 mpv.conf 文件中定义的配置文件播放文件:

mpv --profile profile_name path/to/file

mpv 显示网络摄像头或其他视频输入设备的输出:

mpv /dev/video0

mpv 命令扩展阅读:


 

CommandNotFound ⚡️ 坑否 - 其他频道扩展阅读:




mpv 命令评论