Opened 7 years ago

Last modified 6 weeks ago

#6521 open enhancement

HEIF support

Reported by: mateo Owned by: mateo
Priority: wish Component: avformat
Version: git-master Keywords: mov heif bounty
Cc: ismail@i10z.com, audvare@gmail.com, james@vidmob.com, silverbacknet@gmail.com, ccom@randomderp.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

With the upcoming iOS 11 release, Apple will use the HEIF format instead of the JPEG one as its default photo format.

I've started working on adding this support to lavf/mov. I open this ticket to track my progress (and will update it accordingly).

Attachments (5)

IMG_4453.HEIC (1.3 MB ) - added by Carl Eugen Hoyos 7 years ago.
IMG_4454.HEIC (1.2 MB ) - added by Carl Eugen Hoyos 7 years ago.
IMG_4478.HEIC (1.2 MB ) - added by Carl Eugen Hoyos 7 years ago.
IMG_4479.HEIC (1.0 MB ) - added by Carl Eugen Hoyos 7 years ago.
Growing_1024x1024.heic (876.6 KB ) - added by marcusj0015 5 years ago.
Lossless Sample 1024x1024 RGB 8 bit

Change History (28)

comment:1 by Avi Alkalay, 7 years ago

To help with this, here is a zip with some photos, videos and photo bursts I took myself with an iPhone 7+:

https://avi.alkalay.net/clipboard/HEIF-iOS-11.zip

Currently, this is what ffmpeg 3.3.3 on Fedora Linux knows about HEIF/HEIC:

$ ffprobe IMG_4449.HEIC
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x558604647da0] moov atom not found
IMG_4449.HEIC: Invalid data found when processing input

comment:2 by Carl Eugen Hoyos, 7 years ago

Keywords: isom removed
Priority: normalwish
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

This patch does not work for any of the files attached:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-August/215003.html

by Carl Eugen Hoyos, 7 years ago

Attachment: IMG_4453.HEIC added

by Carl Eugen Hoyos, 7 years ago

Attachment: IMG_4454.HEIC added

by Carl Eugen Hoyos, 7 years ago

Attachment: IMG_4478.HEIC added

by Carl Eugen Hoyos, 7 years ago

Attachment: IMG_4479.HEIC added

comment:3 by İsmail Dönmez, 7 years ago

Cc: ismail@i10z.com added

comment:4 by Kurosh Jadali, 7 years ago

Hello +1

Kodi is depending on this.

Thanks for the great work so far.

comment:5 by Andrew Udvare, 7 years ago

Cc: audvare@gmail.com added

comment:6 by james-vidmob, 7 years ago

+1 on this from VidMob

Last edited 7 years ago by james-vidmob (previous) (diff)

comment:7 by james-vidmob, 7 years ago

Cc: james@vidmob.com added

comment:8 by Joshua Bowman, 7 years ago

Cc: silverbacknet@gmail.com added

comment:9 by Kurosh Jadali, 7 years ago

Hi,

Is anyone working on this?

comment:10 by Justin Mo, 7 years ago

I write heif demux plugin for ffmpeg, it can work with vfilter

./ffmpeg -y -f heif -i ~/data/media/heif/IMG_4454.HEIC -vf "tile=8x6:48:0:0:blue, crop=4032:3024:0:0" heif2jpeg_2.jpg

./ffplay -f heif -i ~/data/media/heif/IMG_4454.HEIC -vf "tile=8x6, crop=4032:3024:0:0"

comment:11 by Kurosh Jadali, 6 years ago

Hello, is there any update / progress on HEIF support now that IOS 12 is out?

comment:12 by yosefarr, 6 years ago

Hi,
Any update on this?
Is anyone working on this?
Is it on your releases plans?

Thanks

comment:13 by Elon Musk, 6 years ago

No,
No,
No.

comment:14 by llogan, 6 years ago

To elaborate, we as an organization don't generally plan milestones. Things just happen when they do. I don't know if there are plans to work on this because I can't speak for others. The only set release plans are a loose schedule of release dates. Progress depends on contributions from interested individuals, and anyone is welcome and encouraged to do so.

The best way to get something included into FFmpeg is to participate in development. You can submit patches, fix bugs, review patches, etc. You can also post a bounty or offer to sponsor development.

comment:15 by Jason, 6 years ago

Keywords: bounty added

I put up a $300 bounty on this.

by marcusj0015, 5 years ago

Attachment: Growing_1024x1024.heic added

Lossless Sample 1024x1024 RGB 8 bit

comment:16 by S.A.N, 5 years ago

I stopped waiting for the support in ffmpeg to appear.
I use for the photo a separate excellent solution with HEIF supported.
https://github.com/libvips/libvips

comment:17 by Christopher Degawa, 5 years ago

Cc: ccom@randomderp.com added

comment:18 by Balling, 3 years ago

Please note that (my issue) https://github.com/strukturag/libheif/issues/533 is not longer producing lossless images. Just FYI.

comment:19 by Balling, 3 years ago

HEIC container for HEIF/AVIF is done here. https://trac.ffmpeg.org/ticket/7621#comment:10 maybe we can just move to jpeg-xl, patches are on the mailing list.

Last edited 3 years ago by Balling (previous) (diff)

comment:20 by Nik, 20 months ago

Even though the format is a mess, we still need (at least basic) support for it, as it is used extensively almost everywhere now.

comment:21 by hydra3333, 15 months ago

I wonder if this helps: libheif
https://github.com/strukturag/libheif

Would it be possible for ffmpeg to use it to deal with HEIF and AVIF ?

ffmpeg perhaps may be currently falling behind in this regard since newer phones produce it, which means there'd be an increasing volume of images etc using it.

With fingers crossed, submitting this for your consideration.

comment:22 by Balling, 12 months ago

This is now partially fixed in a0821345eb31b727d93c9c3ed7d74d2774c73afa

comment:23 by hydra3333, 6 weeks ago

Thankyou Balling.
I use the MABS build system to build a standalone x64 ffmpeg executable for use in Win11 ...
Which heif library does ffmpeg recognise and would need to be built and provided to ffmpeg at built time for ffmpeg to recognise and "use" it at runtime ? Is it https://github.com/strukturag/libheif ?
If so I guess it could be build by MABS (I am unsure if a heif lib is or isn't currently built as a part of the ffmpeg build process, and will look it up given your advice).

EDIT: Ah, sorry, please ignore this comment. Somewhat clarified over at https://github.com/m-ab-s/media-autobuild_suite/issues/2516#issuecomment-2477980138

Last edited 6 weeks ago by hydra3333 (previous) (diff)
Note: See TracTickets for help on using tickets.