From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 3A0824B712 for ; Mon, 21 Jul 2025 21:02:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 9A6EA68CA06; Tue, 22 Jul 2025 00:02:08 +0300 (EEST) Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id E5E9C68C087 for ; Tue, 22 Jul 2025 00:02:00 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; t=1753131716; cv=none; d=zohomail.com; s=zohoarc; b=P4MH0Qi/mnPjTyOQ+CK7rHDZ34ntwUJ5q8JklMrGotsT7UjVLQOsDxQhIB1QQv6qn73tV9sGXJXtdBiVgpQFgehXrtEHnIYqZJNrMcUzvdxm9i8dbquwbJByTCY21s8rsLplE64Z325Qv8vXR1wzRWTL84rW9vv7v82Ksro90nA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753131716; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=Gbwib+qWEPD1Hmg3NdJcJy7/qdvSCnQWpjncMO+F9kw=; b=Rpg9ues3VfBMd/Nhyl28DRBOEU9dSHwuys/wraHnxg8Kczl+plS1pvZfeiF2J0Y+0vyNYT8BuIBYn1C5jgWJo2hzlKb7f4Pgd52PzrHbuTUX3wi/xFO41zzWHCaAmxmZa3PTmA3FDoK87F6zEXkdqkt0K3Ceisos6UFr3SCGJv0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=mcelroy.online; spf=pass smtp.mailfrom=david@mcelroy.online; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1753131716; s=zoho; d=mcelroy.online; i=david@mcelroy.online; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Gbwib+qWEPD1Hmg3NdJcJy7/qdvSCnQWpjncMO+F9kw=; b=c4Gk0qmKA+k7S1JEIT/3M74FFWlz/RdEd6p5DoxyDSPT8yAi33XTRw9Oeg9vJfEG E7CjNUNyprJR0dk3fVRz/K6Vpcm7Wn5B5hx6uDrDQEDwie74NTOIdEvOxgWIi527sGs LzrloDLgR2xNUbeIXslbVcgniKrAwbshpoBwdy90= Received: by mx.zohomail.com with SMTPS id 1753131713376987.3502600021052; Mon, 21 Jul 2025 14:01:53 -0700 (PDT) From: David McElroy To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Jul 2025 17:01:46 -0400 Message-Id: <20250721210147.14457-1-david@mcelroy.online> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-ZohoMailClient: External Subject: [FFmpeg-devel] [PATCH 0/1] avformat/movenc: fix HEVC fmp4 HLS init segment for Apple playback X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: David McElroy Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Hi FFmpeg developers, This patch fixes a bug that makes HEVC fmp4 HLS streams generated by FFmpeg unplayable on all Apple platforms (macOS/iOS Safari, QuickTime, etc.). The issue is a malformed init segment, as detailed in the commit message. A similar patch was proposed in November 2023 by Jay Zhang, but it was never merged. https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-November/317173.html **To Reproduce the Bug:** You can generate a problematic HLS init segment using a command like this on the current master branch: $ ffmpeg -i ../BigBuckBunny_short.mp4 -c:v libx265 -f hls -hls_segment_type fmp4 playlist.m3u8 **Sample Files:** To make review easier, I've uploaded two sample streams produced with that command from that file from latest master (commit 9c9b41b) with and without the patch applied: - Source file: https://david.mcelroy.online/ffmpegbug/examples/BigBuckBunny_short.mp4 - Broken stream (from master): https://david.mcelroy.online/ffmpegbug/examples/9c9b41b/playlist.m3u8 - Fixed stream (with this patch): https://david.mcelroy.online/ffmpegbug/examples/patched/playlist.m3u8 These links can be loaded directly in Safari to see the playback issue. - Broken init segment (from master): https://david.mcelroy.online/ffmpegbug/examples/9c9b41b/init.mp4 - Fixed init segment (with this patch): https://david.mcelroy.online/ffmpegbug/examples/patched/init.mp4 You may also note that when selected in Finder, the broken init segment fails to be recognized as HEVC video, while the fixed one is recognized correctly. I also ran `make fate` to ensure no regressions were introduced and all tests passed. The commit contains the full technical details of the fix. Thanks, David McElroy David McElroy (1): avformat/movenc: fix HEVC fmp4 HLS init segment for Apple playback libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.34.1 _______________________________________________ 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".