SGDK Video Player (work in progress)

Talk about development tools here

Moderator: BigEvilCorporation

Post Reply
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

SGDK Video Player (work in progress)

Post by haroldoop »

Hello;

I am currently experimenting with creating a video player for the Sega Genesis using SGDK.

For now, I em just experimenting with what works and what doesn't; there are a few conversion scripts, but they aren't user friendly at this phase (version 0.0.1).

Example ROM for version 0.0.1: https://github.com/haroldo-ok/sgdk-vide ... .1.bin.zip
Github repo: https://github.com/haroldo-ok/sgdk-video-player
Youtube video showing the converter and the player in action: https://www.youtube.com/watch?v=fYztzvf81-0
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Version 0.0.2 tries to use raster ints to stretch the background vertically; it's still very glitchy.

Example ROM for v0.0.2: https://github.com/haroldo-ok/sgdk-vide ... .2.bin.zip

--- edit ---

I guess the vertical stretching idea isn't going anywhere; Instead, I will try to adapt the tech developed for RgbQuant-SMS into a command line tool that will perform tileset reduction for each individual frame and, if that idea works out, I may adapt it to reduce tile count between similar frames.


https://haroldo-ok.github.io/RgbQuant-S ... index.html
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Version 0.0.3 uses RgbQuant-SMS to reduce the tile count of each individual frame.

Demo ROM for 0.0.3: https://github.com/haroldo-ok/sgdk-vide ... .3.bin.zip
Youtube: https://www.youtube.com/watch?v=jnc3Tlc4bOc
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Version 0.0.5 adds support for 320x224 resolution while not increasing the final compressed size very much.

Demo ROM for 0.0.5: https://github.com/haroldo-ok/sgdk-vide ... .5.bin.zip
Video on youtube: https://www.youtube.com/watch?v=gOZ-zpa7Tj8
Chilly Willy
Very interested
Posts: 2989
Joined: Fri Aug 17, 2007 9:33 pm

Re: SGDK Video Player (work in progress)

Post by Chilly Willy »

Pretty cool. Not bad for an old 68000 and 16 color tile graphics. :D
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Chilly Willy wrote: Mon Aug 14, 2023 11:19 pm Pretty cool. Not bad for an old 68000 and 16 color tile graphics. :D
Thanks! :)
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

SGDK Video Player Test v0.0.6 - Now with sound

Post by haroldoop »

Version v0.0.6 adds sound support, through SGDK's ADPCM driver.

ROM for version 0.0.6: https://github.com/haroldo-ok/sgdk-vide ... .6.bin.zip
Youtube video: https://www.youtube.com/watch?v=nsEKKbMpXrw
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Version 0.0.8 uses a newer version of "rgbquant-sms", that allows for faster encoding and much less RAM usage.

I made a few experiments with multi-frame merging, but it's still too slow and glitchy to be useful; branch with multi-frame merging experiment: https://github.com/haroldo-ok/sgdk-vide ... oup-frames

I think I'll leave the encoding as it is, for now, and start to turn the experiment into an actual tool.
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Created the CLI

Post by haroldoop »

Hello, again!

Version 0.1.0 refactors the disparate conversion scripts into a single coherent CLI.

To install:

Code: Select all

npm install -g sgdk-video-player
How to use:

Code: Select all

sgdk-video-player convert <src> <resDir>

Converts a video file and outputs the result in the resource directory

Positionals:
  src     The source video, the one that will be converted   [string] [required]
  resDir  The resource directory, where the generated sources will be placed.
                                                             [string] [required]

Options:
  --version                Show version number                         [boolean]
  --imagemagick-dir, --kd  Directory where ImageMagick is located       [string]
  --help                   Show help                                   [boolean]
  --cpu-cores              Number of CPU cores to use. If ommited, will use all
                           of them.
  --alias                  Alias to use when generating the C constants. If
                           ommited, it will be generated from <src>.    [string]
Now, all that remains for this being actually usable is to refactor the "main.c" file into a reusable library.
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: SGDK Video Player (work in progress)

Post by haroldoop »

Version 0.2.0 refactors the video player into a SGDK-compatible C library.
haroldoop
Very interested
Posts: 160
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Version 0.3.0 is now available!!!

Post by haroldoop »

Version 0.3.0 adds a flag to skip conversion if the files are unchanged.
Post Reply