Skip to content

juhotuho10/gif_to_avif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GIF to AVIF Converter

A Python tool for converting .gif files (or folders containing .gifs) and into animated .avif files using avifenc and Pillow.

Keeps gif transparency and frame durations intact for the final .avif file

the resulting .avif file is placed in the same folder as the .gif file


Usage

python gif_to_avif.py path/to/gif_file.gif [--quality N]

or

python gif_to_avif.py path/to/folder/ [--quality N]

--quality N: (optional, default 60) (integer: 0 <= N <= 100)

Note: quality above 90 isn't worth the trouble, you won't really see quality improvement and the file size can be bigger than the original .gif file

Recommended settings:

  • basically lossless: 90
  • little compression & super high quality: 80
  • compression & great quality: 60
  • good compression & fine quality: 40
  • great compression & some detail: 30
  • full compression: 20
  • maybe some pixels left: 10

Note: noisy gifs lose their detail faster than smoother gifs, they are also harder to compress


Requirements

Note: avifenc must be callable from commandline from the .py file with:

avifenc [commands] 

Install Pillow for python with pip:

pip install Pillow

Install avifenc:

Follow avifenc installation guide for command line install

or

download from their release page

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

converting gifs to avif files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages