Skip to content

Instantly share code, notes, and snippets.

View netskink's full-sized avatar

John F. Davis netskink

View GitHub Profile
@netskink
netskink / Convert .mov or .MP4 to .gif.md
Created May 9, 2025 18:09 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

<!DOCTYPE html>
<html>
<body onload="init()">
<canvas id="canvas" width="400" height="400" style="border:solid 2px black"></canvas>
<ul id="sliders"></ul>
<script id="jsbin-javascript">
var canvas;
var context;
<body onload="init();">
<canvas id="myCanvas" width="400" height="400">
Your browser does not support the canvas tag.
</canvas>
<script id="jsbin-javascript">
var canvas, ctx;
var x=100, y=100;
var angle=0;
var x = 100;
<body onload="init();">
<canvas id="myCanvas" width="400" height="400">
Your browser does not support the canvas tag.
</canvas>
<script id="jsbin-javascript">
var canvas, ctx;
var x=100, y=100;
var incrementX = 0;
function init() {
canvas = document.getElementById('myCanvas');
<head>
<meta charset="utf-8">
<title>Click listener version 1</title>
</head>
<body>
<button id="myButton">Click me!</button></button>
<script id="jsbin-javascript">
var button = document.getElementById("myButton");
// Add an onclick listener to the button