Skip to content

Instantly share code, notes, and snippets.

@WahidinAji
Last active August 21, 2025 17:06
Show Gist options
  • Select an option

  • Save WahidinAji/6a726d632fca847ae24faf156bd5d6e3 to your computer and use it in GitHub Desktop.

Select an option

Save WahidinAji/6a726d632fca847ae24faf156bd5d6e3 to your computer and use it in GitHub Desktop.
format video from .mov to .mp4 with ffmpeg
# convert .mov to mp4
ffmpeg -y -i "vidio.mov" -c:v libx264 -crf 22 -preset veryfast -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart "vidio.mp4"
# convert .mp4 to .gif and make the video 2x faster
ffmpeg -i "video.mp4" -i palette.png -lavfi "setpts=0.5*PTS,fps=15,scale=800:-1:flags=lanczos[x];[x][1:
v]paletteuse" -y video.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment