Take a screenshot or frame capture of a video, at a random timestamp (within limits of the duration):
SEC=$(ffprobe -i video -show_format -v quiet | sed -n 's/duration=//p' | cut -d '.' -f 1)
START=$(shuf -i 0-$SEC -n 1)
ffmpeg -y -ss $START -i video -frames:v 1 -q:v 25 screencap.jpg -loglevel panic
Links
- How can I make ffmpeg be quieter/less verbose?
- How to extract 1 screenshot for a video with ffmpeg at a given time?
- Random number from a range in a Bash Script
- How to get video duration in seconds?
- Fastest way to take screencaps out of videos
- pyvideothumbnailer
- Fast tool to generate thumbnail video galleries for command line
- Taking screenshots from random frames of a video file [duplicate]
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.