Issues encoding STR+XA with MC32 and FFMPEG
Posted: March 1st, 2022, 1:27 am
Hello.
I've recently begun a translation project for a PS1 game, which, if all goes well, involves some video extraction, editing and reinsertion. All of the necessary data (text and .TIM editing) is already processed, but I'd like to go the extra mile. There are a total of 3 videos I'd like to edit, each with varying degrees of work involved. I don't mind, and actually prefer editing each individual frame, but it's been a couple of sleepless nights over this without going anywhere in terms of successful encoding, or finding an alternative...
First, I use jpsxdec_v1-00_rev3921 to extract a video from the target .ISO (a .BIN file, actually). The original format is a Compressed AVI (MJPG), with 320x420 resolution running at 15 FPS (14.985).
I then use ffmpeg to extract all of the video's frames through the command line like so:
Once the individual frame edits are done, I then rebuild the .AVI using an image codec (which, if not used, does not produce a viable movie):
The movie runs without a problem, although it's necessary to adjust and tinker with the images until satisfactory. I convert the .AVI into a readable .STR format with MC32, using the options indicated here. The added -pix command is used to handle image to video conversion.
Since the video itself has sound, I can then either extract the audio from the extracted .AVI, or extract the audio directly from the ISO. But whether I use the original audio from the disc, or the audio from the extracted .AVI, MC32 produces the following message:
And whatever survives the conversion always displays the same problem: analyzing the original video through jpsxdec shows a disc speed of 14.985 (15000/1001) FPS, while the new .STR indicates a disc speed of 14.223 (15375/1081) FPS. This means the new .STR video playback will finish quite a while before the audio is done playing.
I'm at a loss here. I may be using the wrong options in ffmpeg, but I don't even know if that is the case. Any ideas on what I might be doing wrong? Thanks in advance.
I've recently begun a translation project for a PS1 game, which, if all goes well, involves some video extraction, editing and reinsertion. All of the necessary data (text and .TIM editing) is already processed, but I'd like to go the extra mile. There are a total of 3 videos I'd like to edit, each with varying degrees of work involved. I don't mind, and actually prefer editing each individual frame, but it's been a couple of sleepless nights over this without going anywhere in terms of successful encoding, or finding an alternative...
First, I use jpsxdec_v1-00_rev3921 to extract a video from the target .ISO (a .BIN file, actually). The original format is a Compressed AVI (MJPG), with 320x420 resolution running at 15 FPS (14.985).
I then use ffmpeg to extract all of the video's frames through the command line like so:
Code: Select all
ffmpeg -i 003.avi -r 15/1 %04d.bmp
Code: Select all
ffmpeg -i %04d.bmp -vcodec rawvideo -pix_fmt yuv420p -s 320x240 -r 15 TEST.AVI
Since the video itself has sound, I can then either extract the audio from the extracted .AVI, or extract the audio directly from the ISO. But whether I use the original audio from the disc, or the audio from the extracted .AVI, MC32 produces the following message:
If this only happened with a frame, I don't think it would be much of an issue. However, it does so for an enormous amount of frames, indicating that some should be less than 8 or 9 sectors. I have no idea if this is related to either the sound or the image quality; I would assume actual video frames, but if the frames MC32 is mentioning are actual video frames, it's referencing frames I haven't edited at all (a *lot* of them between #48 and #573). If I use .JPG instead (which is awful), the error persists.The size of frame 48 is too large. It must be less than 8 sectors.
And whatever survives the conversion always displays the same problem: analyzing the original video through jpsxdec shows a disc speed of 14.985 (15000/1001) FPS, while the new .STR indicates a disc speed of 14.223 (15375/1081) FPS. This means the new .STR video playback will finish quite a while before the audio is done playing.
I'm at a loss here. I may be using the wrong options in ffmpeg, but I don't even know if that is the case. Any ideas on what I might be doing wrong? Thanks in advance.