Created
January 8, 2020 09:22
-
-
Save somoso/986d123663af161c6fbd67973186c721 to your computer and use it in GitHub Desktop.
Cropping black bars out of a video using ffmpeg
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
| #!/bin/bash | |
| # First argument is the video file with the black borders that need to be removed | |
| # Second argument is the resulting video | |
| ffmpeg -i $1 -vf "$(ffmpeg -i $1 -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1)" $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment