1
IgniteWhite OP 也不是什么问题了……分享我注释过的配置,这是 mpv.conf :
# You can also write file-specific configuration files # You can also put the configuration file in the same directory as the file to be played # Both require you to set the --use-filedir-conf option (either on the command line or in your global config file) use-filedir-conf=yes # If a file-specific configuration file is found in the same directory, # no file-specific configuration is loaded from ~/.config/mpv. # In addition, the --use-filedir-conf option enables directory-specific configuration files. # For this, mpv first tries to load a mpv.conf from the same directory as the file played # and then tries to load any file-specific configuration. # Track Selection # Specify a priority list of audio languages to use alang=en,eng,zh,cmn,chi,zho # Specify a priority list of subtitle languages to use slang=cmn,chi,zho,zh,eng,en # Program Behavior # Always save the current playback position on quit save-position-on-quit # Video # Specify a priority list of video output drivers to be used vo=opengl-hq:interpolation:icc-profile-auto # Set the display FPS used with the --video-sync=display-* modes display-fps=60 # Specify the hardware video decoding API that should be used if possible hwdec=auto # Audio # Specify a list of audio filters to apply to the audio stream af=drc # Set the startup volume # 0 means silence, 100 means no volume reduction or amplification # A value of -1 (the default) will not change the volume volume=100 # Subtitles # If your system supports iconv(3), you can use this option to specify the subtitle codepage # For Arabic subtitles use 'cp1256'. # For Chinese subtitles use 'gb2312'. # For Western Europe(including German) subtitles use 'iso8859'. # If the file seems to be valid UTF-8, prefer UTF-8. sub-codepage=utf8:gb2312 # Load additional subtitle files matching the video filename sub-auto=fuzzy # Window # Play video with window border and decorations # Since this is on by default, use --no-border to disable the standard window decorations border # Adjust the initial window position or size # If a percentage sign (%) is given after the argument, it turns the value into a percentage of the screen size in that direction geometry=50%:50% # Set the initial window size # This option behaves exactly like --autofit, # except the window size is only changed if the window would be larger than the specified size autofit-larger=90%x90% # This option behaves exactly like --autofit, # except that it sets the minimum size of the window (just as --autofit-larger sets the maximum) autofit-smaller=30%x30% # OSD, On Screen Display # Set the duration of the OSD messages in ms (default: 1000) osd-duration=2000 # Specify font to use for OSD and for subtitles that do not themselves specify a particular font # The default is sans-serif osd-font='STZhongsong' sub-text-font='STZhongsong' # Specify the OSD/sub font size # The unit is the size in scaled pixels at a window height of 720 osd-font-size=28 sub-text-font-size=32 # Height of the OSD bar, in percentage of the screen height (default: 3.125) osd-bar-h=2.8 # See --osd-color. Color used for the OSD/sub font border osd-border-color='#99000000' # Size of the OSD/sub font border in scaled pixels (see --osd-font-size for details) osd-border-size=2 sub-text-border-size=3 # Specify the color used for OSD osd-color='#CCFFFFFF' # Screenshot # Specify the filename template used to save screenshots screenshot-template=~/Pictures/mpv/%F_%p # Miscellaneous # How the player synchronizes audio and video video-sync=display-resample |
2
IgniteWhite OP 这是 lua-settings/osc.conf :
# When to enable the OSC showwindowed=yes showfullscreen=yes # OSC scale scalewindowed=2 scalefullscreen=1 # Scale the OSC with the video # no tries to keep the OSC size constant as much as the window size allows vidscale=yes # Duration in ms until the OSC hides if no mouse movement, negative value disables auto-hide hidetimeout=500 # Duration of fade out in ms, 0 = no fade fadeduration=200 # Size of the deadzone. Values between 0 and 1 deadzonesize=1 # The layout for the OSC. Currently available are: box, slimbox, bottombar and topbar layout=topbar # Sets the style of the seekbar, slider (diamond marker) or bar (fill) seekbarstyle=bar |
3
IgniteWhite OP 为了看带德语的字幕(比如《国土安全》最新季),我在 codepage 里加了 iso8859 ,但是会使得中文乱码。各位知道如何解决吗?
|
4
squid157 2016-02-14 19:51:09 +08:00
@IgniteWhite 你把那个调整成 sub-codepage=utf8:gb2312:iso8859 和 sub-codepage=utf8:iso8859:gb2312 都不行?
|
5
IgniteWhite OP @squid157 我大概是在两个月前,用打包好的 mpv 看的,遇到的问题是无论怎么写配置文件,中文德文必有一者不能显示。前两天换成了 Homebrew 编译版,我刚刚看了一下,写成 sub-codepage=gb2312 就好了,中文没问题,德文üß之类的字母也可以显示。
看了一下文档,里面说: By default, uchardet will be used to guess the charset. If mpv is not compiled with uchardet, enca will be used. If mpv is compiled with neither uchardet nor enca, UTF-8:UTF-8-BROKEN is the default, which means it will try to use UTF-8, otherwise the UTF-8-BROKEN pseudo codepage. 看来 Homebrew 编译版本应该是有 uchardet 或者 enca 的。但是要正确显示中文 srt 字幕,必须标明 gb2312 。 |
6
squid157 2016-02-14 21:49:51 +08:00 via iPhone
|
7
IgniteWhite OP @squid157 好像是按照顺序的……我没了解 enca 是什么东西。配置文件的注释是我从文档里抄来的,顺序也和文档一样,方便改动~
|