Make a CPK video disc

Thank you for your multi-function CPKplayer.

It would be better if you change the "\" in the build.bat file to "/".

View attachment 9600
I don't get that warning and using \ aligns with the Windows file system.

NoWarning.PNG
 
Your file is an old version. The new version of the file I use will report an error.
Then use the version I included. Secondly it's not an error, it's a warning. It appears from your output that it still worked and created an image.

Now while you shouldn't always ignore warnings, it appears at least in this case that it's not really an issue to worry about.
 
If anyone wants a better CPK Player that's not based on hacking a demo disc here is a more generic version of the demo I submitted for this years competition. Simply place your CPK files into the cd directory, then run build.bat and it will generate an ISO in the out directory.

This has the following caveats:
  • The max number of files you can have is 50. Which really that should be more than enough.
  • Videos can be any resolution as long as they don't exceed 320x240
  • Videos can be any frame rate as long as they don't exceed 30fps.
  • Audio can be 8-bit or 16-bit PCM in both stereo and mono at any sample rate as long as they don't exceed 44100Hz.
    • ADX Audio is currently not supported.
  • File names can be anything as long as they do not exceed 11 characters and have a .CPK extension.
    • The character length includes the extension
  • The player supports limited anamorphic scaling. To use this do the following:
    • Encode your video at 320x240 resolution (320x224 will kind of work as well) without any cropping.
    • If the desired aspect ratio is 16:9 put _169 in the file name.
    • If the desired aspect ratio is 2.35:1 put _235 in the file name.
    • You can also use _LB, but this is more of a special case I used for the Star Wars clip. The original video was 2.35:1 but I cropped it slightly on the sides to get it to 320x160, but then it needed a tad more vertical squishing to look right. If the others don't look right give this one a try.
    • Any other file will assume you want it displayed in the aspect ratio of it's resolution.
  • R will skip to the Next video, L will skip to the previous video. X restarts the current video, Z pauses the current video.
If there's any issues let me know. This should work for any standard Cinepak file as long as you don't exceed the bitrate of the disc drive.

i follow your recommendation however just show a black screen in Saturn, but i can play normally using Potplayer. Can you explain me where i am be wrong ? My cpk sample is attached. Sorry my english is very poor. Thanks !
 

Attachments

  • P001.rar
    67.5 MB · Views: 0
At the framerate your video is at the video is too long. The Stab table is bigger than what's allocated. Split it into multiple files.
 
But my frame rate is more less than 30 fps...23.976 for exacly. "Split it into multiple files." OK...thanks.
Your video is 24fps, and about 6:30 long. That's 9,360 frames in the video. All of those frames and the audio samples have to be accounted for in the STAB chunk. As a result your STAB chunk is taking up about 170KB of RAM and bleeding into other areas. If you read the official documentation it says you should consider splitting your videos up if you go beyond 5-7 minutes in length depending on the frame rate. When I did How the Grinch Stole Christmas I was at 15fps and never took a video beyond 7 minutes. My stab chunks at that frame rate had about half of what yours have.
It can be played normally using the player I provided
That's because your player has smaller buffers for video and audio which prevents it from going up to 320x240 resolution as well as pushing higher audio quality. As a result there's a little more memory to play with for the STAB chunk. Since my player has larger buffers to accommodate larger resolutions, higher audio quality, etc. the STAB chunk is bleeding into other variables and causing decompression to fail.

That all said, I went and did some clean up and rearranged some things to increase the Ring Buffer size to allow for larger STAB chunks.
 
Last edited:
Back
Top