Programming PSCapture: Convert any replay to a webm or gif!

Desired Features

  • Audio Support

    Votes: 0 0.0%
  • Better Compression

    Votes: 0 0.0%
  • Custom Log File Support

    Votes: 0 0.0%
  • Discord Bot implementation

    Votes: 0 0.0%
  • Website

    Votes: 0 0.0%

  • Total voters
    0
Github link: https://github.com/Zrp200/pscapture

Inspired by Intenzi/ShowdownReplayDownloader, but uses a different capture method, is more configurable, preprocesses the replays, and does not directly capture https://replay.pokemonshowdown.com.

This uses Showdown's replay-embed.js file to embed a chosen replay's protocol data into a headless browser ran by puppeteer and records it.
Multiple replays can be processed at once, though results may vary and optimization of this is pending.

This is currently in the proof of concept phase of this project; it's not suitable for deployment in any real form as is and lacks code structure, but it works locally in the command line, and I'm actively updating it as I get ideas.

Notable features:
  • start and stop at a specific turn, protocol, or timestamp
  • By default hides the chat and players, but can optionally show only teams or show everything. Nicknames are suppressed if chat is hidden.
  • Configurable sprite generation, replay speed, and overall gif speed.
  • Output in mp4 (as of 0.6.0), webm, or gif forma
  • You can hide the turn indicator if you want
  • Ability to process multiple inputs at the same time
  • Automatically opens the created gifs after generation.
  • Installs with all parts included. No need to already have ffmpeg.
Limitations
  • Command line application only at this time
  • Only supports uploaded replays on PS! with an accompanying .json file.
  • No sound support (at this time)
  • Variable output quality that can vary drastically by machine setup :S
  • GIF outputs can be rather large
  • Output location is not currently configurable, it's hardcoded to be in subfolders of the working directory.
  • Code organization is really not there; whole thing is in pure JS and tests have not been set up.
  • Some rare race conditions that I haven't figured out yet can crash the program in rare cases.
I don't have much experience working with Javascript or NodeJS generally, so ideas and suggestions on where to go from here are welcome.



Those from the National Dex and Ubers UU discord communities probably know what this is, since I've been using them as replay sources for a few weeks at this point.


Edit:
Mp4 output is supported as of 0.6.0
 
Last edited:

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top