Skip to content

Instantly share code, notes, and snippets.

@mkeneqa
Last active April 16, 2022 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkeneqa/70276f0b89463905e5c37d228cb4a2b4 to your computer and use it in GitHub Desktop.
Save mkeneqa/70276f0b89463905e5c37d228cb4a2b4 to your computer and use it in GitHub Desktop.
A script to transcode video in directory to Apple ProRes
#!/bin/bash
# A script to transcode video in directory to Apple ProRes
# chmod + prores_trx.sh && sh prores_trx.sh
# The -profile:v # is for ProRes quality
# 0: ProRes422 (Proxy)
# 1: ProRes422 (LT)
# 2: ProRes422 (Normal)
# 3: ProRes422 (HQ)
mkdir converted
if file = [*.MP4]
then
for file in *.MP4; do ffmpeg -i "$file" -vcodec prores -profile:v 1 -acodec pcm_s16le converted/"${file%.MP4}".mov; done
fi
if file = [*.mov]
then
for file in *.mov; do ffmpeg -i "$file" -vcodec prores -profile:v 1 -acodec pcm_s16le converted/"${file%.mov}".mov; done
fi
echo "PRORES Transcoding Completed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment