From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id DA1994C628 for ; Tue, 30 Jul 2024 20:55:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1F5C268D7CD; Tue, 30 Jul 2024 23:55:01 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4CCE68D34E for ; Tue, 30 Jul 2024 23:54:54 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D7EA8FF805 for ; Tue, 30 Jul 2024 20:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722372894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wZxwurMB7SEJf3iy0t8pcNIi6AbjcTkJBIzrkNrgnDM=; b=X63GoH3M7cZLNhC2SSR2ctpUaOdKaH6GzwWRLKCe5wO3UvVwfEoIZ+GTuoOOiW/tLnKwCI iQxtWMbakUovxaEynWHWDBrlVA6sy4K7vq2KmUfGV/6z4asepfTH6duQjPE2Jb6o/tuqW0 D6k8itmb2CbyEmyZmCJoD3i8D+0/5A724DYrKwrQL2vdSU0rY86bLifS7+XufCBm90R0KL 2LDxCQKXq+Ej3U/B3KQwuG233P7IyisqUYNeKAwbyCcnNeiAuXCptiLX6yBy2Jy0l00oLU nCQZNxGL6k9JI4RZDAI1O2sQFvC4qkWN/4SquXF9G4OYbegLdphd0DO+Dmad4g== Date: Tue, 30 Jul 2024 22:54:52 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240730205452.GP4991@pb2> References: <20240730131149.210571-1-gmascellani@codeweavers.com> MIME-Version: 1.0 In-Reply-To: <20240730131149.210571-1-gmascellani@codeweavers.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 0/2] Interpret a degenerate SAR as 1/1. 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 Content-Type: multipart/mixed; boundary="===============1122559413773057380==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1122559413773057380== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YAj9hGQEeu6NAWot" Content-Disposition: inline --YAj9hGQEeu6NAWot Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2024 at 03:11:47PM +0200, Giovanni Mascellani wrote: > I came across some H.264 files in the wild whose SAR is set to > 20480/0. The files are provided by the Ubisoft game OddBallers, and > are seemingly accepted and played properly when the game is played on > Windows (thus using the Microsoft Media Foundations > implementation). >=20 > When running the game with Wine the files are ultimately decoded by > libavcodec (via GStreamer), and playback is broken. It seems that only > a frame each second or so (maybe the key frames? I didn't check) is > decoded and presented, the others are discarded. After dumping the > video, I ran it with ffplay and it has the same problem, and the > following message is emitted many times: >=20 > [h264 @ 0x7fd7301ef440] ignoring invalid SAR: 20480/1 >=20 > Interestingly the invalid SAR is dumped as 20480/1 (which would be > strange, but in princple legal), while the file has 20480/0 (which > doesn't make sense at all). Equally interestingly, the frames that are > presented are indeed presented with SAR 1/1, like they are on Windows. >=20 > The H.264 standard says that "When aspect_ratio_idc is equal to 0 or > sar_width is equal to 0 or sar_height is equal to 0, the sample aspect > ratio shall be considered unspecified by this Recommendation | > International Standard". Given the behavior on Windows it seems that > the de facto standard way to solve the missing specification is to > assume that SAR is 1/1, which is what my patches seek to do. Why does playback fail ? 1/1 and unspecified are different things, 0/0 would be unspecified where does 20480/0 turn into 20480/1 ? or did i misunderstand this? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA --YAj9hGQEeu6NAWot Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZqlTGQAKCRBhHseHBAsP q/KWAJ9BrQeMkn+yA3kb7lqO8whBOHCk2ACfa/u7x5A3+CSQ1BL+q0GYgkJVgwk= =o0XW -----END PGP SIGNATURE----- --YAj9hGQEeu6NAWot-- --===============1122559413773057380== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============1122559413773057380==--