Media — ffmpeg, GIFs, client demos
Everyday CLI beats online converters for NDAs.Install
powershell
# winget
winget install Gyan.FFmpeg
# or choco
choco install ffmpeg
ffmpeg -versionConvert MP4 → GIF
bash
ffmpeg -i input.mp4 video.gifHigher quality palette approach:
bash
ffmpeg -i input.mp4 -vf "fps=12,scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gifCut by time
bash
ffmpeg -i input.mp4 -ss 00:05:10 -to 00:15:30 -c:v copy -c:a copy output.mp4Drop last N minutes
bash
ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4Compress for Slack / email
bash
ffmpeg -i input.mp4 -vcodec libx264 -crf 28 -preset fast -acodec aac -b:a 128k small.mp4Extract audio
bash
ffmpeg -i input.mp4 -vn -acodec copy audio.m4a
ffmpeg -i input.mp4 -vn -acodec libmp3lame -q:a 2 audio.mp3Screenshot from video
bash
ffmpeg -ss 00:01:23 -i input.mp4 -frames:v 1 shot.pngPowerShell batch: all mp4 → gif in folder
powershell
Get-ChildItem *.mp4 | ForEach-Object {
ffmpeg -y -i $_.FullName "$($_.BaseName).gif"
}See also older notes: PowerShell ffmpeg