Created
September 11, 2021 14:57
-
-
Save patrislav1/6156117c3ffc64f1d0165a06f220de84 to your computer and use it in GitHub Desktop.
Lossless conversion from .avi to .mkv (for Smart TV compatibility)
This file contains 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 | |
FILES=$(find . -name "*.avi") | |
while read FILE; do | |
DESTFILE=$(echo ${FILE} | sed 's/\.avi$/\.mkv/g') | |
rm -f "${DESTFILE}" | |
ffmpeg -fflags +genpts -nostdin -i "${FILE}" -c:v copy -c:a copy "${DESTFILE}" | |
ls -lh "$FILE" | |
ls -lh "$DESTFILE" | |
done <<< $FILES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment