#Cach su dung: Xoa # o doan #abc=xyz o dau dong de kich hoat nhung doan config mau
###########
# General #
###########
# Custom config
#Bat len neu muon giong PiP cua trinh duyet, geometry=x50% nen chuyen thanh geometry=x25%
#ontop # video player always on top
osd-on-seek=no
osd-font-size=24
#osd-duration=100
keep-open=yes
force-window=immediate
no-focus-on-open
geometry=50%x50%
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:D:\Downloads\Programs\Floorp\Profiles\default-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
profile-restore=copy
#720 mp4
#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=(mp4)[height<=?1080]+bestaudio/best
#1080 av1
#ytdl-format=bestvideo[height<=?1080][vcodec*=?av01]+bestaudio/best
#1080 vp9
ytdl-format=bestvideo+bestaudio/best
#best av1
#ytdl-format=bestvideo[vcodec*=?av01]+bestaudio/best
[quality-twitter]
profile-cond=string.find(path, 'twitter.') ~= 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
[playlist-no-cookies]
profile-cond=path:match"playlist" ~= nil or filename:match"playlist" ~= nil
profile-restore=copy
ytdl-raw-options-remove=cookies-from-browser
#EOF