Created
September 19, 2024 17:26
-
-
Save PythonCoderAS/3347d049ab507df82c050118de316aef to your computer and use it in GitHub Desktop.
Trim two seconds from the end of every movie file
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
for file in huge/*.mov | |
do | |
duration=`ffprobe -v error -show_entries format=duration -of csv=p=0 $file` | |
duration=$((duration-2)) | |
ffmpeg -ss 00:00:00 -to $duration -i $file -c copy Final/"$(basename "$file")" | |
rm "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment