From: Michael Niedermayer via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Michael Niedermayer <michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/mdec: DC reading for STRv1 is like STRv2 Date: Sun, 14 Jan 2024 21:38:06 +0100 Message-ID: <20240114203806.GF6420@pb2> (raw) In-Reply-To: <PAVPR08MB979517A49DBA7E2AC6E5D94B9A6E2@PAVPR08MB9795.eurprd08.prod.outlook.com> [-- Attachment #1.1: Type: text/plain, Size: 2838 bytes --] 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://github.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 across 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. > > 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 present 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 reverse 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 mortals, 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 second (single speed) or 150 sectors per second (double speed). The video and audio are spaced out over these sectors so they can be delivered at the appropriate 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) > > 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 loading them in https://github.com/m35/jpsxdec<https://> which has great logging. > Not sure why these samples were corrupt in first instance, maybe it was intentional for testing? I can't tell. Thats very strange, anyone remembers where these samples are from originally ? thx [...] -- 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 [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 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".
next prev parent reply other threads:[~2024-01-14 20:38 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-02 2:49 aybe aybe 2024-01-05 20:53 ` Michael Niedermayer 2024-01-06 12:31 ` aybe aybe 2024-01-10 2:37 ` Michael Niedermayer 2024-01-13 2:32 ` aybe aybe 2024-01-10 2:46 ` Michael Niedermayer 2024-01-13 2:28 ` aybe aybe 2024-01-14 20:38 ` Michael Niedermayer via ffmpeg-devel [this message] 2024-01-15 16:14 ` aybe aybe 2024-01-15 23:42 ` Michael Niedermayer 2024-01-16 14:27 ` aybe aybe 2024-01-16 14:32 ` aybe aybe [not found] ` <emd5d779f2-9283-4be7-82e5-afaf16ca635e@a51bcb19.com> 2024-01-16 14:39 ` aybe aybe 2024-01-16 14:56 ` aybe aybe
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=20240114203806.GF6420@pb2 \ --to=ffmpeg-devel@ffmpeg.org \ --cc=michael@niedermayer.cc \ /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