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 F22894CEAF for ; Tue, 2 Dec 2025 03:37:07 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'525QxigB/WTgF7TyYcRCTHRmQytdKyuDKzygk7FT/C8=', expected b'KIm+HrdcqXWckJO9vSy4jIWV/Uuxk7SPHK+pRqlnB2A=')) header.d=niedermayer.cc header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1764646607; h=date : to : message-id : references : mime-version : in-reply-to : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : from; bh=bg8gu1IQZQhILopK+SzCfsfPOd8CtPSqEn5aM1V1PIw=; b=TNIg8hQeiP7189dVC0cJukcs7AuiDiYFiMlfAXklV7SHX7VGIW4bsHwFplq7asHy5DPuG 369FZGgbzUyxmiKQF4qdJ46cVqX5J3npymhlGWP+/zVFiPwgV9BuoDMA4+UxDwQ2ZD3km4J iVwzOiGLGwmCo3EXSVayekwh3f/k4FhQGqoRhZtIsys87vPH9sqnjT/fAn8O5miNH7jiqti doG0f0QIoie94U/WcTMR5+xwpS5g0Y2CvmoXurzDABOawbH59RhABch7jj3zVh1aa+eMxN9 foO1tdSHhV0s0Cj16Tw3baSTr/LZ1l8GJicjjeGRsOaUJPzQShnAyl8U3fjg== Received: from [172.19.0.3] (unknown [172.19.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 0FDD869039F; Tue, 2 Dec 2025 05:36:47 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1764646589; b=qHSEQ5rC4UJwvUgCdQe1pCNzmy+UB5qVbXESJWRvSYH3T9aqB83VEurLFPptLUdm0oK3M mCxqjzLAULi5HvaHI1ChBd4rnifughlXPhe8Nyg/mTwAHQO2UHgZvhE4iFS+r+nn/Z7Ntls raIKBciZjVn+5eTR6mJK6/6wW2St2cilNUzBgf6jxFNvrhrzDA9rirB3KfbJTEzcaQZa/6o JFyfQXzuN6ebhjOVaG0PeAvxZghpJtnIicSjaBe/vM3lE7kfwW+ez8gCjSgOklDFHxyiY2K q3hz7HLmSwacwIAcZSzltDFvaWnMY5xkRAQTofJmpJ0kwdq5fTq74snAz3zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1764646589; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=525QxigB/WTgF7TyYcRCTHRmQytdKyuDKzygk7FT/C8=; b=CXoZuBLoH5XMEdTwfijdfTsSYZJjErxRqXxYgYj1/P/LCUjfWOuuo5S7s0dzvvUdASVfX oOmP2/UgDI6jx5IxAp0a56G8UzauMfg384pe8DoXUp9JIJNLKy36aOgvGaHmnFl11MM1z6E O1oV/cyvtaLCiK+wd7vMIhhIx8mKMPyCx7C+T9aZRsA9Z0AgXUMJV+Lyn0FsTW1Kz5JKoaq u1GSUQ0dwPOSdEyksReGZHU7KaavSlHfNZilmrj7oviUd66NhdNy050+EZaSvB/9QUXoC+G acB6hbF7eZ5MuoWYoASVcM5bmk99Af/vl2SckH96UfECIpWhEhW6qyJK7YwA== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=niedermayer.cc; arc=none (Message is not ARC signed); dmarc=none Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 9057068B978 for ; Tue, 2 Dec 2025 05:36:15 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id B4E6141B4B; Tue, 2 Dec 2025 03:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1764646575; 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=KIm+HrdcqXWckJO9vSy4jIWV/Uuxk7SPHK+pRqlnB2A=; b=WVLLMOsStHcOONDefONFCWatUgH2p/ndFDZLosEm6Dr8WIa8OSQ55EO7nBreXgsRDLJwA4 hqQeqAH0CbS9sDzLybg5INx+cokkJaH/JiO+sZrR9D+NkXdcet2qezfuOcVxWZ+n7wfKU6 MfJhGLXog0o4/B0ZdmG/3I+AZ4xxILhbWmNTr/YHj4lt8ZpD7K3Sh05L4WSjMBEFiBbqEf bZkbfusHhjG8e/exrwGuk3DrVztOmHyCONOGpL30rs3UKxSFsUJvMBUCR81VClX7vjH5kp InALOmVBjezzKuW5oZWUBI4lxUxAiiP2pxQ3RrIRglV05drAIpoPYkcbuh740Q== Date: Tue, 2 Dec 2025 04:36:14 +0100 To: ffmpeg-devel@ffmpeg.org, Gavin Li Message-ID: References: <20251128005559.1126A690194@ffbox0-bg.ffmpeg.org> MIME-Version: 1.0 In-Reply-To: <20251128005559.1126A690194@ffbox0-bg.ffmpeg.org> X-GND-State: clean X-GND-Score: 10 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvheelheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecufghrlhcuvffnffculddutddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeffledtfeevfeffheeuuefhtdejieelueeftdeitdfgheetgefffeefteekffdthfenucffohhmrghinhepfhhfmhhpvghgrdhorhhgnecukfhppeeguddrieeirdeiiedrhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirdehtddphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrghdprhgtphhtthhopehgfhhlfeduiedvsehgmhgrihhlrdgtohhm X-GND-Sasl: michael@niedermayer.cc Message-ID-Hash: ZGU4QL54W6XQIEIVE7D3ZOLDZ6ZNQB5N X-Message-ID-Hash: ZGU4QL54W6XQIEIVE7D3ZOLDZ6ZNQB5N X-MailFrom: SRS0=n641=6I=niedermayer.cc=michael@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [FFmpeg-cvslog] [ffmpeg] branch master updated. 3d96d83a0a avformat/rawdec: set framerate in codec parameters List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michael Niedermayer via ffmpeg-devel Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============4631154538914564777==" Archived-At: List-Archive: List-Post: --===============4631154538914564777== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qYTlYzTBM0RpI3bm" Content-Disposition: inline --qYTlYzTBM0RpI3bm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Gavin this patch breaks decoding a video with a single image: this works and creates our single image video =2E/ffmpeg -i lena.pnm /tmp/file.m2v this fails after the patch: =2E/ffmpeg -i /tmp/file.m2v /tmp/file.jpg -y [image2 @ 0x60dca024f140] Cannot write more than one file with the same nam= e. Are you missing the -update option or a sequence pattern? [vost#0:0/mjpeg @ 0x60dca024f3c0] Error submitting a packet to the muxer: I= nvalid argument Last message repeated 1 times [out#0/image2 @ 0x60dca024f040] Error muxing a packet [out#0/image2 @ 0x60dca024f040] Task finished with error code: -22 (Invalid= argument) [out#0/image2 @ 0x60dca024f040] Terminating thread with return code -22 (In= valid argument) [out#0/image2 @ 0x60dca024f040] video:375KiB audio:0KiB subtitle:0KiB other= streams:0KiB global headers:0KiB muxing overhead: unknown frame=3D 2 fps=3D0.0 q=3D5.0 Lsize=3DN/A time=3D00:00:00.04 bitrate=3DN/= A dup=3D1 drop=3D0 speed=3D0.455x elapsed=3D0:00:00.08 Conversion failed! This also breaks: =2E/ffmpeg -i https://trac.ffmpeg.org/raw-attachment/ticket/3923/frame16.h2= 64 test.jpg rawdec has a user parameter called framerate which is set to 25 by default. If your input is not 25, obviously then it should not be set to 25. Your change does not achive a fallback of 25 if it cannot be determined, as clearly shown in the example above where our single frame is turned into 2 frames, clearly showing there is a new inconsistancy. I suggest to revert this patch (to avoid creating more bugs by a rushed att= empt to fix this) and attempt to fix your file by setting the user framerate parame= ter correctly Independant of this, making it autodetect would be cool, yes, i agree but i think we need more time, testing and no regressions there where also suspicous changes in fate below: On Fri, Nov 28, 2025 at 02:55:58AM +0200, ffmpeg-git--- via ffmpeg-cvslog w= rote: [...] > avformat/rawdec: set framerate in codec parameters > =20 > Commit ba4b73c9779c32580f8a3ba08602a5d94e0bcd7c caused a regression in > the usage of avg_frame_rate to detect the frame rate of raw h264/hevc > bitstreams: after the commit, avg_frame_rate is always the value of t= he > -framerate option (which is set to 25 by default) instead of the actu= al > frame rate derived from the bitstream SPS/VPS NALUs. > =20 > This commit fixes the regression by setting the framerate codec > parameter to the value of the framerate option instead. After this > change, bitstreams without timing information will derive avg_frame_r= ate > from the -framerate option, while bitstreams with timing information > will derive avg_frame_rate from the bitstream itself. > > The h264-bsf-dts2pts test now returns the correct frame durations for= a > bitstream with a mix of single-field and double-field frames. > =20 > Signed-off-by: Gavin Li > Signed-off-by: James Almer >=20 > diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c > index d0c829dc42..5cf2764a0d 100644 > --- a/libavformat/rawdec.c > +++ b/libavformat/rawdec.c > @@ -83,9 +83,9 @@ int ff_raw_video_read_header(AVFormatContext *s) > =20 > st->codecpar->codec_type =3D AVMEDIA_TYPE_VIDEO; > st->codecpar->codec_id =3D ffifmt(s->iformat)->raw_codec_id; > + st->codecpar->framerate =3D s1->framerate; > sti->need_parsing =3D AVSTREAM_PARSE_FULL_RAW; > =20 > - st->avg_frame_rate =3D s1->framerate; > avpriv_set_pts_info(st, 64, 1, 1200000); > =20 > fail: > diff --git a/tests/ref/fate/cavs-demux b/tests/ref/fate/cavs-demux > index c4847293ab..eb16eb1f9d 100644 > --- a/tests/ref/fate/cavs-demux > +++ b/tests/ref/fate/cavs-demux > @@ -58,5 +58,5 @@ packet|codec_type=3Dvideo|stream_index=3D0|pts=3D224000= 0|pts_time=3D1.866667|dts=3D2240000 > packet|codec_type=3Dvideo|stream_index=3D0|pts=3D2280000|pts_time=3D1.90= 0000|dts=3D2280000|dts_time=3D1.900000|duration=3D40000|duration_time=3D0.0= 33333|size=3D67|pos=3D172185|flags=3D___|data_hash=3DCRC32:42484449 > packet|codec_type=3Dvideo|stream_index=3D0|pts=3D2320000|pts_time=3D1.93= 3333|dts=3D2320000|dts_time=3D1.933333|duration=3D40000|duration_time=3D0.0= 33333|size=3D83|pos=3D172252|flags=3D___|data_hash=3DCRC32:a941bdf0 > packet|codec_type=3Dvideo|stream_index=3D0|pts=3D2360000|pts_time=3D1.96= 6667|dts=3D2360000|dts_time=3D1.966667|duration=3D40000|duration_time=3D0.0= 33333|size=3D5417|pos=3D172335|flags=3D___|data_hash=3DCRC32:9d0d503b > -stream|index=3D0|codec_name=3Dcavs|profile=3Dunknown|codec_type=3Dvideo|= codec_tag_string=3D[0][0][0][0]|codec_tag=3D0x0000|width=3D1280|height=3D72= 0|coded_width=3D1280|coded_height=3D720|has_b_frames=3D0|sample_aspect_rati= o=3DN/A|display_aspect_ratio=3DN/A|pix_fmt=3Dyuv420p|level=3D-99|color_rang= e=3Dunknown|color_space=3Dunknown|color_transfer=3Dunknown|color_primaries= =3Dunknown|chroma_location=3Dunspecified|field_order=3Dunknown|refs=3D1|id= =3DN/A|r_frame_rate=3D30/1|avg_frame_rate=3D25/1|time_base=3D1/1200000|star= t_pts=3DN/A|start_time=3DN/A|duration_ts=3DN/A|duration=3DN/A|bit_rate=3DN/= A|max_bit_rate=3DN/A|bits_per_raw_sample=3DN/A|nb_frames=3DN/A|nb_read_fram= es=3DN/A|nb_read_packets=3D60|extradata_size=3D18|extradata_hash=3DCRC32:12= 55d52e|disposition:default=3D0|disposition:dub=3D0|disposition:original=3D0= |disposition:comment=3D0|disposition:lyrics=3D0|disposition:karaoke=3D0|dis= position:forced=3D0|disposition:hearing_impaired=3D0|disposition:visual_imp= aired=3D0|disposition:clean_effects=3D0|disposition:attached_pic=3D0|dispos= ition:timed_thumbnails=3D0|disposition:non_diegetic=3D > 0|disposition:captions=3D0|disposition:descriptions=3D0|disposition:meta= data=3D0|disposition:dependent=3D0|disposition:still_image=3D0|disposition:= multilayer=3D0 > +stream|index=3D0|codec_name=3Dcavs|profile=3Dunknown|codec_type=3Dvideo|= codec_tag_string=3D[0][0][0][0]|codec_tag=3D0x0000|width=3D1280|height=3D72= 0|coded_width=3D1280|coded_height=3D720|has_b_frames=3D0|sample_aspect_rati= o=3DN/A|display_aspect_ratio=3DN/A|pix_fmt=3Dyuv420p|level=3D-99|color_rang= e=3Dunknown|color_space=3Dunknown|color_transfer=3Dunknown|color_primaries= =3Dunknown|chroma_location=3Dunspecified|field_order=3Dunknown|refs=3D1|id= =3DN/A|r_frame_rate=3D30/1|avg_frame_rate=3D30/1|time_base=3D1/1200000|star= t_pts=3DN/A|start_time=3DN/A|duration_ts=3DN/A|duration=3DN/A|bit_rate=3DN/= A|max_bit_rate=3DN/A|bits_per_raw_sample=3DN/A|nb_frames=3DN/A|nb_read_fram= es=3DN/A|nb_read_packets=3D60|extradata_size=3D18|extradata_hash=3DCRC32:12= 55d52e|disposition:default=3D0|disposition:dub=3D0|disposition:original=3D0= |disposition:comment=3D0|disposition:lyrics=3D0|disposition:karaoke=3D0|dis= position:forced=3D0|disposition:hearing_impaired=3D0|disposition:visual_imp= aired=3D0|disposition:clean_effects=3D0|disposition:attached_pic=3D0|dispos= ition:timed_thumbnails=3D0|disposition:non_diegetic=3D > 0|disposition:captions=3D0|disposition:descriptions=3D0|disposition:meta= data=3D0|disposition:dependent=3D0|disposition:still_image=3D0|disposition:= multilayer=3D0 > format|filename=3Dbunny.mp4|nb_streams=3D1|nb_programs=3D0|nb_stream_gro= ups=3D0|format_name=3Dcavsvideo|start_time=3DN/A|duration=3DN/A|size=3D1777= 52|bit_rate=3DN/A|probe_score=3D51 > diff --git a/tests/ref/fate/enhanced-flv-hevc-hdr10 b/tests/ref/fate/enha= nced-flv-hevc-hdr10 > index 525f056d66..bebcf84fab 100644 > --- a/tests/ref/fate/enhanced-flv-hevc-hdr10 > +++ b/tests/ref/fate/enhanced-flv-hevc-hdr10 > @@ -4,7 +4,7 @@ > #codec_id 0: hevc > #dimensions 0: 1280x720 > #sar 0: 0/1 > -0, 0, 0, 40, 77718, 0xb59c83a5 > +0, 0, 0, 0, 77718, 0xb59c83a5 > [FRAME] The frame duration disappears here [...] > diff --git a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c b/tests/ref/f= ate/h264-conformance-cvpcmnl2_sva_c > index 0303bc24e6..0a0795df41 100644 > --- a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c > +++ b/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c > @@ -1,7 +1,7 @@ > -#tb 0: 1/25 > +#tb 0: 1/50 > #media_type 0: video > #codec_id 0: rawvideo > #dimensions 0: 1280x720 > #sar 0: 0/1 > -0, 0, 0, 1, 1382400, 0xccbe6bf8 > -0, 1, 1, 1, 1382400, 0x49c0cfd7 > +0, 0, 0, 2, 1382400, 0xccbe6bf8 > +0, 2, 2, 2, 1382400, 0x49c0cfd7 why is this (25fps) data becoming 1/50 ? [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The smallest minority on earth is the individual. Those who deny=20 individual rights cannot claim to be defenders of minorities. - Ayn Rand --qYTlYzTBM0RpI3bm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaS5eqQAKCRBhHseHBAsP qzqtAJ9kcOpfILxL/0AxpkV8D1o845dKjQCfQhDip5gBLw0gyr5y8Ks/prh4NZs= =oq89 -----END PGP SIGNATURE----- --qYTlYzTBM0RpI3bm-- --===============4631154538914564777== 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 To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org --===============4631154538914564777==--