Skip to content

Instantly share code, notes, and snippets.

@ins429
Created January 6, 2023 23:54
Show Gist options
  • Save ins429/934bfd69e87072225df85e9370862dd9 to your computer and use it in GitHub Desktop.
Save ins429/934bfd69e87072225df85e9370862dd9 to your computer and use it in GitHub Desktop.
video2gif, gif2video
alias video_to_gif='function video_to_gif(){ ffmpeg -i $1 $2 && gifsicle -O3 $2 -o $2 && say "Video is ready!"};video_to_gif'
gif_to_video() {
ffmpeg -i $1 -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment