Created
April 2, 2020 22:49
-
-
Save wngreene/3e979830606098d7d8419700216c1eef to your computer and use it in GitHub Desktop.
Extract frames from a video.
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
#! /usr/bin/env bash | |
# Extract frames from a video. | |
INPUT_FILE=${1} | |
OUTPUT_DIR=${2} | |
FMT=${3-%010d.png} | |
# QUALITY=${4-1} | |
if [ ! -d ${OUTPUT_DIR} ]; then | |
mkdir -p ${OUTPUT_DIR}; | |
fi | |
pushd . | |
ffmpeg -i ${INPUT_FILE} -start_number 0 "${OUTPUT_DIR}/$filename${FMT}" | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment