Convert M4V to AVIF

Converting M4V to AVIF takes a single frame from Apple-produced video and encodes it with AV1, which is the smallest useful thing you can put at the top of a web page. It is also the slowest still this site writes, so it is worth reserving for the one image where the size is a number somebody is looking at.

  • Where it runs In your browser. The file is never uploaded.
  • Lossy Some detail is traded for size. AVIF cannot hold everything an M4V can.
  • File size limit Up to 100 MB per file, free, without an account.
  • Worth knowing One frame, at full resolution. A still from compressed video carries that compression — a fast-moving moment looks softer than a static one, which is the video’s own encoding rather than anything this conversion does.

Up to 100 files at once. Mixed formats are fine.

Nothing in an M4V belongs to the AVIF family

AVIF is not a new image codec; it is an AV1 keyframe wrapped in a container. When the source video is itself AV1 the round trip is unusually kind, because the artefacts of the first pass are the shapes the second pass describes efficiently. That is a real effect and it is not available here.

An M4V holds H.264 or HEVC, both from the MPEG side of the fence, so the frame crosses families on its way out. The decode to pixels in between means this costs less than it sounds — the encoder receives an image, not a representation it has to reinterpret — but no argument about lineage applies, and the picture is judged purely as a picture.

The format that would have matched is one this site cannot write

For an HEVC recording the natural still format is HEIC: the same codec, in the same container family, which is exactly why Apple devices produce it. Converting an HEVC frame to HEIC would be the family conversion AVIF is not.

It is not on offer, and the reason is a licence rather than a limitation. Writing HEIC needs an HEVC encoder, the common one is published under terms this project’s dependency policy rules out, and shipping it anyway is not an option that exists. AVIF was designed by the Alliance for Open Media to do the same job without that problem, which is how an open format ends up being the answer to a question about an Apple one.

Eight bits per channel, whatever the recording held

The registry records AVIF as supporting twelve bits and wide colour, and that is true of the format. It is not true of this path. The frame is read out of the decoder through a canvas, which hands over eight bits per channel in ordinary sRGB, and the encoder receives exactly that.

The consequence matters on modern Apple footage specifically, because recent iPhones and Final Cut exports carry HDR as a matter of course. That grade does not survive: highlights are compressed into the eight-bit range and the result looks like the same shot handled by an ordinary camera. For a web page that is the right outcome, since almost nothing downstream would have used the extra depth. For anything where the grade is the work, this is not the tool.

One hero image, not thirty thumbnails

The encoding cost is charged per image and it is not small. AV1 earns its efficiency through an exhaustive search over ways to describe each block, and on a full-resolution frame from a 4K recording that search takes real seconds on a good machine and rather more on a modest one.

That fixes what this conversion is for. One large picture at the top of a page, served a great many times, is worth the wait many times over. A catalogue of course thumbnails is not — the saving per image is small at thumbnail sizes and the waiting is multiplied by the number of videos. Use WebP for the grid and AVIF for the header, which is the split most performance work arrives at anyway.

Which frame survives being looked at

The timestamp accepts up to 86,400 seconds, so any moment in a long recording is reachable by typing the number of seconds. What the number should be is decided by the video encoder rather than by you: a held shot, a slide or a speaker between gestures was expensive to encode and comes out detailed, while a pan or a cut was cheap and comes out soft.

On this pair that choice outweighs the format by a wide margin. A still taken at a still moment and saved as JPG beats one taken mid-motion and saved as AVIF on every measure including size, because a smeared frame is full of detail an encoder has to spend bits describing. Moving the timestamp half a second is free; a better codec is not.

Getting the AVIF onto the page

Serve it from a `<picture>` element with a WebP source behind it and a JPG as the final `<img>`. Three lines, no JavaScript, and the browser takes the first thing it understands — which matters because AVIF support arrived years after WebP and devices that no longer receive updates persist.

Check the other end of the pipeline too. A number of content management systems and static-site build steps still refuse `.avif` on upload or fail to generate derivatives from it, which is a more common obstacle in practice than a visitor without a decoder. Finding that out before you encode thirty images is worth two minutes.

Where an AVIF frame is the wrong artefact

Anything that is not a web page. Email clients do not render it, office software largely does not, print workflows do not, and a colleague sent one will usually reply asking what it is. Upload forms on other people’s sites reject the extension often enough to be a planning consideration rather than an edge case.

The library case is worth naming separately, because it is close by and different. Artwork for a Plex, Jellyfin or Emby collection goes to a server that expects JPG or PNG and matches it by file name, and the JPG route on this site is written for that job. AVIF outside a browser produces a smaller file nobody can open, which is not an optimisation.

A protected M4V produces no image

Films and episodes bought or rented through the iTunes Store or the Apple TV app carry FairPlay encryption. Nothing in a browser can decode them, so there is no frame to encode and the conversion reports that nothing in the file could be converted before it starts.

Everything else is fine: QuickTime, iMovie, Final Cut and Compressor exports, camera recordings, conference and course downloads. If a batch works apart from a handful, the handful were purchases rather than damaged files.

Expensive encoding that costs your machine and nothing else

AVIF encoding is demanding enough that services offering it tend to queue it, cap it or charge for it. Here it runs in the tab on your own processor, so there is no queue to wait in and no daily allowance to spend — a drop takes up to 100 files at once, and the only cost is your own time, which you spent knowingly when you decided the trade was worth making.

It also means the video stays where it is. The free tier accepts input files up to 100 MB, and nothing carrying the recording is transmitted at any point, which on this pair is as much about proportion as about privacy: uploading a large video to receive a forty-kilobyte image is a strange amount of network for the result.

How to encode a frame of an M4V as an AVIF

  1. Choose a still moment from the middle of the recording and note the number of seconds.
  2. Drop the M4V here, choose AVIF, and expect the encode to take seconds rather than an instant.
  3. Serve it from a picture element with WebP and JPG behind it, and check your CMS accepts the extension.

M4V and AVIF: MPEG video and an AV1 still image

M4V compared with AVIF
M4VAVIF
Full nameiTunes VideoAV1 Image File Format
File extension.m4v.avif
Media typevideo/x-m4vimage/avif
CompressionLossy — file size is bought with qualityEither, depending on the setting
First published20052019
Published byAppleAlliance for Open Media
SpecificationAV1 Image File Format
LicensingPublished, not standardisedOpen standard
Standing todayCurrentCurrent
Bit depth12
Colour it can describeRGB, YCbCr, wide gamut
Largest image65,536 px per side
Opens in a browserSome browsersCurrent browsers
Considered insteadMP4, MOVWebP, JXL, JPG

Opening the result

AVIF opens in current browsers, though not in older ones. M4V has narrower browser support than that. If the file is going onto a web page or into a form, that is usually the whole reason for the conversion.

AVIF is a container rather than a single format. What actually plays is the codec inside it — usually AV1 — which is why two files with the same extension can behave differently on the same device.

The usual programs do not overlap: M4V opens in QuickTime Player, VLC and iTunes, AVIF in GIMP, Squoosh and ImageMagick — so whoever receives the result needs something from the second list.

What each format is for

AVIF comes from Alliance for Open Media and dates from 2019, specified as AV1 Image File Format. GIMP, Squoosh and ImageMagick all read it.

M4V to AVIF: colour depth, encoding time and HEIC

Are my M4V files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file. The engine behind this particular pair is mediabunny, a wrapper around WebCodecs, which borrows your device's own hardware decoders; your browser fetches it once and caches it.

Will the AVIF be HDR if the video was?

No. The frame is read out through a canvas as eight bits per channel, so AVIF’s twelve-bit depth and wide colour are not reachable on this path. A recording graded in HDR arrives flattened to ordinary eight-bit colour, which is correct for a web page and wrong if you were after the grade.

Why not HEIC, if the video is HEVC?

Because this site cannot write it. HEIC is HEVC wrapped in the same container family, so it would be the natural match — but writing it needs an HEVC encoder, and the common one is licensed under terms the dependency policy rules out. AVIF is the open format that does the same job.

Why does this take so much longer than a JPG?

AV1 gets its efficiency by trying a very large number of ways to describe each block of pixels before choosing one. That search is the cost, and it scales with resolution — a 4K frame on a modest laptop takes noticeably longer than a few seconds.

Is AVIF worth it for a grid of thumbnails?

Usually not. The encoding time is charged per image and the saving is largest on big ones, so AVIF earns its place on the one picture at the top of a page. Use WebP for the twenty small ones, which encodes instantly and is smaller than a JPG.

Can I send an AVIF to somebody?

It is a poor idea. Email clients do not render it, office software largely does not, and upload forms often reject the extension. Its whole case rests on being decoded by a browser over a network you are paying for; outside that, take the JPG.

Will an iTunes Store film give up a frame?

No. It is encrypted with FairPlay and cannot be decoded in a browser, so the conversion reports that nothing in the file could be converted. Unprotected M4V files behave normally.

More about these formats

Where these figures come from

The claims this page makes about M4V and AVIF are checkable, and these are the documents that settle them.