itisme
Senior Member
thank fenxxx cái config của fen là không dùng av01 mà
đổi thànhytdl-format=bestvideo[height<=?1080][vcodec=av01]+bestaudio/best
![]()
thank fenxxx cái config của fen là không dùng av01 mà
đổi thànhytdl-format=bestvideo[height<=?1080][vcodec=av01]+bestaudio/best
![]()
xxx cái config của fen là không dùng av01 mà
đổi thànhytdl-format=bestvideo[height<=?1080][vcodec=av01]+bestaudio/best
![]()
thank fen
Đã fix nhé, chắc do trước sửa đi sửa lại thành sửa nhầm luôn do copy từ phầnMới tìm ra cách sử dụngprofile-cond
để ép các trang web trả về chất lượng tùy ý, ví dụ mình muốn Youtube trả về 720p, ép 30FPS cục MP4 gộp cả hình lẫn tiếng, mở filempv.conf
lên thêm vào cuối cùng của file:
Code:[quality-youtube] profile-cond=path:match"youtube" ~= nil or filename:match"youtube" ~= nil profile-restore=copy ytdl-format=bestvideo[container*=dash][proto*=http_dash_segments][height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best[height<=720]
Tất nhiên là nếu muốn to hơn 720 thì phải bỏ khả năng gộp video+audio đi và bỏ 30FPS đi mới tăng được, và code sẽ như sau, định dạng MP4:
Code:[quality-youtube] profile-cond=path:match"youtube" ~= nil or filename:match"youtube" ~= nil profile-restore=copy ytdl-format=bestvideo[height<=?1080][vcodec!=?vp9]+bestaudio/best[height<=1080]
Hoặc nếu muốn định dạng VP9, cá nhân mình không thích VP9 vì nó ngốn CPU và ngốn pin, giảm được tí dung lượng:
Code:[quality-youtube] profile-cond=path:match"youtube" ~= nil or filename:match"youtube" ~= nil profile-restore=copy ytdl-format=bestvideo[height<=?1080]+bestaudio/best[height<=1080]
Hoặc nếu muốn định dạng VP9 một cách chính xác không nhân nhượng đàm phán gì cả:
Code:[quality-youtube] profile-cond=path:match"youtube" ~= nil or filename:match"youtube" ~= nil profile-restore=copy ytdl-format=bestvideo[height<=?1080][vcodec*=?vp9]+bestaudio/best[height<=1080]
Hoặc nếu muốn AV1 (kén GPU xịn đời mới, nếu không có nó đẩy về CPU load nặng vô đối):
Code:[quality-youtube] profile-cond=path:match"youtube" ~= nil or filename:match"youtube" ~= nil profile-restore=copy ytdl-format=bestvideo[height<=?1080][vcodec*=?av01]+bestaudio/best[height<=1080]
Sửa chút lại cho Twitch và ép 480p, ép 30FPS:
Code:[quality-twitch] profile-cond=path:match"twitch" ~= nil or filename:match"twitch" ~= nil profile-restore=copy ytdl-format=bestvideo[container*=dash][proto*=http_dash_segments][height<=?480][fps<=?30][vcodec!=?vp9]+bestaudio/best
Đơn giản mà hiệu quả, cứ dựa vào của mình chỉnh chọt chút là ngon lành, trước mình có chia sẻ một plugin để tự động đổi, mà giờ biết dùng profile-cond rồi thì không cần tới nữa.
Đã cho lên #1.
Tất nhiên là nếu muốn to hơn 720 thì phải bỏ khả năng gộp video+audio đi và bỏ 30FPS đi mới tăng được, và code sẽ như sau, định dạng MP4:
Không dùng VP09 :thank fen
ytdl-format=bestvideo[height<=?1080][vcodec!*=vp09]+bestaudio/best
ytdl-format=bestvideo[height<=?1080][vcodec*=av01]+bestaudio/best
mấy cái audio bỏĐã fix nhé, chắc do trước sửa đi sửa lại thành sửa nhầm luôn do copy từ phần
làm phôi trong khi bài hỏi đáp thì lại đúng.![]()
[height<=1080]
đi khầy, audio cứ best thôiĐã sửamấy cái audio bỏ[height<=1080]
đi khầy, audio cứ best thôi
![]()
Thế thì giải pháp dễ nhất chỉ có check hệ điều hành, rồi tự động sửa cho Mac, cái này để xem xem, hình như lua nó cho kiểm tra hệ điều hành.Script kéo thả nó cũng thế thím àchắc vì 1 lý do nào đấy mà nó đẩy về
mpv
bị cắt luôn đoạn schemempv://
chỉ còn cóplay/abc123
![]()
local BinaryFormat = package.cpath:match("%p[\\|/]?%p(%a+)")
if BinaryFormat == "dll" then
function os.name()
return "Windows"
end
elseif BinaryFormat == "so" then
function os.name()
return "Linux"
end
elseif BinaryFormat == "dylib" then
function os.name()
return "MacOS"
end
end
BinaryFormat = nil
em đang sửa tạm thế này, thêm vào đằng trc dòngThế thì giải pháp dễ nhất chỉ có check hệ điều hành, rồi tự động sửa cho Mac, cái này để xem xem, hình như lua nó cho kiểm tra hệ điều hành.
Có vẻ ez:
local BinaryFormat = package.cpath:match("%p[\\|/]?%p(%a+)")
if BinaryFormat == "dll" then
function os.name()
return "Windows"
end
elseif BinaryFormat == "so" then
function os.name()
return "Linux"
end
elseif BinaryFormat == "dylib" then
function os.name()
return "MacOS"
end
end
BinaryFormat = nil
if (url:find("mpv://") ~= 1) then
local os_name = '', ''
-- LuaJIT shortcut
if jit and jit.os and jit.arch then
os_name = jit.os
else
if package.config:sub(1,1) == '\\' then
-- Windows
local env_OS = os.getenv('OS')
if env_OS then
os_name = env_OS
end
else
-- other platform, assume uname support and popen support
os_name = io.popen('uname -s','r'):read('*l')
end
end
if (os_name:lower() == 'darwin') then
-- msg.info("Dirty fix for MacOS: Add 'mpv://' to start")
url = 'mpv://' .. url
end
uname
) Mình thì chắc chốt với giải pháp này, nếu nó hoạt động như ý nó sẽ cho cả Windows, Mac và Linux, hiện mình mới test nó trên Windows và ra kết quả chính xác, test rất đơn giản nó lợi dụng thư viện loader của MPV để nhận diện hệ thống, dll=win, so=linux, dylib=mac, cách này mình ưng vì hiệu năng tốt, không gọi tiến trình phụ:em đang sửa tạm thế này, thêm vào đằng trc dòngif (url:find("mpv://") ~= 1) then
Less:local os_name = io.popen('uname -s','r'):read('*l'):lower() if (os_name == 'darwin') then -- msg.info("Dirty fix for MacOS: Add 'mpv://' to start") url = 'mpv://' .. url end
local function getOS()
local BinaryFormat = package.cpath
print(BinaryFormat)
if BinaryFormat:match("dll$") then
return "Windows"
elseif BinaryFormat:match("so$") then
return "Linux"
elseif BinaryFormat:match("dylib$") then
return "MacOS"
end
end
print(getOS())
[protocol_hook] D:\mpv\?.dll;D:\mpv\loadall.dll
[protocol_hook] Windows
Mình thì chắc chốt với giải pháp này, nếu nó hoạt động như ý nó sẽ cho cả Windows, Mac và Linux, hiện mình mới test nó trên Windows và ra kết quả chính xác, test rất đơn giản nó lợi dụng thư viện loader của MPV để nhận diện hệ thống, dll=win, so=linux, dylib=mac, cách này mình ưng vì hiệu năng tốt, không gọi tiến trình phụ:
local function getOS()
local BinaryFormat = package.cpath
print(BinaryFormat)
if BinaryFormat:match("dll$") then
return "Windows"
elseif BinaryFormat:match("so$") then
return "Linux"
elseif BinaryFormat:match("dylib$") then
return "MacOS"
end
end
print(getOS())
[protocol_hook] D:\mpv\?.dll;D:\mpv\loadall.dll
[protocol_hook] Windows
uname
nên lại cũng crash luôn mpv..so
của LinuxNếu lỗi trên xảy ra cả ở Linux thì không cần quan tâm là so hay dylib, hay là lại dựa vàoCái này sạch đẹp rồi đó fenmình cũng vừa phải sửa lại code trên vì trên Windows không có
uname
nên lại cũng crash luôn mpv.
Update mới: Mạc-bục lại dùng thư viện dạng.so
của Linux
View attachment 2093979
homebrew
để nhận diện ra Mac hay Linux nhỉ, mà Mac nếu cài MPV bằng cách khác thì nó có dùng thư mục homebrew không nhỉ hay là cứ sống chết mặc bay theo đuổi hiệu năng thì đây là trái đắng:local function getOS()
local BinaryFormat = package.cpath
print(BinaryFormat)
if BinaryFormat:match("dll$") then
return "Windows"
elseif BinaryFormat:match("so$") then
if BinaryFormat:match("homebrew") then
return "MacOS"
else
return "Linux"
end
elseif BinaryFormat:match("dylib$") then
return "MacOS"
end
end
print(getOS())
Đúng rồi, cơ mà Floorp đã tồn tại ở bên Nhật từ rất lâu rồi và do sinh viên một trường đại học phát triển.@toi la gay :sosad:
À có một fact ko biết thầy để ý ko thì đội ngũ dev của floorp là một đội toàn học sinh, sinh viên đó
voz bị ngáo cần rồi
![]()
Cũng vừa bị, mà tự nhiên hết rồivoz bị ngáo cần rồi
![]()
Tưởng mỗi tôi bị, hoá ra voz lại bị mon mít động tay chân nữa rồi![]()
thấy font chữ cũng lạ qá, chắc thêm trò mới rồiCũng vừa bị, mà tự nhiên hết rồi![]()
Hình như dev mới động gì đóvoz bị gì rồi, tưởng mới xài Tải trang lười biếng với Lazyloadfier dạng Userscript nhẹ hều nó đi cái voz
![]()
nửa đêm rồi ngủ đi mấy bạn, để min mót còn test code chứ
Có lẽ nào Voz đang rebrand và sẽ có một diện mạo mớithấy font chữ cũng lạ qá, chắc thêm trò mới rồi