Skip to content

Instantly share code, notes, and snippets.

@yumin9822
Created March 28, 2025 02:24
Show Gist options
  • Save yumin9822/fb7e9785d9b24cb8b26ad39657281c44 to your computer and use it in GitHub Desktop.
Save yumin9822/fb7e9785d9b24cb8b26ad39657281c44 to your computer and use it in GitHub Desktop.
#!/bin/bash
ScriptName=${0##*/}
function print_usage() {
echo "Please Use $ScriptName <File> <NameSeason>."
echo "The screenshots will be saved in /root/"
echo "Example: $ScriptName 00003.m2ts Friends01"
}
FILE=$1
NAME=$2
## Check the number of arguments.
if [ $# -ne 2 ]; then
print_usage
exit 1
fi
#ffmpeg -ss 00:30 -i "${FILE}" -r 0.2 -t 01:00 /root/${NAME}-%02d.png
ffmpeg -ss 00:02:30 -i "${FILE}" -vf fps=1/20 -vframes 6 /root/"${NAME}"-%02d.png
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment