mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
Merge pull request #36 from nikoyoke1/master
🎈pref:优化YouTuBe及tiktok下载性能
This commit is contained in:
commit
36d1287a2a
@ -28,7 +28,7 @@ neteaseCloudAPIServer: '' # 网易云自建服务器地址
|
||||
neteaseCloudAudioQuality: exhigh # 网易云解析最高音质 默认exhigh(极高) 分类:standard => 标准,higher => 较高, exhigh=>极高, lossless=>无损, hires=>Hi-Res, jyeffect => 高清环绕声, sky => 沉浸环绕声, dolby => 杜比全景声, jymaster => 超清母带
|
||||
|
||||
youtubeGraphicsOptions: 720 # YouTobe的下载画质,0为原画,1080,720,480,自定义画面高度(默认为720)
|
||||
youtubeClipTime: # YouTobe限制的最大视频时长(默认不开启),单位:秒 最好不要超过5分钟,否则截取效率非常低
|
||||
youtubeClipTime: 0 # YouTobe限制的最大视频时长(默认不开启),单位:秒 最好不要超过5分钟,否则截取效率非常低
|
||||
youtubeDuration: 480 # YouTobe限制的最大视频时长(默认8分钟),单位:秒 最好不要超过30分钟,否则截取效率非常低
|
||||
|
||||
douyinCookie: '' # douyin's cookie, 格式:odin_tt=xxx;passport_fe_beating_status=xxx;sid_guard=xxx;uid_tt=xxx;uid_tt_ss=xxx;sid_tt=xxx;sessionid=xxx;sessionid_ss=xxx;sid_ucp_v1=xxx;ssid_ucp_v1=xxx;passport_assist_user=xxx;ttwid=xxx;
|
||||
|
@ -54,7 +54,7 @@ export function ytDlpGetThumbnail(path, url, isOversea, proxy) {
|
||||
* @param merge 是否合并输出为 mp4 格式 (仅适用于视频合并需求)
|
||||
* @param graphics YouTube画质参数
|
||||
* @param timeRange 截取时间段
|
||||
* @param maxThreads 最大线程数
|
||||
* @param maxThreads 最大并发
|
||||
*/
|
||||
export async function ytDlpHelper(path, url, isOversea, proxy, maxThreads, merge = false, graphics, timeRange) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -62,7 +62,7 @@ export async function ytDlpHelper(path, url, isOversea, proxy, maxThreads, merge
|
||||
|
||||
const fParam = url.includes("youtu") ? `--download-sections "*${timeRange}" -f "bv${graphics}[ext=mp4]+ba[ext=m4a]" ` : "";
|
||||
|
||||
const command = `yt-dlp ${fParam} --concurrent-fragments ${maxThreads} ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${url}`;
|
||||
const command = `yt-dlp -N ${maxThreads} ${fParam} --concurrent-fragments ${maxThreads} ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${url}`;
|
||||
|
||||
logger.info(`[R插件][yt-dlp审计] ${command}`)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user