最新消息:不要跟我说什么底层原理、框架内核!老夫敲代码就是一把梭! 复制,粘贴,拿起键盘就是干!!

Mpv Player播放器Win10下设置mpv.conf配置文件

软件·服务器 楚盟 2032浏览 0评论

mpv基础界面是非常简陋的,不像win系统下其它播放器一样有大量图形化设置选项,如果需要更丰富的设置需要通过mpv配置文件来定义;

一、首先查找默认配置文件位置

windows: Win+R打开运行,输入 %APPDATA%/mpv/

Linux: 终端执行命令:nemo ~/.config/mpv/

Mac: 终端执行命令:open ~/.config/mpv/

mpv配置文件下载地址:https://github.com/ahjolinna/mpv-conf

它会自动找到并打开所属文件夹,例如我的win10默认文件是C:\Users\Administrator\AppData\Roaming\mpv,空的因为我没有创建过配置文件;

二、配置mpv.conf配置文件

通过上一步骤找到了配置文件夹,新建一个mpv.conf纯文本将下面的配置文件拷贝进去;

友情提醒:mpv我还不熟悉,下面的参数肯定有不合理的地方或者缺失不完善的设置,慢慢改进吧;


#SVP support for those who have it (https://www.svp-team.com/wiki/Main_Page)
#input-ipc-server=/tmp/mpvsocket
#input-unix-socket=/tmp/mpvsocket
# use this to detect auto-options malfunctions
dither-depth=auto
x11-bypass-compositor=never
save-position-on-quit
vo-vdpau-composite-detect

#############
# Cache #
#############

cache=auto
cache-default=16000                     # size in KB
cache-backbuffer=16000                  # size in KB
cache-initial=1000                      # start playback when your cache is filled up with x kB
cache-seek-min=2000
cache-secs=30                           # how many seconds of audio/video to prefetch if the cache is active
cache-file=TMP
cache-file-size=8000000
#mpv plugin for caching live streams robust against network glitches without lengthening initial cache fill up period. (source https://github.com/lvml/mpv-plugin-streamcache)

#script=/etc/mpv/scripts/streamcache.lua   

hls-bitrate=max # use max quality for HLS streams

#Aspect Moniteur [ 1280:1024 = 1.25 = 5:4; != 4:3 ;) ]
#monitoraspect = 5:4
#### 1280:800 = 1.6 = 16:10
#monitoraspect = 16:10
#### 1920:1080 = 16:9
monitoraspect = 16:9
#video-aspect=16:9
autofit-larger=50%

#Interlaced video shows ugly comb-like artifacts, which are visible on fast movement
deinterlace=yes

# Replacement for quvi. Always use 1080p+ or 60 fps where available. Prefer VP9
# over AVC and VP8 for high-resolution streams.
ytdl=yes
ytdl-format=(bestvideo[ext=webm]/bestvideo[height>1080]/bestvideo[fps=60])[tbr<13000]+(bestaudio[acodec=opus]/bestaudio[ext=webm]/bestaudio)/best

#############
# Audio #
#############

audio-file-auto=fuzzy                   # external audio doesn't has to match the file name exactly to autoload
audio-pitch-correction=yes              # automatically insert scaletempo when playing with higher speed
volume-max=130                          # maximum volume in %, everything above 100 results in amplification
volume=90                               # default volume, 100 = unchanged
pulse-buffer=50                         # using a large buffer causes seeking issues
audio-channels = stereo
audio-normalize-downmix=yes

# DTS-MA decoding
ad=lavc:libdcadec
# Output some video stats
term-playing-msg='Resolution: ${width}x${height}, Framerate: ${fps} Hz'

# Higher quality screenshots
screenshot-format=png
screenshot-png-compression=8
screenshot-tag-colorspace=yes
screenshot-directory=~/Pictures
screenshot-high-bit-depth=yes
screenshot-template=~/Pictures/%F-%P-shot-%04n

###################
# Languages #
###################

slang=eng,en,enUS,en-US                   # automatically select these subtitles (decreasing priority)
alang=jpn,jp,eng,en,enUS,en-US            # automatically select these audio tracks (decreasing priority)
ytdl-raw-options=sub-lang="en,eng,enUS,en-US",write-sub=

keep-open # keep the player open when a file's end is reached

# Colors!
msg-color=yes                             # Colors!

###################
# OSD / OSC #
###################
osd-font="Source Sans Pro Semibold"     # OSD rice (for file info)
osd-font-size=30
osd-color="#ffffffff"                   # ARGB format
osd-border-color="#ff151515"            # ARGB format
osd-bar-align-y=0                       # progress bar y alignment (-1 top, 0 centered, 1 bottom)
osd-border-size=2                       # size for osd text and progress bar
osd-shadow-offset=1                     # pixel width for osd text and progress bar
osd-bar-w=60                            # width of " " "
osd-shadow-color="#11000000"
osd-fractions

###################
# Subtitles #
###################

demuxer-mkv-subtitle-preroll                    # try to correctly show embedded subs when seeking
sub-auto=fuzzy                                  # external subs don't have to match the file name exactly to autoload
sub-file-paths=ass:srt:sub:subs:subtitles       # search for external subs in the listed subdirectories
embeddedfonts=yes                               # use embedded fonts for SSA/ASS subs
sub-ass-force-style=Kerning=yes                 # allows you to override style parameters of ASS scripts

# the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT)
sub-font="Source Sans Pro Semibold"
sub-font-size=52
sub-color="#FFFFFFFF"
sub-border-color="#FF262626"
sub-border-size=3.2
sub-shadow-offset=1
sub-shadow-color="#33000000"
sub-spacing=0.5

### For some weird reason, that appears to be needed on on some system, even though it semms to be properly auto-detected?
### I have disabled it by default and I have the common 60(fps/hz) as an example
#display-fps = 60

# I don't want to wait ages for the window to finally show up before I can move my focus around again
[protocol.http]
force-window=yes

[protocol.https]
force-window=yes

[default]

####################################################
# Protocol Specific Configuration #
####################################################

[protocol.https]
cache=yes
#cache-default=500000                         # size in KB
#cache-backbuffer=250000                      # size in KB
#cache-secs=30                                # how many seconds of audio/video to prefetch
no-cache-pause                                # if the player should pause when the cache runs low
user-agent='Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0'

[protocol.http]
cache=yes
#cache-default=500000                         # size in KB
#cache-backbuffer=250000                      # size in KB
#cache-secs=30                                # how many seconds of audio/video to prefetch
no-cache-pause                                # if the player should pause when the cache runs low
user-agent='Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0'

[extension.gif]
cache=no
no-pause
loop-file=yes

[extension.webm]
cache=no
no-pause
loop-file=yes

stop-screensaver = yes

三、配置input.conf配置动作文件

= set sub-delay ${=time-pos}
Z sub_step +1
X sub_step -1

Shift+RIGHT seek  +5 relative exact; add sub-delay  +5
Shift+LEFT  seek  -5 relative exact; add sub-delay  -5
Shift+UP    seek +60 relative exact; add sub-delay +60
Shift+DOWN  seek -60 relative exact; add sub-delay -60

C cycle colormatrix
R cycle colormatrix-input-range
S screenshot window

转载请注明:楚盟网 » Mpv Player播放器Win10下设置mpv.conf配置文件

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址