Skip to content

Commit

Permalink
mp4_to_gif_with_border.bat updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonEvmenenko committed Oct 19, 2023
1 parent 2ca1677 commit 353478f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/mp4_to_gif_with_border.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ setlocal
set input_file=input.mp4
set output_file=output.gif

set crop=2 & :: pixels
set crop=4 & :: pixels
set border_thickness=2 & :: pixels
set skip=1 & :: seconds

set /a temp=%border_thickness% * 2

ffmpeg -i %input_file% -ss %skip% -filter_complex "[0]crop=w=iw-%crop%:h=ih-%crop%[a];[a]pad=w=%temp%+iw:h=%temp%+ih:x=%border_thickness%:y=%border_thickness%:color=black" %output_file%
ffmpeg -i %input_file% -ss %skip% -filter_complex "[0]crop=w=iw-%crop%:h=ih-%crop%[a];[a]pad=w=%temp%+iw:h=%temp%+ih:x=%border_thickness%:y=%border_thickness%:color=gray" %output_file%

endlocal

0 comments on commit 353478f

Please sign in to comment.