Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- set "img1=%~1"
- set "img2=%~2"
- set "outfile=%~dp1%~n1_tit.jpg"
- set "img2_scale_w=2.5"
- for /f "tokens=5 delims==_" %%i in ('ffprobe -v error -of flat^=s^=_ -select_streams v:0 -show_entries stream^=height "%img1%"') do set "HEIGHT=%%i"
- echo %HEIGHT%
- rem This will SCALE second image to the height of the first one
- rem ffmpeg -i "%img1%" -i "%img2%" -filter_complex "[1][0]scale=-1:h=ref_h[img2s]; [0][img2s]hstack=inputs=2[out]" -map [out] "%outfile%"
- rem This will PAD second image to the height of the first one
- ffmpeg -i "%img1%" -i "%img2%" -filter_complex "[1]scale=w=iw*%img2_scale_w%:h=-1[img2s]; [img2s]pad=w=iw+1:h=%HEIGHT%:x=0:y=0:color=black[img_pad]; [0][img_pad]hstack=inputs=2[out]" -map [out] "%outfile%"
- pause
Advertisement
Add Comment
Please, Sign In to add comment