
I created a custom Sega CD FMV codec: 320×224 fullscreen video at 30 FPS with 22.05 kHz audio!
Hey r/SEGAGENESIS ,
Greetings from Japan! I'm a Mega Drive / Mega-CD fan and developer, and I wanted to share a project I've been working on.
We all know the classic Sega CD FMV experience: tiny windows, low frame rates, and heavily compressed audio. I wanted to push the original hardware to its absolute limits, so I developed a new open-source FMV codec from scratch called CAVC, short for Constraint-Aware Video Codec.
Through extensive optimization for the two 68000 CPUs across the Genesis/Mega Drive and Sega CD, the split RAM architecture, available DMA bandwidth, and the strict 150 KiB/s bandwidth limit of the 1x CD-ROM drive, CAVC achieves the following:
Key Specs & Features
- Frame rate: 30 FPS 15 FPS and 24 FPS are also supported
- Resolution: Up to 320×224 in H40 mode, filling the full active display area
- Audio: 22.05 kHz ADPCM
- Colors: Dynamic palette switching during playback
- Target hardware: Unmodified Sega CD / Mega-CD hardware
About the Main Comparison Video
Main comparison video:
https://www.youtube.com/watch?v=QXUS11yb9Yg
To show CAVC in action, I put together a split-screen comparison using the Sonic Jam opening. The video features:
- Emulated CAVC footage in Genesis Plus GX, shown in the largest panel
- Source footage taken from the TrueMotion AVI in the Sega Saturn version of Sonic Jam
- The original Sega CD version for comparison
- Real hardware footage captured from an actual Japanese Mega Drive 2 and Mega-CD 2
The Sonic Jam source video has a native resolution of 288×200.
Additional Footage
Sonic Jam Opening — 288×200 at 30 FPS
Visual Analysis & Encoding Breakdown
https://www.youtube.com/watch?v=GN8EW5ODGBA
Standalone Genesis Plus GX Footage
https://www.youtube.com/watch?v=4bQNKx4mYTI
Bad Apple!! — 320×224 Fullscreen at 30 FPS
Comparison: https://www.youtube.com/watch?v=ow9Ss7g0L5Y
Analysis: https://youtu.be/lz4gl5L_qsI
Emulator: https://youtu.be/y6JkrF0gSYQ
Lunar: The Silver Star Opening — 320×224 Fullscreen at 24 FPS
CAVC can also take advantage of the Genesis VDP's hardware scrolling. This is particularly effective for scenes with sustained horizontal camera movement, such as the opening of Lunar: The Silver Star. Instead of redrawing the entire screen frame by frame, the codec can scroll the existing image using the VDP hardware, reducing the amount of new visual data that needs to be transferred. The final fade-out is also handled through palette fading rather than by re-encoding the image for each brightness step.
Comparison: https://www.youtube.com/watch?v=MRm6jwss8Nw
Analysis: https://www.youtube.com/watch?v=b8sSnWg832A
Emulator: https://youtu.be/N27SY-0cupI
Tears of Steel — 320×168 Live Action at 24 FPS
Live-action footage is especially challenging, but I think the result is still reasonably watchable.
Comparison: https://www.youtube.com/watch?v=Lik7Ko2RL_0
Analysis: https://www.youtube.com/watch?v=Y9TwQp8BHXE
Emulator: https://www.youtube.com/watch?v=s9xMYX2UrDg
Downloadable ISO Images
I've also made downloadable Sega CD ISO images available for the Bad Apple!! and Tears of Steel demos, so you can try them yourself in an emulator or on compatible hardware.
https://github.com/akiyan/segacd-fmv-cavc/releases
GitHub Repository
For developers and anyone interested in the source code or technical details, you can check out the repository here:
https://github.com/akiyan/segacd-fmv-cavc
I'd love to hear your thoughts! Feel free to leave a comment if you have any questions or feedback.