GithubHelp home page GithubHelp logo

frestr / gbvideoplayer2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liji32/gbvideoplayer2

0.0 2.0 0.0 15 KB

A new version of GBVideoPlayer with higher resolution, 3-bit stereo PCM audio and video compression

License: MIT License

Makefile 4.96% C 48.81% Assembly 46.23%

gbvideoplayer2's Introduction

GBVideoPlayer2

A new version of GBVideoPlayer with higher resolution, 3-bit stereo PCM audio and video compression.

Version 2 increases the horizontal resolution by up to 4, replaces the chiptune music with ~9KHz, 3-bit PCM audio, introduces simple video compression with configurable quality settings, and uses a faster and easier to use encoding routines that can directly re-encode FFMPEG-compatible video to GBVP2 format.

Examples

You can grab compiled example ROMs from the releases page or watch a video

Requirements

For playing a GBVP2 video ROM on hardware, an MBC5-compatible flash cart is required. Remember that your cartridge's capacity must be big enough for your ROM โ€“ if your ROM is over 4MBs, you will need a cartridge that can store a 8MB ROM. (Note: the common EMS 64M flash carts can only store two 4MB (32 megabits) ROMs, not a single 8MB (64 megabits) ROM)

For playing a GBVP2 video ROM on an emulator, you must use an accurate Game Boy Color emulator, such as recent versions of SameBoy or BGB. GBVP2 will not work on inaccurate emulators, such as VisualBoyAdvance or GameBoy Online.

For encoding and building a video ROM, you will need a Make, a C compiler (Clang recommended), rgbds, and a recent version of FFMPEG.

Format Specifications

  • Irregular horizontal resolution, from effectively 120 pixels to 160 pixels wide, stretched to fill the 160 pixels wide Game Boy screen
  • Vertical resolution of 144 pixels, same as the Game Boy screen
  • Effectively up to 528 different colors per frame
  • Stereo PCM audio at 9198 Hz and 3-bits per channel
  • A frame rate of 29.86 frames per second
  • In-frame compression of successive similar rows of pixels, customizable compression quality
  • Can repeat a frame up to 255 times to avoid re-encoding highly similar frames

Building a ROM

You can encode and build a ROM simply by running make:

make SOURCE=/path/to/my_video.mp4

SOURCE may be any file compatible with your copy of FFMPEG. Your output will be at output/my_video/my_video.gbc.

Optionally, you may specify QUALITY to reduce the file size or, alternatively, improve video quality:

make SOURCE=/path/to/my_video.mp4 QUALITY=8

QUALITY can be any non-negative integer. The higher the value, the more aggressive the compression. A value of 0 performs no lossy compression after converting a frame to the player's format. The default value is 4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.