#BitCast - Video Codec

1 messages · Page 1 of 1 (latest)

gritty current
#

I've been working on a system that allows real video playback inside Project Zomboid using Lua, and I think it's at a point to release publicly. These tools are more targeted for modders wishing to add varied video content to their mods/projects. This was built for build 41 and will be including a build 42 version soon.

The system has two parts:

Bitcast Converter — converts normal video files into a compressed Lua-friendly bitmap format
Bitcast Renderer — reconstructs and draws frames using drawRect() inside the game UI

This makes it possible to render/play videos inside any custom interface/ui panel.

How it works:
Bitcast converts frames into indexed palette colors, scanline dictionaries, RLE rows, and delta frames. The renderer reconstructs each frame using rect strips, which performs well inside PZ's engine. I have been able to render and watch full 30 minute episodes..

Pipeline:

Video File
     ↓
Bitcast Converter
     ↓
Lua Video Data
(meta + palette + scanline dictionary + frame references)
     ↓
Bitcast Renderer
     ↓
Scanline reconstruction
     ↓
drawRect rendering

Compression:

764MB source video → ~30MB Bitcast export (Note: Achieved with 16 Color Palette.)

What you can build with it:
In-game TVs, computer terminals, animated UI panels, storybooks, lore-driven cutscenes.. etc

Includes full documentation, a step-by-step tutorial, and an example to test. The example script forces a ui panel to render and play a video, given you have converted a video to the lua format. More information is in the TUTORIAL.md

Feedback and experimentation welcome. I hope someone in this amazing community finds this useful in their PZ adventures. 😉 🍻
Any issues or need any help using these tools, please dm me. 🛠️

https://github.com/itsonlylock/bitcast-renderer
https://github.com/itsonlylock/bitcast-converter

GitHub

Contribute to itsonlylock/bitcast-renderer development by creating an account on GitHub.

GitHub

Contribute to itsonlylock/bitcast-converter development by creating an account on GitHub.

ionic idol
#

DAMN

#

get this man a spiffo

#

good job!

gritty current
# ionic idol good job!

Thank you so much!! The debugging has been a hell of a ride but I am glad it is really coming into fruition. I have made other mods before, discord bots, full on video games and have some published on steam workshop, but I have yet to do one to this caliber and am really excited to see it all coming together. Be sure to stay tuned for some upcoming projects I have in the works using this exact system!!

exotic spire
#

Really cool concept dude, keep it up!