Skip to content

Instantly share code, notes, and snippets.

@seaque
seaque / imagemagick-commands.md
Last active March 3, 2023 07:55
imagemagick commands.

16:9 to 2:1 (1920x1080 -> 1920x960)

magick convert in.jpeg -crop x960+0+60 out.jpeg

Convert all PNG to JPG

for %i in (*.png) do magick convert "%i" "%i.jpg"

Crop all jpg images specified resolution with folder named outputs in the same directory

@seaque
seaque / ffmpeg-commands.md
Last active March 2, 2023 11:02
various ffmpeg commands.
@seaque
seaque / command.md
Last active July 5, 2022 13:09
ffmpeg extract movie frames to folder.

ffmpeg -copyts -i "Cars.2006.1080p.BluRay.x264.AAC-ETRG.mkv" -r 1000 -vf "mpdecimate=hi=64*12*15:lo=64*5*15:frac=1",subtitles="Cars.2006.1080p.BluRay.x264.AAC-ETRG.en.srt:force_style='PrimaryColour=&H0000ffff,BorderStyle=2,FontSize=26,FontName=Netflix Sans Medium,Alignment=2,MarginV=20'" -frame_pts false -vsync vfr -q:v 1 "Sub_01/%05d.jpg" -r 1000 -vf "mpdecimate=hi=64*12*15:lo=64*5*15:frac=1" -frame_pts true -vsync vfr -q:v 1 "Raw_01/%05d.jpg"

resim

-copyts: Asks ffmpeg not to sanitize timestamps. Important to keep the subbed and raw frames in sync.

-i Cars.2006.1080p.BluRay.x264.AAC-ETRG.mkv: Input video file.

-r 1000: Framerate to process input. It's necessary to get the timestamps in milliseconds.

-f 'bv* [ext=mp4] + ba [ext=m4a] / b'
--no-mtime
-P '%USERPROFILE%/AppData/Local/Temp'
-o %(title)s.%(ext)s
--ffmpeg-location C:/tools/ffmpeg/bin
@seaque
seaque / Kinobot Requests.md
Last active June 17, 2022 12:41
List of requests i made with kinobot.
@seaque
seaque / open-cmd.bat
Last active September 28, 2022 13:44
Open Command Prompt in Certain Directory
@ECHO OFF
CD /D "dir"
CMD
@seaque
seaque / input.conf
Last active January 20, 2024 12:29
my MPV scripts and config files.
J ignore
j ignore
k ignore
l ignore
G ignore
F ignore
A ignore
F8 ignore
MBTN_LEFT_DBL ignore