答案1
#!/bin/bash
f="input 1.mp4"
WID="$(ffprobe -v error -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$f")"
HEI="$(ffprobe -v error -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 "$f")"
echo $WID x $HEI
ffmpeg -hide_banner -i "$f" -ignore_loop 0 -i "L6h34.gif" -filter_complex [1:0]scale="${WID}"-10:"${HEI}"-10[v0],[0:0][v0]overlay=5:5:shortest=1[v] -map [v] -c:v h264_nvenc -f matroska -y "/mnt/sklad/tmp/L6h34.mkv"
比例尺