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 941F347C7E for ; Sun, 14 Jan 2024 20:38:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BAAD768CE0E; Sun, 14 Jan 2024 22:38:14 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 701EC68CBC3 for ; Sun, 14 Jan 2024 22:38:08 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9AC231BF203 for ; Sun, 14 Jan 2024 20:38:07 +0000 (UTC) Date: Sun, 14 Jan 2024 21:38:06 +0100 To: FFmpeg development discussions and patches Message-ID: <20240114203806.GF6420@pb2> References: <20240110024602.GQ6420@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mdec: DC reading for STRv1 is like STRv2 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: , From: Michael Niedermayer via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Michael Niedermayer Content-Type: multipart/mixed; boundary="===============1042195371386441618==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1042195371386441618== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NYbqqUAdG99FHUx+" Content-Disposition: inline --NYbqqUAdG99FHUx+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi aybe On Sat, Jan 13, 2024 at 02:28:52AM +0000, aybe aybe wrote: > Here are the two STR files I have used when writing this patch: https://g= ithub.com/aybe/FFmpeg-PSX-STR-tests ok, i can confirm the version patch fixes these, i will apply it > Fanatics would probably say that 30 FPS for NTSC is wrong (i.e. should be= 29.97)... > However, as the reversed-engineered docs in jpsxdec mentions, it is sort = of impossible to figure out which value to snap to from how frames spans ac= ross CD-ROM sectors. > The sector count per video frame always seem to juggle between two values= , e.g. 6 sectors, then 7 sectors, rinse/repeat. i.e. it's never constant. >=20 > Also, as one can see in the various code samples online on writing a PSX = program that plays MDEC videos, it is the responsibility of the coder to pr= esent the frames on screen. > i.e. there is not definitive way on how to do so, and even if there was, = you can be sure some folks did not play by the rules back then. > The only way to figure out how a movie was intended to be played is to re= verse engineer a game to see what values they did cram in. > In short, the computed frame rate is 99% good, not 100%. But for mere mor= tals, they are unlikely to notice it at all. Well, with the subset of samples i have, i dont feel confident that i could write and test timestamping/fps. The docuemnt you linked says "Data is read from the disc one sector at a time at either 75 sectors per s= econd (single speed) or 150 sectors per second (double speed). The video an= d audio are spaced out over these sectors so they can be delivered at the a= ppropriate times." what i would suggest to try is: avpriv_set_pts_info(st, 64, 1, 150); (or 75 for single speed) and then set AVPacket->pts to the sector number you never set fps, leave it to libavformat to figure it out. can you try that ? (i assume you have many samples to easily check) >=20 > As for the movies in the samples repository, they are corrupt and FFmpeg = fails at them, obviously. > I figured these ones were by checking them in a hex-editor but also by lo= ading them in https://github.com/m35/jpsxdec which has great logg= ing. > Not sure why these samples were corrupt in first instance, maybe it was i= ntentional for testing? I can't tell. Thats very strange, anyone remembers where these samples are from originall= y ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Modern terrorism, a quick summary: Need oil, start war with country that has oil, kill hundread thousand in war. Let country fall into chaos, be surprised about raise of fundamantalists. Drop more bombs, kill more people, be surprised about them taking revenge and drop even more bombs and strip your own citizens of their rights and freedoms. to be continued --NYbqqUAdG99FHUx+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZaRGKgAKCRBhHseHBAsP q+vUAJ0bE6sLPz1UDKmnL7EN6boUIUZmRgCfQraRvUl3MOCnJBY/fhgoK/AlN28= =JRlp -----END PGP SIGNATURE----- --NYbqqUAdG99FHUx+-- --===============1042195371386441618== 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". --===============1042195371386441618==--