gpt4 book ai didi

youtube - YouTube Storyboard脚本-更大的缩略图?

转载 作者:行者123 更新时间:2023-12-03 05:29:11 27 4
gpt4 key购买 nike

http://www.labnol.org/internet/print-youtube-video/28217/

javascript:(function(){a=ytplayer.config.args.storyboard_spec;if(!a){alert("Sorry we cannot process this YouTube video. Could you please try another one");exit();}b=a.split("|");base=b[0].split("$")[0] "2/M";c=b[3].split("#");sigh=c[c.length-1];var imgs="";t=ytplayer.config.args.length_seconds;n=Math.ceil(c[2]/(c[3]*c[4]));for(i=0;i<n;i  ){imgs ="<PICTURE='" base i ".jpg?sigh=" sigh "'><br/>";}var title=ytplayer.config.args.title;msg="<body style='background-color:#444;color:#eee;margin:20px auto;width:90%;text-align:center'><h2>TITLE</h2><div>IMAGES</div><br/><em><a href='http://labnol.org/?p=28217' style='text-decoration:none;color:#fff;font-style:bold'>Printed using the YouTube bookmarklet.</a></em></body>";msg=msg.replace("TITLE",title).replace("IMAGES",imgs).replace(/PICTURE/g,"img src");var labnol=window.open();labnol.document.open();labnol.document.write(msg);labnol.document.close();})();

1-我不知道如何使用此脚本获取更大的缩略图,也许youtube限制了图像质量/分辨率,因此此代码无法获取更大的版本?

2-一些新的视频90-120分钟+需要几天才能显示完整的视频缩略图,这是真的吗?

谢谢

最佳答案

这是书签的美化版本:

(function() {
a = ytplayer.config.args.storyboard_spec;
if (!a) {
alert("Sorry we cannot process this YouTube video. Could you please try another one");
exit();
}
b = a.split("|");
base = b[0].split("$")[0] + "2/M";
c = b[3].split("#");
sigh = c[c.length - 1];
var imgs = "";
t = ytplayer.config.args.length_seconds;
n = Math.ceil(c[2] / (c[3] * c[4]));
for (i = 0; i < n; i++) {
imgs += "<PICTURE='" + base + i + ".jpg?sigh=" + sigh + "'><br/>";
}
var title = ytplayer.config.args.title;
msg = "<body style='background-color:#444;color:#eee;margin:20px auto;width:90%;text-align:center'><h2>TITLE</h2><div>IMAGES</div><br/><em><a href='http://labnol.org/?p=28217' style='text-decoration:none;color:#fff;font-style:bold'>Printed using the YouTube bookmarklet.</a></em></body>";
msg = msg.replace("TITLE", title).replace("IMAGES", imgs).replace(/PICTURE/g, "img src");
var labnol = window.open();
labnol.document.open();
labnol.document.write(msg);
labnol.document.close();
})();

该页面(部分中文)似乎弄乱了我们可以用来计算标签数学的计算方案:
http://rplus.github.io/blog/2014/04/26/youtube-storyboard/
$L确定 Storyboard 的大小以及每个“sprite”工作表中的帧数。

据此,这些计算公式为:

L = 1

100(10 * 10),共135(大于35)

L = 2

25(5 * 5),总计135(超过10个为五个)

L = 3

9(3 * 3),总共135(仅15)

对于假设的视频:
b变量包含两个小尺寸的工作表(10x10)和两个大尺寸的工作表
console.log(b)
["https://i.ytimg.com/sb/xxx/storyboard3_L$L/$N.jpg",
"48#27#100#10#10#0#default#XX-LJCqt8cvoKdNR-LktzyCucWU",
"80#45#242#10#10#10000#M$M#XXtyvKla08ayOvovocCEGBGtgfM",
"160#90#242#5#5#10000#M$M#XXNLRJzk9xaC36siHPgNM_ZsIlQ",
"320#180#242#3#3#10000#M$M#XXYfUj9jA3iVRkZk4QpfYICc53A"]

在计算 c时,小书签作者会丢弃其他三个大小,仅保留160px(5x5)大小。
c = b[3].split("#");
console.log(c[2], c[3], c[4], c[2]/(c[3]*c[4]));
242 5 5 9.68

