We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg can remove letterboxing, as demonstrated in this bash script:
#!/usr/bin/env bash # # Remove letterboxing from media files using ffmpeg's cropdetect function # set -o nounset -o pipefail if ! command -v ffmpeg >/dev/null 2>&1 ; then echo "Missing dependency: ffmpeg" 1>&2 ; exit 1 ; fi if ! command -v grep >/dev/null 2>&1 ; then echo "Missing dependency: grep" 1>&2 ; exit 1 ; fi if ! command -v bak >/dev/null 2>&1 ; then echo "Missing dependency: bak" 1>&2 ; exit 1 ; fi CROP_PATTERN="crop=\d+:\d+:\d+:\d+" input_file="$1" output_file="${input_file%.*}_unboxed.${input_file##*.}" # detect crop area crop_area="$( \ ffmpeg -i "$input_file" -vf cropdetect -f null - 2>&1 | \ grep -Po "$CROP_PATTERN" | \ tail -n1 \ )" || return if bak "$input_file" ; then # make a backup of the original # crop the video ( set -x ; \ ffmpeg \ -y \ -i "$input_file" \ -acodec copy \ -vf "$crop_area" \ "$output_file" \ ) && \ mv -f "$output_file" "$input_file" else exit fi # EOF
Since this approach requires calling ffmpeg twice, I wasn't able to replicate it inside ffshare with the additional options parameter.
Could this be incorporated into ffmpeg in some way?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ffmpeg can remove letterboxing, as demonstrated in this bash script:
Since this approach requires calling ffmpeg twice, I wasn't able to replicate it inside ffshare with the additional options parameter.
Could this be incorporated into ffmpeg in some way?
The text was updated successfully, but these errors were encountered: