mpv
跳转到导航
跳转到搜索
命令
使用摄像头
mpv --untimed --no-demuxer-thread av://v4l2:/dev/video0
当镜子用:
mpv --untimed --no-demuxer-thread --vf=hflip av://v4l2:/dev/video0
直播流
要避免较大的延迟,使用:
mpv --untimed --no-demuxer-thread MJPEG_URL
缩放算法
在更大的分辨率下观看录屏时(比如 4K 显示器下观看 1080p 游戏录影),可以使用 --scale=nearest
来得到更锐利的效果。
配置
[default]
sub-codepage = cp936
slang = zh_CN,zho,chi,zh,zh_TW,eng,en,jpn,ja
demuxer-readahead-secs = 20
ao = pulse
hwdec = auto
# this will cause broken cover images
# hwdec-codecs = all
# use too much GPU
# scale = ewa_lanczossharp
scale = spline36
dscale = mitchell
ytdl-raw-options=yes-playlist=
# mpv will by default pass "bestvideo+bestaudio/best", which selects h264 over vp9 because of its larger size
ytdl-format=(bestvideo[height<=3840][vcodec=vp9]/bestvideo[height<=3840])+bestaudio
# use yt-dlp
script-opts=ytdl_hook-ytdl_path=yt-dlp
compdef mpv=mpv
mpv () {
if [[ -z $WAYLAND_DISPLAY && -n $DISPLAY ]]; then
# or too big
command mpv --no-hidpi-window-scale "$@"
else
# or blurry
command mpv "$@"
fi
}