Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] libavformat: Enable jpeg streams in HEIF MOVContext
Date: Thu, 17 Jul 2025 21:25:40 -0300
Message-ID: <c941a23d-5242-4ff3-babd-81b68eb61ad2@gmail.com> (raw)
In-Reply-To: <f4e2f060-f20a-446b-9414-3a749468a6d5@lynne.ee>


[-- Attachment #1.1.1: Type: text/plain, Size: 2392 bytes --]

On 7/17/2025 8:54 AM, Lynne wrote:
> Thanks. Patchset LGTM.
> This also helps HEIF files generated by the S1II, but sadly they still 
> fail:
> 
>  > [mjpeg @ 0x55a49a0e29c0] No JPEG data found in image
> 
> And for the main stream:
> 
>  > [hevc @ 0x55a49a0fe880] Failed to parse header of NALU (type 34): 
> "Invalid data found when processing input". Skipping NALU.
>  > [hevc @ 0x55a49a0fe880] Invalid NAL unit size (1229531648 > 102386).
>  > [hevc @ 0x55a49a0fe880] Error splitting the input into NAL units.
>  > [vist#0:0/hevc @ 0x55a49a0e5000] [dec:hevc @ 0x55a49a103a80] Decoding 
> error: Invalid data found when processing input
> 
> I wonder what they're doing with the thumbnail and NALUs. If you'd like 
> to take a look at it, here's a sample:
> https://files.lynne.ee/P1001083.HIF

This is a handling error in mov.c, because the order of entries in iloc 
and iinf in this sample are not in the same order, when the code 
incorrectly expects them to.
Curious how this is the first sample we see where that's not true.

> 
> On 17/07/2025 11:30, Eric Joyner wrote:
>> Nikon HEIFs from a camera or NX studio include a small jpeg thumbnail 
>> in addition to
>> the expected HEVC thumbnails; allowing jpegs allows all thumbnails to
>> have an associated stream for Nikon HEIF files.
>>
>> With this, Nikon HEIFs can finally be decoded without failing and the
>> thumbnails can be extracted into their own files.
>>
>> Signed-off-by: Eric Joyner <erj@erj.cc>
>> ---
>>   libavformat/mov.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/libavformat/mov.c b/libavformat/mov.c
>> index 7010e13b50..19b31b032d 100644
>> --- a/libavformat/mov.c
>> +++ b/libavformat/mov.c
>> @@ -8840,6 +8840,7 @@ static int mov_read_infe(MOVContext *c, 
>> AVIOContext *pb, MOVAtom atom, int idx)
>>       switch (item_type) {
>>       case MKTAG('a','v','0','1'):
>> +    case MKTAG('j','p','e','g'):
>>       case MKTAG('h','v','c','1'):
>>           ret = heif_add_stream(c, c->heif_item[idx]);
>>           if (ret < 0)
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2025-07-18  0:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17  2:30 [FFmpeg-devel] [PATCH 0/2] Fix Nikon HEIF decoding error Eric Joyner
2025-07-17  2:30 ` [FFmpeg-devel] [PATCH 1/2] libavformat: Support multiple thumbnails in HEIF Eric Joyner
2025-07-18  0:56   ` James Almer
2025-07-17  2:30 ` [FFmpeg-devel] [PATCH 2/2] libavformat: Enable jpeg streams in HEIF MOVContext Eric Joyner
2025-07-17 11:54   ` Lynne
2025-07-18  0:25     ` James Almer [this message]
2025-07-17 15:54 ` [FFmpeg-devel] [PATCH 0/2] Fix Nikon HEIF decoding error compn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c941a23d-5242-4ff3-babd-81b68eb61ad2@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git