https://beterhans.blogspot.com/2018/09/step-by-step-install-mpv-best-media.html
为啥是最好的?
https://www.youtube.com/watch?v=PDAugDEnltY
https://www.bilibili.com/video/av32175956/
简单来说 在旧 mac上 可以比其他任何播放器都流畅播放 HD视频 别人都是卡住 只有它能放。 新机器上自然没有区别。
1. 先安装 命令行的 APP Store 叫 Homebrew
在搜索框里 搜索 terminal 开启命令行
贴入
/usr/bin/ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"
等待 一段时间
可能要你安装 Xcode 命令行工具 要你装你就装
2. 安装 ffmpeg 很多 播放器 转码器 依赖的底层工具 (为啥要单独安装? 为了支持更多功能默认安装很多东西不装)
贴入 如下命令
brew install --with-chromaprint --with-fdk-aac --with-freetype --with-game-music-emu --with-libass --with-libbluray --with-libgsm --with-libmodplug --with-librsvg --with-libsoxr --with-libssh --with-libvorbis --with-libvpx --with-opencore-amr --with-openssl --with-rtmpdump --with-tesseract --with-tools --with-webp --with-x265 --with-srt ffmpeg
这不是简单的安装 这是编译过程 时间比较长
3. 安装 youtube-dl 并配置 mpv 依赖的
brew install youtube-dl
sudo bash -c 'cat > /etc/youtube-dl.conf'
输入你的密码
把下面的东西 贴入并按 Control C 退出
##### START CONFIG FILE
# Lines starting with # are comments
# Always extract audio
#-x
# Do not copy the mtime
#--no-mtime
# Use this proxy
#--proxy 127.0.0.1:3128
# Save all videos under Movies directory in your home directory
-o ~/Movies/youtube/%(uploader)s_%(title)s_%(id)s.%(ext)s
# Download Best 60fps MP4
-f 'bestvideo[ext=mp4][fps>30][height <=? 1080]+bestaudio[ext=m4a]/bestvideo[ext=mp4][height <=? 1080]+bestaudio[ext=m4a]/best[ext=mp4]/best'
# Description
--write-description
--write-info-json
--write-annotations
# Subtitle
--all-subs
--sub-format "srt/best"
#
--prefer-ffmpeg
--ffmpeg-location /usr/local/bin/
#### End config file
这东西的用法是
youtube-dl 网址
然后去 movie文件夹里找
这个配置会自动 合成 1080p 60fps 的 mp4 (配置不会下载 4k 因为 4k 都是 webp 格式 不能硬件加速播放)
4 最后安装 mpv 本体 (mpv 依赖 on ffmpeg and youtuble-dl 和其他很多东西)
brew tap mpv-player/mpv
brew options mpv
brew install mpv --with-bundle --with-lgpl --with-libaacs --with-libbluray --with-libcaca -with-rubberband --with-vapoursynth --with-x11
时间很长 因为要编译很多东西 不是 简单的安装 是编译。
brew cleanup
find /usr/local -name "mpv.app"
#确保只有一个输出结果
sudo rm -rf /Applications/Media/mpv.app
输入密码
sudo ln -Fs `find /usr/local -name "mpv.app"` /Applications/Media/mpv.app
输入密码
添加配置 (编译安装的最大意义)
cat > /usr/local/etc/mpv/mpv.conf
贴入以下内容并按 Control - C
# General
input-media-keys=yes # enable/disable OSX media keys
screenshot-format=png
screenshot-png-compression=8
screenshot-template='~/Pictures/%F (%P) %n'
# Video
autofit-larger=100%x90%
autofit-smaller=640x480
framedrop=vo
# Audio
audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload
audio-pitch-correction=no # automatically insert scaletempo when playing with higher speed
volume-max=100 # maximum volume in %, everything above 100 results in amplification
volume=100 # default volume, 100 = unchanged
# OSD
osd-bar-h=1.5
osd-border-size=2
osd-color='#CCFFFFFF'
osd-border-color='#99000000'
osd-duration=2000
osd-font='PingFangSC-Regular'
sub-text-font='PingFangSC-Regular'
# Font pre El Capitan
#osd-font='STHeiti'
#sub-text-font='STHeiti'
# No window border
no-border
# Save the current playback position on quit and resume on next run.
save-position-on-quit
# load config file from file directory, useful for overriding ass styles for entire series
use-filedir-conf=yes
# Subtitles
sub-auto=fuzzy
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
sub-file-paths-append=ass # search for external subs in these relative subdirectories
sub-file-paths-append=srt
sub-file-paths-append=sub
sub-file-paths-append=subs
sub-file-paths-append=subtitles
# Languages
alang=en,eng,jp,jap,zh,cmn,chi,zho
slang=en,eng,jp,jap,cmn,chi,zho,zh,eng,en
# Youtube
ytdl
ytdl-format=best
完成后 你就能用 mpv 了
字幕文件只要和片子名字 类似会自动加载
音轨也是
比如
Movie.mp4
Movie_en.srt
Movie_cn.aac
这样音轨和字幕会 自动加载
[
本帖最后由 beterhans 于 2018-9-23 21:27 编辑 ]