5 ms·
A one line combination of YouTube-dl and ffmpeg can do this btw (without downloading the whole video)
by 55555 3y ago
A one line combination of YouTube-dl and ffmpeg can do this btw (without downloading the whole video)
- KeplerBoy 3y agoThis would be a good place to share that one line.
- web0_cc 3y agoyt-dlp ${youtube_video_url} --get-url ffmpeg -ss ${seconds} -i "${first_url_from_yt-dlp}" -t 1 -r 4/1 -q:v 2 -vf scale="0:-1" ${target} -r 4/1: 4 frames per second Again this app is for mobile devices which lack yt-dlp+ffmpeg
- tjoff 3y agoNice, if you install termux (from fdroid) you can run it directly on your android.
- vitehozonage 3y agoDoes this really not download the whole video? I havent checked but im just surprised that it's possible
- thrdbndndn 3y agoNo it doesn't. FFMPEG can seek video directly without loading all the content, even for Dash/HLS (but in this case yt-dlp typically returns a plain HTTP source, which I assume internally FFMPEG uses HTTP header range to seek?) Keep in mind you need to make sure to use input seeking, though (-ss before -i). Also I'm not sure why they need `-vf scale="0:-1"` part.
- edotrajan 3y agoIs it possible to get one screenshot from different periods of the same video like 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80% with just one command. If yes, could you please share for me here, it'd be really helpful, thanks
- codetrotter 3y agoI was gonna say that realistically your one liner is gonna need to be ran probably 20, 30 times before you’re able to pick the exact frame that you want. But with a little bit extra work you could make that one liner into a script that will extract a range of frames surrounding the chosen timestamp.