mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复 yt-dlp 720p导致的bug
This commit is contained in:
parent
59bb387034
commit
78db32133d
@ -33,9 +33,8 @@ export function ytDlpGetTilt(url, isOversea, proxy) {
|
||||
export async function ytDlpHelper(path, url, isOversea, proxy, merge = false) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const mergeOption = merge ? '--merge-output-format "mp4"' : '';
|
||||
// 添加 -f 参数来限制视频质量
|
||||
const qualityOption = '-f "bestvideo[height<=720]+bestaudio/best[height<=720]"';
|
||||
const command = `yt-dlp ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${mergeOption} ${qualityOption} ${url}`;
|
||||
|
||||
const command = `yt-dlp ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${mergeOption} ${url}`;
|
||||
|
||||
exec(command, (error, stdout) => {
|
||||
if (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user