Created
May 9, 2025 18:34
-
-
Save PythonCoderAS/74a8573ed9a0e7558457aeba0a142b9f to your computer and use it in GitHub Desktop.
This file contains hidden or 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,mp4}(N) | |
| do | |
| duration=`ffprobe -v error -show_entries format=duration -of csv=p=0 $file` | |
| duration=$((duration-3)) | |
| 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