Created
March 28, 2025 02:24
-
-
Save yumin9822/fb7e9785d9b24cb8b26ad39657281c44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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