Add ffmpeg AR test function

This commit is contained in:
Jan Jastrow 2023-02-12 19:54:49 +01:00
parent be9442ddbf
commit 23e25b0b2e

View File

@ -62,6 +62,16 @@ function ff-ar4-3() {
mv "$1" "_$1" && mv "temp_$1" "$1"
}
# ffmpeg fix 4:3 AR ($1 = file, $2 1/1, $4:3)
function ff-ar-custom() {
if [ $# -lt 3 ]; then
>&2 echo "Not enough arguments (\$1 = 'file', \$2 '1/1', \$3 '4:3')"
return 0
else
ffmpeg -i "$1" -c copy -map 0 -bsf:v "h264_metadata=sample_aspect_ratio=$2" -aspect $3 -movflags faststart "_$1"
fi
}
# ffmpeg fix Non-monotonous DTS
function ff-dts() {
ffmpeg -fflags +igndts -i "$1" -c copy -movflags faststart "temp_$1"