From a6970ddc7600afb93699ec0e9725e6c988664ad9 Mon Sep 17 00:00:00 2001 From: Wiwi Kuan Date: Sun, 1 Sep 2024 20:46:29 +0800 Subject: [PATCH] Add files via upload --- png-seq-to-prores.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 png-seq-to-prores.sh diff --git a/png-seq-to-prores.sh b/png-seq-to-prores.sh new file mode 100644 index 0000000..fc16fbe --- /dev/null +++ b/png-seq-to-prores.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Check if an output filename was provided +if [ $# -eq 0 ]; then + echo "Error: No output filename provided" + echo "Usage: $0 " + exit 1 +fi + +# Get the output filename from the first argument +output_file="$1" + +# Check if the output filename ends with .mov, if not, append it +if [[ ! $output_file =~ \.mov$ ]]; then + output_file="${output_file}.mov" +fi + +# Run the FFmpeg command +ffmpeg -framerate 30 -i %06d.png -c:v prores_ks -profile:v 4444 -qscale:v 5 -vendor apl0 -pix_fmt yuva444p10le "$output_file" + +# Check if FFmpeg command was successful +if [ $? -eq 0 ]; then + echo "Conversion completed successfully. Output file: $output_file" +else + echo "Error: FFmpeg command failed" + exit 1 +fi