← Back

ofxSurfingTextSubtitle

github.com/moebiussurfing/ofxSurfingTextSubtitle · @moebiussurfing
OF 0.12 Releases Video/Camera Typography

Draws subtitles from an .SRT (or plain text) into a formatted styled paragraph with fading opacity and more.

7 0 Last commit 7mo ago Created 4y ago

Branches ahead of develop

These branches have commits not yet on develop — could be unmerged fixes or work in progress worth a look.

master 14 commits ahead · last commit 7mo ago

README

OVERVIEW



Ready to use customizable .SRT text subtitle (and plain text) player for openFrameworks.

Screenshot

FEATURES



SCREENCASTS



VIDEO

<details> <summary>EXAMPLES / SCREENSHOTS</summary>

- example-Subs_ImGui

<!-- Screenshot -->

- example-Subs_ofxGui / ofxGui

Screenshot

- example-Subs_ofxGui2 / ofxGui (Video Player)

Screenshot

- example-SubtitleWhisper / Whisper (Real-time audio to text) [ ADVANCED / WIP ]

Screenshot Requires this FORK of ofxWhisper from @roymacdonald.

- example-SubtitleChatGPT / [ ADVANCED / WIP ]

Screenshot

VIDEO

</details>

USAGE



ofApp.h

``.cpp

include "ofxSurfingTextSubtitle.h"



ofxSurfingTextSubtitle subs;

ofApp.cpp

.cpp void ofApp::setup() { //subs.setup("Alphaville.srt"); // Optional } void ofApp::draw() { subs.draw();

subs.drawGui(); }
`

DEPENDENCIES

OPTIONAL

  • ofxGui / Optional (oF core)
  • ofxWhisper / FORK (Only for the example)
  • ofxChatGPT / FORK (Only for the example)

TODO

  • List and load different render fonts files on runtime.
  • macOS testing.

TESTED SYSTEM

Windows 10 / VS 2022 / OF ~0.11

THANKS

SRT parser: file
srtparser.h. Taken from https://github.com/Jonathhhan/ofEmscriptenExamples. Thanks to @Jonathhhan. Originally by @saurabhshri. ofxPlaybackGui from @roymacdonald bundled into /libs`. Optional to use only when using ofxGui as GUI. (Can be removed when using ofxSurfingImGui.) ofxWhisper from @roymacdonald. Powered by whisper.cpp from @ggerganov.

LICENSE

MIT LICENSE

Get this addon

HTTPS
SSH

Latest release

v0.3 published 3y ago
  • Added whisper example, using ofxWhisper.
  • Added MANUAL mode to print text manually without loading any SRT file.
  • Many improvements.
  • BUG: removes some words in some situations.