Skip to content

Instantly share code, notes, and snippets.

@stesee
Created January 7, 2023 15:39
Show Gist options
  • Save stesee/2b78d94b2f628d67e7df2e49019291a1 to your computer and use it in GitHub Desktop.
Save stesee/2b78d94b2f628d67e7df2e49019291a1 to your computer and use it in GitHub Desktop.
Code to recompress legacy videocontainer found in recursive tree
#!/bin/bash
find . -iname '*.avi' -o -iname '*.3gp' -o -iname '*.wmv' | while read -r FILE; do
#echo "Processing file '$FILE'"
NEWFILE="$FILE.upgradeFromLegacyVideoformat.mp4"
if test -f "$NEWFILE"; then
echo "$NEWFILE exists."
fi
ffmpeg -nostdin -i "$FILE" "$NEWFILE"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment