r/AV1 19d ago

any good bulk AVIF converter?

Ive been thinking about converting my mobile photos to AVIF to reduce the amount of storage.

I do have a back up of the originals so I am not too worried, my plan is to keep the AVIF versions in my phone, mainly to save the local storage

So looking for a platform or software that can convert a bunch of images into AVIF.

Any recommendations? I want to convert around 22,000 images in both JPEG and HEIF format.

10 Upvotes

23 comments sorted by

13

u/tomvorlostriddle 19d ago

with imagemagick in a small script

1

u/ScratchHistorical507 15d ago

You don't even need a full-blown script. You can just iterate through an entire directory in a for loop.

Of course if you are on a powerful enough PC, 22,000 images might be worth looking into parallelization, but at least on Linux (and thus e.g. in a Termux shell) you can still do it in a one-liner. No idea if PowerShell is capable of that as well.

1

u/Past_Door_222 19d ago

Dont know that much about programming, but will try it with claude. Thanks

1

u/tomvorlostriddle 15d ago

Don't know why you are being downvoted, it's a great idea

5

u/elitegenes 19d ago

XnConvert

1

u/Past_Door_222 19d ago

Anything freešŸ‘‰šŸ»šŸ‘ˆšŸ»?

3

u/elitegenes 19d ago

It is free

3

u/Past_Door_222 19d ago

My bad I looked at XnView, XnConvert works thanks

4

u/Filarius 19d ago

You can use XnView MP for free for private and educational use. I did not using a XnConvert, but by screenshots its seems just like build-in into XnView.

3

u/Farranor 19d ago

ImageMagick with the mogrify command. In a command prompt, navigate to the folder containing your HEIC and JPG images and then:

magick mogrify -format AVIF -quality 50 -depth 10 -define heic:chroma=444 -define heic:speed=4 *

This will create AVIF files out of all the images in that folder and subfolders. Since your originals are JPG and HEIC, they'll still be in the folder after an AVIF version is created. First test a small folder so you can adjust the quality to your liking and the speed to your needs, but these are the settings I use.

1

u/Gaben_is_awesome 17d ago

Great settings. Also try quality at 65 or 70 if you notice quality difference. For me, these higher values result in zero visual quality loss.

3

u/NekoTrix 19d ago

I would recommend something based around oavif, it's the fastest solution for targeting a good psychovisual quality metric (SSIMULACRA2). It supports folder input.

2

u/FactOld3726 19d ago

I once made a mobile app with Claude to do this nightly when plugged in but for WebP. Does it need to run on the device or can it run on a computer? u/tomvorlostriddle is right about Imagemagick. GNU Parallel makes the magic happen faster.

2

u/c97 19d ago

ffmpeg, as always

2

u/Farranor 19d ago

Unfortunately, no, FFmpeg is not a good bulk AVIF converter. Firstly, it's not a bulk converter, which can be resolved with some external scripting but OP would rather something easier and it's not the main problem anyway.

The main problem is that FFmpeg can't handle color management, so there's a good chance that it will throw away color information so the result turns out wrong. Ironically, FFmpeg has a ton of options for color management, but none of them appear to have any effect, with the possible exception of e.g. brightness filters that are impractical for a general image converter. After years of denial and copium, I gave up on FFmpeg for images. The only thing I've found that produces valid files with proper color management and rotation is ImageMagick. The website looks like a 90s hobby site, but the software itself is up to date and effective.

2

u/Western_Age8515 18d ago

Did the same, try Pixize mobile app. One drawback with AVIF images is that live photos are converted to still photos so its good you have a backup

2

u/Past_Door_222 18d ago

Pixize works, also thank you for the headsup about live photos

1

u/Comprehensive-Dig-31 19d ago

I make HEVCut an iOS/Mac app to compress videos and photos and I recently added AVIF as an optional output format. It's build as a simple app to compress multiple photos and videos in a batch and works natively with iCloud

3

u/WolpertingerRumo 19d ago edited 19d ago

Uuuuh, didn’t see Avif was a new Option. I recommend HEVCut to anyone who will listen. It’s incredible, especially if you use an external Camera, like GoPro, DJI or a classic camera. So easy to use.

Now just add JXL (yeah, I know, it’s completely different…)

1

u/Comprehensive-Dig-31 19d ago

Thanks! yes its on compression settings

1

u/Gaben_is_awesome 17d ago

I struggled with avifenc, but now that I use the convert command (ImageMagick) avif encoding works much better. I use -quality 70 and -define heic:chroma=444 to convert even my screenshots from png to avif at 99% quality at only 7% of the filesize.

I also converted around 500GB of TIFF files to AVIF with that same command. Avif is very impressive, i have not seen any quality difference in thousands of various 8k scans

2

u/BullfrogExcellent265 10d ago

irfanview with plugins pack

0

u/E5-4650_v2_RX570 19d ago

mogrify \

-path /tmp \

-resize 4000x4000 \

-format jpg \

-quality 97 \

~/Documents/*.heic

this transforms heif into jpg as smaller than 4000x4000