最高上限9.68 = 10。

如果我们将 b[3]替换为 b[4],并且将附加到URL的 '2/M'修复为 '3/M',则将获得更高分辨率的图像。

使用较大版本进行简单替换(某些视频的版本最大,并且会失败):
javascript:(function()%7Ba%3Dytplayer.config.args.storyboard_spec%3Bif(!a)%7Balert("Sorry we cannot process this YouTube video. Could you please try another one")%3Bexit()%3B%7Db%3Da.split("%7C")%3Bbase%3Db%5B0%5D.split("%24")%5B0%5D%2B"3/M"%3Bc%3Db%5B4%5D.split("%23")%3Bsigh%3Dc%5Bc.length-1%5D%3Bvar imgs%3D""%3Bt%3Dytplayer.config.args.length_seconds%3Bn%3DMath.ceil(c%5B2%5D/(c%5B3%5D*c%5B4%5D))%3Bfor(i%3D0%3Bi<n%3Bi%2B%2B)%7Bimgs%2B%3D"<PICTURE%3D%27"%2Bbase%2Bi%2B".jpg%3Fsigh%3D"%2Bsigh%2B"%27><br/>"%3B%7Dvar title%3Dytplayer.config.args.title%3Bmsg%3D"<body style%3D%27background-color:%23444%3Bcolor:%23eee%3Bmargin:20px auto%3Bwidth:90%25%3Btext-align:center%27><h2>TITLE</h2><div>IMAGES</div><br/><em><a href%3D%27http://labnol.org/%3Fp%3D28217%27 style%3D%27text-decoration:none%3Bcolor:%23fff%3Bfont-style:bold%27>Printed using the YouTube bookmarklet.</a></em></body>"%3Bmsg%3Dmsg.replace("TITLE",title).replace("IMAGES",imgs).replace(/PICTURE/g,"img src")%3Bvar labnol%3Dwindow.open()%3Blabnol.document.open()%3Blabnol.document.write(msg)%3Blabnol.document.close()%3B%7D)()%3B

使用最大的可用缩略图制作图纸:
javascript:void%20function(){a=ytplayer.config.args.storyboard_spec,a||(alert(%22Sorry%20we%20cannot%20process%20this%20YouTube%20video.%20Could%20you%20please%20try%20another%20one%22),exit()),b=a.split(%22|%22),sz=b.length-1,base=b[0].split(%22$%22)[0]+(sz-1)+%22/M%22,c=b[sz].split(%22%23%22),sigh=c[c.length-1];var%20e=%22%22;for(t=ytplayer.config.args.length_seconds,n=Math.ceil(c[2]/(c[3]*c[4])),i=0;i%3Cn;i++)e+=%22%3CPICTURE='%22+base+i+%22.jpg%3Fsigh=%22+sigh+%22'%3E%3Cbr/%3E%22;var%20o=ytplayer.config.args.title;msg=%22%3Cbody%20style='background-color:%23444;color:%23eee;margin:20px%20auto;width:90%25;text-align:center'%3E%3Ch2%3ETITLE%3C/h2%3E%3Cdiv%3EIMAGES%3C/div%3E%3Cbr/%3E%3Cem%3E%3Ca%20href='http://labnol.org/%3Fp=28217'%20style='text-decoration:none;color:%23fff;font-style:bold'%3EPrinted%20using%20the%20YouTube%20bookmarklet.%3C/a%3E%3C/em%3E%3C/body%3E%22,msg=msg.replace(%22TITLE%22,o).replace(%22IMAGES%22,e).replace(/PICTURE/g,%22img%20src%22);var%20r=window.open();r.document.open(),r.document.write(msg),r.document.close()}();

更新
这不在书签中,但实时环聊视频 Storyboard 隐藏在 ytplayer.config.args.live_storyboard_spec例如
"https://i.ytimg.com/sb/xx/storyboard_live_60_3x3_b1/M$M.jpg?sigh=xx3f9uQQKI3j8yTiD2qO7_GynM8#106#60#3#3"

关于youtube - YouTube Storyboard脚本-更大的缩略图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35916949/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com