日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

[日常笔记] 2: 本地视频播放器 MPV

發(fā)布時間:2023/12/20 编程问答 53 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [日常笔记] 2: 本地视频播放器 MPV 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

這篇文章記錄本地視頻播放器 MPV player 相關(guān)信息

?

官網(wǎng):https://mpv.io/

這是一款免費(fèi)的開源的跨平臺的視頻播放軟件

?

安裝部分

?-----------------------------------------------------------------------------------------------------------------------------------------------

Window 平臺下載地址:https://mpv.srsfckn.biz/

下載好的文件解壓后如下,將其復(fù)制到任何文件夾(確保不被刪除)

--------------------------------------------------------------------------------------------------------------------------------------------------

?如果還需要設(shè)置文件關(guān)聯(lián),則可以下載文件 mpv-install.bat 并運(yùn)行。

下載地址:https://github.com/rossy/mpv-install/blob/master/README.md

同時網(wǎng)址有安裝說明,簡要截圖如下:

在運(yùn)行bat的最后會自動打開控制面板的設(shè)置默認(rèn)程序,將mpv 設(shè)置為默認(rèn)程序即可。

ps: 安裝完成之后,該軟件是沒有GUI界面的,要使用時,直接雙擊視頻文件即可。

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

?

使用設(shè)置

?

?1. 播放常用快捷鍵:

?

2. 配置文件

功能:自定義mpv播放器,讓其更符合自己的使用習(xí)慣。

路徑:(window平臺)%APPDATA%/mpv/? ? 【打開方式:Win+R 運(yùn)行 %APPDATA%/mpv/】

ps: 需要先運(yùn)行一次mpv,否則可能提示文件夾不存在

?

配置文件修改:打開上面路徑的文件夾后,可看到mpv.conf文件[如果沒有自己新建即可],在mpv.conf 文件里面寫入相關(guān)配置信息即可實(shí)現(xiàn)相應(yīng)設(shè)置。

配置示例文件路徑:https://github.com/mpv-player/mpv/blob/master/etc/mpv.conf

#
?# Example mpv configuration file
?#
?# Warning:
?#
?# The commented example options usually do _not_ set the default values. Call
?# mpv with --list-options to see the default values for most options. There is
?# no builtin or example mpv.conf with all the defaults.
?#
?#
?# Configuration files are read system-wide from /usr/local/etc/mpv.conf
?# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
?# system-wide settings, all of which are overridden by the command line.
?#
?# Configuration file settings and the command line options use the same
?# underlying mechanisms. Most options can be put into the configuration file
?# by dropping the preceding '--'. See the man page for a complete list of
?# options.
?#
?# Lines starting with '#' are comments and are ignored.
?#
?# See the CONFIGURATION FILES section in the man page
?# for a detailed description of the syntax.
?#
?# Profiles should be placed at the bottom of the configuration file to ensure
?# that settings wanted as defaults are not restricted to specific profiles.
??
?##################
?# video settings #
?##################
??
?# Start in fullscreen mode by default.
?fs=yes
??
?# force starting with centered window
?geometry=50%:50%
??
?# don't allow a new window to have a size larger than 90% of the screen size
?autofit-larger=90%x90%
??
?# Do not close the window on exit.
?keep-open=yes
??
?# Do not wait with showing the video window until it has loaded. (This will
?# resize the window once video is loaded. Also always shows a window with
?# audio.)
?force-window=immediate
??
?# Disable the On Screen Controller (OSC).
?osc=no
??
?# Keep the player window on top of all other windows.
?ontop=yes
??
?# Specify high quality video rendering preset (for --vo=gpu only)
?# Can cause performance problems with some drivers and GPUs.
?profile=gpu-hq
??
?# Force video to lock on the display's refresh rate, and change video and audio
?# speed to some degree to ensure synchronous playback - can cause problems
?# with some drivers and desktop environments.
?video-sync=display-resample
??
?# Enable hardware decoding if available. Often, this does not work with all
?# video outputs, but should work well with default settings on most systems.
?# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
?# may or may not help.
?hwdec=auto
??
?##################
?# audio settings #
?##################
??
?# Specify default audio device. You can list devices with: --audio-device=help
?# The option takes the device string (the stuff between the '...').
?audio-device=alsa/default
??
?# Do not filter audio to keep pitch when changing playback speed.
?audio-pitch-correction=no
??
?# Output 5.1 audio natively, and upmix/downmix audio with a different format.
?#audio-channels=5.1
?# Disable any automatic remix, _if_ the audio output accepts the audio format.
?# of the currently played file. See caveats mentioned in the manpage.
?# (The default is "auto-safe", see manpage.)
?audio-channels=auto
??
?##################
?# other settings #
?##################
??
?# Pretend to be a web browser. Might fix playback with some streaming sites,
?# but also will break with shoutcast streams.
?user-agent="Mozilla/5.0"
??
?# cache settings
?#
?# Use 150MB input cache for everything, even local files.
?cache=153600
?#
?# Disable the behavior that the player will pause if the cache goes below a
?# certain fill size.
?cache-pause=no
?#
?# Read ahead about 5 seconds of audio and video packets.
?demuxer-readahead-secs=5.0
?#
?# Raise readahead from demuxer-readahead-secs to this value if a cache is active.
?cache-secs=50.0
??
?# Display English subtitles if available.
?slang=en
??
?# Play Finnish audio if available, fall back to English otherwise.
?alang=fi,en
??
?# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
?# If the file seems to be valid UTF-8, prefer UTF-8.
?# (You can add '+' in front of the codepage to force it.)
?sub-codepage=cp1256
??
?# You can also include other configuration files.
?include=/path/to/the/file/you/want/to/include
??
?############
?# Profiles #
?############
??
?# The options declared as part of profiles override global default settings,
?# but only take effect when the profile is active.
??
?# The following profile can be enabled on the command line with: --profile=eye-cancer
??
?#[eye-cancer]
?sharpen=5

?

其他示例:

1. 記憶播放位置:save-position-on-quit=yes

2.關(guān)閉窗口裝飾(無邊框):no-border

設(shè)置完成,保存文件即可。

更多配置請參考官方幫助文件:https://mpv.srsfckn.biz/manual.pdf

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

?

3.?scripts 腳本文件

使用方式:在將對應(yīng)的腳本放在配置文件夾路徑下的script文件夾中即可,mpv 啟動時保存在該目錄中的 Lua 腳本將被自動加載并執(zhí)行。

參考腳本如鏈接:https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua

該autoload.lua 腳本可以自動將該目錄的中的全部文件加入到 MPV 的播放列表中。

更多請參考官方幫助文件。

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

?

轉(zhuǎn)載于:https://www.cnblogs.com/dream-on-all-in/p/11286016.html

總結(jié)

以上是生活随笔為你收集整理的[日常笔记] 2: 本地视频播放器 MPV的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。