Skip to main content

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/.bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the function is loaded (manually or from . ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF BreweryGIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/.bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the function is loaded (manually or from . ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/.bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the function is loaded (manually or from . ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

added 22 characters in body
Source Link
kenorb
  • 25.8k
  • 27
  • 134
  • 204

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/.bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the filefunction is loaded (manually or from . ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the file is loaded (. ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/.bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the function is loaded (manually or from . ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

replaced http://superuser.com/ with https://superuser.com/
Source Link

Linux/Unix/macOS

Following @LordNeckbeard approach@LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the file is loaded (. ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the file is loaded (. ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Linux/Unix/macOS

Following @LordNeckbeard approach with ffmpeg command, please find the following useful Bash function which can be added into your ~/bash_profile file:

# Convert video to gif file.
# Usage: video2gif video_file (scale) (fps)
video2gif() {
  ffmpeg -y -i "${1}" -vf fps=${3:-10},scale=${2:-320}:-1:flags=lanczos,palettegen "${1}.png"
  ffmpeg -i "${1}" -i "${1}.png" -filter_complex "fps=${3:-10},scale=${2:-320}:-1:flags=lanczos[x];[x][1:v]paletteuse" "${1}".gif
  rm "${1}.png"
}

Once the file is loaded (. ~/.bash_profile), you should have new video2gif command.

Example usage:

video2gif input.flv

or:

video2gif input.flv 320 10

Scale to 320 width with 10 frames per second.

You can also specify a different video format (such as mp4).


macOS

You can try GIF Brewery app which can create GIFs from video files.


Alternatively there are several websites which are doing conversion online free of charge.

Source Link
kenorb
  • 25.8k
  • 27
  • 134
  • 204
Loading