[英]Get frames of a video on a web-page
There is a video of a diamond represented as a sequence of images. 有一个钻石视频表示为一系列图像。 Here is the link: http://beta.jamesallen.com/#!/loose-diamonds/Round-cut/0.70-carat-K-color-SI1-clarity-Very-Good-cut-sku-163685 . 这是链接: http : //beta.jamesallen.com/# ! /loose-diamonds/Round-cut/0.70-carat-K-color-SI1-clarity-Very-Good-cut-sku-163685 。 If asked about credentials, you can use fsgs2k@gmail.com
/ hello
as login / password. 如果询问凭据,则可以使用fsgs2k@gmail.com
/ hello
作为登录名/密码。
The video is displayed inside a canvas
element by some tricky JS. 某些棘手的JS将视频显示在canvas
元素内。 I'm not experienced enough to go though this controlling JS. 我没有足够的经验来使用此控制JS。 What I want is: 我想要的是:
I need your help with these tasks. 在这些任务上我需要您的帮助。
You have the resource folder displayed in the <canvas>
element : 您在<canvas>
元素中显示了资源文件夹:
<canvas id="diamond_s1" class="diamondCanvas" style="display: block;"
setfolder="Sets/Diamond/$number/sets/" width="473" height="375"></canvas>
You have to get that folder path, and then you should be able to make requests to the urls you can see in the tab Network of Chrome that contains the previous dir and ends with set[number].txt 您必须获取该文件夹路径,然后您才可以对包含在Chrome的网络标签中的URL进行请求,该标签包含以前的目录并以set [number] .txt结尾
These url return the whole video frame by frame encoded as bsae64 data-image. 这些url逐帧返回整个视频,并将其编码为bsae64数据图像。 You'll get a lot of data:image/jpeg;base64,
followed by the base64 image. 您将获得大量data:image/jpeg;base64,
其次是base64图像。 That's the image frame you have to get and convert in jpeg via simple base64 decoding 那就是您必须通过简单的base64解码在jpeg中获取并转换的图像帧
You'll have to figure out in which order they're taken, but the json gives you some insights about that 您必须弄清楚它们的使用顺序,但是json为您提供了一些有关此的见解
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.