include="~~/profiles.conf" # ========== GENERAL ========== geometry=50%:50% autofit-larger=80%x80% prefetch-playlist=yes force-seekable=yes keep-open=yes reset-on-next-file=pause msg-color=yes # Thêm màu cho console ouput khi xuất ra terminal msg-module=yes image-display-duration=inf # Không autoplay đối với hình ảnh hr-seek=yes # Bật khi có thể precise seeks, seeks sẽ không bị giới hạn bởi keyframes vd-lavc-fast=yes d3d11va-zero-copy=yes log-file=~~desktop/mpv-log.txt # Tạo log.txt để debug ytdl-raw-options=force-ipv4= # Tắt IPv6 # ========== Video Profile ========== vo=gpu-next # Video output driver sử dụng libplacebo để render. Hỗ trợ gần như đầy đủ các tính năng giống như --vo=gpu # Nhanh hơn, chất lượng tốt hơn, có thể tonemap DV (P5), HDR10, HDR -> SDR. Tuy nhiên vẫn còn đang thử nghiệm còn một số lỗi hwdec=auto-safe profile=Balanced gpu-api=d3d11 # ========== CACHE & STREAMING ========== cache=auto # Bật cache hữu dụng khi Playback trước tiếp qua mạng demuxer-max-bytes=1GiB # Giới hạn kích thước dữ liệu cho phép demuxer đọc trước demuxer-readahead-secs=300 # Giới hạn thời gian cho phép demuxer đọc trước demuxer-max-back-bytes=500MiB # Giới hạn kích thước dữ liệu demuxer đã đọc qua có thể lưu giữ ytdl-format=bestvideo+bestaudio/best # Param chọn source của youtube-dl load-unsafe-playlists=yes ytdl-raw-options=write-thumbnail=,sub-lang="vi,vi-vi,en,en-en" # ========== DEBANDING ========== deband=no # Chỉ nên bật khi video có banding. (Keybind=h) deband-iterations=1 # https://mpv.io/manual/stable/#options-deband-iterations deband-threshold=48 # https://mpv.io/manual/stable/#options-deband-threshold deband-range=32 # https://mpv.io/manual/stable/#options-deband-threshold deband-grain=32 # https://mpv.io/manual/stable/#options-deband-grain # ========== ON SCREEN DISPLAY AND ON SCREEN CONTROLLER ========== osd-bar=no # Sử dụng UOSC thay cho UI mặc định osc=no # Sử dụng UI morden-x thay cho mặc định border=no # Tắt title bar và border thay vào đó sử dụng của morden X cursor-autohide=100 # Trỏ chuột sẽ tử động ẩn sau ms osd-level=1 # https://mpv.io/manual/stable/#options-osd-level osd-duration=1000 # Thời gian xuất hiện của OSD messages bằng ms # https://mpv.io/manual/stable/#options-hr-seek # Tuỳ chỉnh style của OSD messages osd-font="Open Sans" osd-font-size=40 osd-border-size=2.4 osd-shadow-offset=0.75 osd-bold=yes # ========== LANGUAGE PRIORITY ========== track-auto-selection=yes alang=ja,jp,jpn,vi,vie,en,eng # Thứ tự uy tiên ngôn ngữ của audio slang=vi,vie # Thứ tự uy tiên ngôn ngữ của subtitles # ========== AUDIO ========== volume=100 # Âm lượng mặc định audio-file-auto=fuzzy # Load source âm thanh bên ngoài có tên gần giống với video volume-max=200 # Dung lượng tối đa cho phép. Qua mức 100 mpv sẽ boost âm lượng từ video nên có thể gây ra suy giảm chất lượng âm thanh. audio-pitch-correction=yes # tự động chèn scaletempo khi phát ở tốc độ cao hơn # ========== SUBTITLES ========== demuxer-mkv-subtitle-preroll=yes # https://mpv.io/manual/stable/#options-mkv-subtitle-preroll sub-ass-vsfilter-blur-compat=no # Tương thích ngược với ASS/SSA sử dụng vsfilter sub-fix-timing=no # Do not try to fix gaps (which might make it worse in some cases). sub-auto=fuzzy # Load subtitle bên ngoài có tên gần giống với video sub-file-paths-append=ass sub-file-paths-append=srt sub-file-paths-append=pgs sub-file-paths-append=vob sub-file-paths-append=sub sub-file-paths-append=sup sub-file-paths-append=subs sub-file-paths-append=subtitles # Các tuỳ chọn sau áp dụng với định dạng subtitles không có style riêng (VD: SRT, VTT...) # Đây là style yêu thích của mình có thể điều chỉnh lại style theo sở thích riêng sub-font='Open Sans' sub-font-size=40 sub-color='#FFFFFFFF' sub-border-color="#FF000000" sub-shadow-color=0.0/0.0/0.0/0.70 sub-border-size=2.0 sub-shadow-offset=0.75 sub-spacing=0.0 sub-bold=yes sub-use-margins=no sub-gauss=0.05 # ========== SCREENSHOT ========== screenshot-format=jpg # Format của screenshoot png / jpg screenshot-high-bit-depth=no # Bitdepth giống với video. Đặt "no" nếu muốn tiết kiệm dung lượng. screenshot-tag-colorspace=no # Tonemap screenshot screenshot-jpg-compression=9 screenshot-png-compression=9 # Tỉ lệ nén của PNG (1-9) # Giá trị cao thì nén tốt hơn nhưng bù lại tốn thời gian xử lý screenshot-dir="~/Pictures/mpv" # Thư mục chứa screenshot screenshot-template="%{?demuxer-via-network==yes:${media-title}%{?demuxer-via-network==yes:_${filename/no-ext}%{!demuxer-via-network==yes:${filename}-%wH.%wM.%wS.%wT-#%#00n" # Định dạng tên (filename-hour-minute-second-milisecond-number) # ========== INTERPOLATION ========== # Tuỳ chọn filter cho nội suy temporal axis (frames). tscale=oversample # ========== Tone-mapping ========== target-colorspace-hint=no # Buộc tonemapping HDR -> SDR nếu màn hình của bạn hỗ trợ HDR thì bật lên và bật HDR trong setting của Windows. tone-mapping=spline libplacebo-opts-append=gamut_expansion=yes # Allows the gamut mapping function to expand the gamut, in cases where the target gamut exceeds that of the source libplacebo-opts-append=perceptual_deadzone=0.4 libplacebo-opts-append=perceptual_strength=0.5 #Cach su dung: Xoa # o doan #abc=xyz o dau dong de kich hoat nhung doan config mau # Bởi mpv.conf của thread tối ưu cho việc xem online nên nếu nhu cầu không phải chỉ tải video về xem thì tải copy toàn bộ nội dung trong file này rồi chèn vào cuối file mpv.conf # # https://raw.githubusercontent.com/FirefoxUniverse/FirefoxTweaksVN/main/mpv/mpv.conf # ########### # General # ########### # Custom config #Bat len neu muon giong PiP cua trinh duyet, geometry=x50% nen chuyen thanh geometry=x25% ontop #Bat len neu muon tiep tuc xem video o thoi diem tat MPV #save-position-on-quit=yes osd-on-seek=no osd-font-size=24 #osd-duration=100 keep-open=yes force-window=immediate no-focus-on-open #geometry=x50% #PiP giua man hinh geometry=25%x25%-10-10 #PiP goc duoi ben phai load-unsafe-playlists=yes user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0' force-seekable=yes hr-seek=yes hr-seek-framedrop=yes ######### # uosc # ######### # required so that the 2 UIs don't fight each other osc=no # uosc provides its own seeking/volume indicators, so you also don't need this osd-bar=no # uosc will draw its own window controls if you disable window border #border=no ######### # Video # ######### hwdec=auto-safe vo=gpu-next #Cho he may cui bap, CPU va GPU giam cuc nhieu tscale=nearest interpolation=no scale=bilinear cscale=bilinear dscale=bilinear sws-scaler=fast-bilinear dither=no correct-downscaling=no linear-downscaling=no sigmoid-upscaling=no hdr-compute-peak=no #Bat lam net video, rat ngon CPU va GPU, tuy nhien giup vai video bi nhoe trong dep hon, khong nen bat mac dinh ma nen bat bang phim tat khi can thiet bang input.conf #scale=ewa_lanczossharp #cscale=ewa_lanczossharp ######### # Audio # ######### #audio-file-auto=fuzzy # play external audio files with same name as video files #audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed volume-max=200 # maximum volume in %, everything above 100 results in amplification volume=100 # default volume, 100 = unchanged ######### #Subtitle ######### #Doi mau, kich co subtitle #sub-color='#FFFF00' #subtitle color in rgb #sub-shadow-color='#000000' #shadow color #sub-font='Noto Sans' #set font #sub-bold=yes #sub-font-size=60 #sub-pos=95 #subtitle position 5 percent above the bottom of the screen #sub-fix-timing=yes ######### # Cache # ######### cache-pause cache=yes #cache-on-disk=yes # Bat len neu may it RAM, chuyen cache xuong o dia #cache-default=80000 # size in KB (80MB) -- Increase if you have buffering issues #cache-backbuffer=80000 # size in KB #cache-initial=0 # start playback when your cache is filled up with x kB cache-secs=600 # how many seconds of audio/video to prefetch if the cache is active demuxer-thread=yes #demuxer-max-bytes=50MiB demuxer-max-back-bytes=50MiB demuxer-readahead-secs=600 ######### # Network # ######### network-timeout=100 stream-lavf-o-append=reconnect_on_http_error=4xx,5xx stream-lavf-o-append=reconnect_delay_max=30 stream-lavf-o-append=reconnect_streamed=yes #stream-lavf-o-append=reconnect_on_network_error=yes ######### # YTDL # ######### ytdl-raw-options-append=no-check-certificates= ytdl-raw-options-append=yes-playlist= #ytdl-raw-options-append=extractor-args=youtube:player_skip=webpage,configs,js;player_client=android,web;lang=vi,en #Chuyen sang Youtube VN may chu Youtube tra lai CDN gan Viet Nam, co the gay loi/thay doi ? #ytdl-raw-options-append=extractor-args=youtube:lang=vi,en,ja ytdl-raw-options-append=sub-langs=en,en-US,eng,vi,vi-VN,vie,ja,ja-JP,jap,live_chat ytdl-raw-options-append=write-sub= ytdl-raw-options-append=write-auto-sub= ytdl-raw-options-append=add-metadata= ytdl-raw-options-append=audio-multistreams= ytdl-raw-options-append=video-multistreams= #Danh dau da xem khong can plugin markwatched.lua https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-25727088 #ytdl-raw-options-append=cookies-from-browser=firefox:_ĐƯỜNG_DẪN_PROFILE_FIREFOX_VÀO_ABOUT:SUPPORT_OPEN_PROFILE_ #ytdl-raw-options-append=mark-watched= ######### # Profile # ######### #Chi tiet: https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-24149834 #Luon de phan nay o cuoi file mpv.conf [quality-youtube] profile-cond=string.find(path, 'youtube') ~= nil or string.find(path, 'youtu.be') ~= nil or string.find(path, 'yt.be') ~= nil profile-restore=copy #720 mp4 profile_cond=136/232/(mp4)[height<=?720]/bv+ba/ba ytdl-format=22/136+worstaudio/232+worstaudio/18/17/(mp4)[height<=?720][fps<=?30]+worstaudio[acodec~=opus]/(mp4)[height<=?720][fps<=?30]/bv+ba/ba #ytdl-format=bestvideo[height<=?720][vcodec*=?avc]+bestaudio/best #ytdl-format=136/232/(mp4)[height<=?720][vcodec*=?avc]+bestaudio/best #ytdl-format=22/18/17/(mp4)[height<=?720]+worstaudio[acodec~=opus]/(mp4)[height<=?720][fps<=?30]/bv+ba/ba #ytdl-format=22/18/17/(mp4)[height<=?720][fps<=?30]+worstaudio[acodec~=opus]/(mp4)[height<=?720][fps<=?30]/bv+ba/ba #ytdl-format=bestvideo[container*=dash][proto*=http_dash_segments][height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best #1080 mp4 #ytdl-format=bestvideo[height<=?1080][vcodec*=?avc]+bestaudio/best #1080 av1 #ytdl-format=bestvideo[height<=?1080][vcodec*=?av01]+bestaudio/best #1080 vp9 #ytdl-format=bestvideo[height<=?1080][vcodec*=?vp9]+bestaudio/best #best av1 #ytdl-format=bestvideo[vcodec*=?av01]+bestaudio/best [quality-twitter] profile-cond=string.find(path, 'twitter.') ~= nil or string.find(path, 'x.com') ~= nil profile-restore=copy ytdl-format=bestvideo[height<=720][protocol*=m3u8]+bestaudio/best[height<=720][protocol*=m3u8] #ytdl-format=bestvideo[height<=?360]+bestaudio/best #ytdl-format=bestvideo[proto*=hls]+bestaudio/best #ytdl-format=hls-197/hls-783/hls-475/hls-80 #ytdl-format=hls-783/hls-475/hls-197/hls-80 #hls-783/hls-475/hls-197/hls-80 [stream-no-ytdl] profile-cond=string.find(path, '%.m3u') ~= nil or string.find(path, '%.mpd') ~= nil or string.find(path, '%.mp4') ~= nil or string.find(path, 'googlevideo%.') ~= nil or string.find(path, '%.jpg') ~= nil or string.find(path, '%.png') ~= nil or string.find(path, '%.epg') ~= nil or string.find(path, '%.ts') ~= nil or string.find(path, '%.xml') ~= nil or string.find(path, 'epg') ~= nil or string.find(path, 'EXTM3U') ~= nil profile-restore=copy-equal ytdl=no #EOF