无需下载整个视频即可生成屏幕截图
我正在后端应用程序中解析一些播客,我需要为它们生成一些屏幕截图。但是,无法下载整个视频。
有没有办法只下载文件的一小部分来提取屏幕截图?理想情况下,它应该是中间部分。
谢谢!
I'm parsing some podcasts in a back-end application and I need to generate some screenshots for them. However, downloading the entire videos is not an option.
Is there a way to download just a small part of the file to extract the screenshot from? Ideally, it would be the middle part.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是一个使用 django 和 python 在 Web 应用程序上解析 xml 以获取中间部分屏幕截图的应用程序。我希望能够独立于平台。它将从托管位置获取播客,并且仅自动获取屏幕截图。播客的大小可能很大(500 Mb),因此不能选择下载。
Is an application that parses xmls to get screenshots in the middle part, on a web app using django and python. I'll hope to be platform independent. It will get podcasts from the place where are hosted and only get the screenshot automatically. The podcasts can have big size (500 Mb) so that's why downloading is not an option.
如果视频托管服务器支持“Range”http 请求标头,您可以通过查看“Accept-Ranges”标头值来找出该标头,如果它为 true,则它支持“Range”标头。然后,您可以使用“Range”请求标头请求中间 5-10 MB 的视频。您可以通过“content-length”http响应标头获取内容长度。
It is possible if the video hosting server support "Range" http request header which you can find out by seeing the "Accept-Ranges" header value, if it is true then it supports the "Range" header. Then you can ask for the middle 5-10 MB of video using "Range" request header. You can get the content length via "content-length" http response header.