First, you're going to need the following tools:
- FFmpeg which you can find it here: http://www.ffmpeg.org/
- MC32 located in psxgraph\bin if you're using the Programmers Tool devkit or the bin folder if you're using PsyQ.
Once we have the tools ready, we should begin converting the video file into a format that MC32 only supports which is just an uncompressed AVI file.
To do that, we're going to execute FFmpeg like this:
Code: Select all
ffmpeg -i <infile> -vcodec rawvideo -s 320x240 -r 30 -an <outfile>
The maximum video resolution the PlayStation can handle is 320x256 (higher resolutions yet to be tested) and the maximum frame rate is 30FPS. However, FMVs in most games run at 15FPS in favor of video quality because the PlayStation's drive speed is not enough to maintain high quality video at 30FPS so if you want high quality FMVs, go for 15FPS. If you want smooth FMVs, go for 30FPS.
Now that we have an uncompressed video-only file ready to be converted, we're also going to need the video file's audio data to go with it. So, we'll execute ffmpeg again but like this:
Code: Select all
ffmpeg -i <infile> -acodec pcm_s16le -vn <outfile>
Now comes the most interesting part, open MC32 inside your bin folder. On the conversion window, browse for the uncompressed video-only file in the left text box. A preview window should appear after selecting the file:
Inside the preview window, clicking on the Encode button will show a preview of what the encoded frame will look like. The Play button obviously plays the video at 15FPS by default and the horizontal slider controls what part of the video is to be played.
On the right side of the conversion window, click on the blank drop-down list and make sure it is selected to str (MDEC). Once set, click on the Attributes button to bring up this window:
Using the Custom options is the best one since you get to control the frame size (a.k.a. bitrate) in sectors or bytes. For 30FPS videos, set it to 4 sectors or 8 for 15FPS videos. The Variable Frame Size option is pretty useless as the file size reduction when using it is very little and may cause some frame skipping issues during playback. As for the Sound options and the MDEC Image Version, I haven't meddled with those yet so better not touch it.
Finally, click Go and wait for the conversion process to finish. Once done, you now have a video-only str file.
Now for the sound, select the wav file as the input in the same conversion window. Some small window should pop-up displaying the sample rate and the number of channels the wav file you've selected has. After that, click Go and wait for the conversion to finish. Once done, you now have an xa file ready to be interleaved into the video-only str file.
All we have to do now is to interleave the str and xa files together. To do that, click on the View menu and click on the Video + Sound option which should bring up this window:
On the Vide File Name (typos in professional tools? ) box, browse for the video-only str file and select str (MDEC) in the drop-down box just below it. On the Sound File box, browse for the xa file to go with the video and don't forget to set the proper type and frequency of when the wav file was converted.
On the output file name box, browse for where the output will be stored and named as. Once set, make sure the Frame Rate is set to a proper value and then click Go. Once the interleaving process is finished, you now have a str file with sound ready to be played on the PlayStation.
Select the str file you've encoded in the Video File Name box and select 'str (MDEC)' on the Format drop-down box. Select the xa audio file in the Sound File Name text box and make sure the Frequency and Type match those of the attributes window when you encoded the xa file. And finally, enter the output file name of your video file in the Output Str text box then click Go.
Now, how do we play the str file on the PlayStation? Here's a link to my little STR player library with sample code and script for BuildCD:
http://www.psxdev.net/forum/viewtopic.p ... 3645#p3645
Take note that str files are only playable if it is embedded into the iso as XASource which can only be done using BuildCD.