让我解释一下我的设置。我一直在使用 pytube(Python 模块)从 YouTube 下载视频。然后我会从视频中提取一些随机帧并将它们保存为 jpeg。我不需要音频,也不需要视频。
现在,我已经下载了数以万计的视频,然后删除它们只是为了每个视频随机抓取几个帧。这似乎很浪费,而且成本也很高。有没有办法只下载帧本身而不必下载视频?
我猜想像 youtube-dl 结合 ffmpeg 这样的东西可以解决问题,但我无法在网上找到一个例子来做到这一点。有一种下载随机视频样本的解决方案,可以大大减少网络带宽消耗,但我想要更高效、更省时的东西。任何帮助,将不胜感激。
WARNING: Could not send HEAD request to https://www.youtube.com/watch\?v\=oHg5SJYRHA0: HTTP Error 404: Not Found ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the …Run Code Online (Sandbox Code Playgroud)