Giter VIP home page Giter VIP logo

pyr0x1 / obs-text-slideshow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbwong05/obs-text-slideshow

0.0 0.0 0.0 411 KB

OBS plugin inspired by the built in image slideshow, except for text sources instead. Both Free Type 2 and GDI+ are supported.

Home Page: https://obsproject.com/forum/resources/obs-text-slideshow.1303/

License: GNU General Public License v2.0

CMake 7.60% Shell 8.12% Ruby 5.35% Batchfile 3.07% C++ 75.86%

obs-text-slideshow's Introduction

obs-text-slideshow

latest-tag Downloads CI Multiplatform Build Clang Format

Inspired by the built in image slideshow, except for text sources instead. Both Free Type 2 and GDI+ are supported. Useful for displaying song lyrics, captions, etc.

Usage

This plugin functions exactly as the built in image slideshow plugin, except instead of transitioning between image sources it transitions between text sources instead. Simply click the add source button and add the Text Slide Show source. Text sources can be added manually using the default Slide Texts box or read from file by selecting the read from file option and specifying the file path(s). The expected format of the text file(s) is described below. Transitioning between text sources manually can be done using OBS's media controls or using the built in dock.

Text file format

Single text file format

By default, if no custom delimiter is specified, the new line character is chosen as the delimiter as follows:

text for first
text source

text for second text source

text for third text
source

single line is supported

multiline is
supported

etc.

Custom delimiters can also be specified so other characters can be used as delimiters instead of the new line character.

Multiple text file format

For the multiple text file option, the text from each text file corresponds to the text for one text source in the slideshow.

Dock

To open the dock, Select View -> Docks -> OBS Text Slide Show. The dock will display the first Text Slide Show source for the current scene as well as all of its text sources below. Clicking on the text sources on the dock will cause the source to transition to this text source. The drop down at the top of the dock can be used to have the dock display another Text Slide Show on the current scene other than the first. Only Text Slide Show sources on the current scene can be viewed on the dock. When the current scene is changed, the dock and will update accordingly to include only the Text Slide Show sources on the new scene.

Installation

Installers can be found in the Releases section.

Note: The Windows and macOS installers are currently unsigned because I don't have money to purchase a certificate to sign the Windows installer or to purchase a subscription for the Apple Developer program in order to sign and notarize the macOS pkg installer. Unfortunately as a result these installers may be flagged by certain antivirus programs and may have to be temporarily disabled in order for the installer to be allowed to run.

Building from Source

Prerequisites

You'll need CMake and a minimal working development environment for OBS Studio installed on your computer. Only Qt and the standard obs dependencies(https://github.com/obsproject/obs-deps) are required. obs can be built with the -DDISABLE_PLUGINS=true flag which is sufficient. More specific details can be found here.

Windows

Building with cmake-gui

In cmake-gui, you'll have to set these CMake variables:

  • QTDIR (path) : location of the Qt environment suited for your compiler and architecture
  • LIBOBS_INCLUDE_DIR (path) : location of the libobs subfolder in the source code of OBS Studio
  • LIBOBS_LIB (filepath) : location of the obs.lib file
  • OBS_FRONTEND_LIB (filepath) : location of the obs-frontend-api.lib file
  • LibObs_DIR (filepath) : location of libobs folder within the obs build directory

Building from Command Line

git clone https://github.com/jbwong05/obs-text-slideshow.git
cd obs-text-slideshow
mkdir build && cd build
# Windows 64-bit
cmake -G"Visual Studio 16 2019" -A"x64" -DCMAKE_SYSTEM_VERSION="10.0.18363.657" -DQTDIR=<path to 64-bit Qt dir> -DLibObs_DIR=<path to libobs folder within obs build dir> -DLIBOBS_INCLUDE_DIR=<path to the libobs sub-folder in obs-studio's source code> -DLIBOBS_LIB=<path to obs.lib> -DOBS_FRONTEND_LIB=<path to obs-frontend-api.lib> ..
# or Windows 32-bit
cmake -G"Visual Studio 16 2019" -A"Win32" -DCMAKE_SYSTEM_VERSION="10.0.18363.657" -DQTDIR=<path to 32-bit Qt dir> -DLibObs_DIR=<path to libobs folder within obs build dir> -DLIBOBS_INCLUDE_DIR=<path to the libobs sub-folder in obs-studio's source code>  -DLIBOBS_LIB=<path to obs.lib> -DOBS_FRONTEND_LIB=<path to obs-frontend-api.lib> ..
# Open `obs-text-slideshow.sln` with Visual Studio and build
# Copy `obs-text-slideshow.dll` and `obs-text-slideshow.pdb` to the obs plugin directory
# Create a obs-text-slideshow folder in the obs data directory and copy the locale folder into the new obs-text-slideshow directory

Linux

git clone https://github.com/jbwong05/obs-text-slideshow.git
cd obs-text-slideshow
mkdir build && cd build
# If you are on Ubuntu, add the `-DBUILD_UBUNTU=true` flag to your cmake command
cmake ..
# If dependencies are not on your path, you can manually specify their paths with the following:
cmake -DQTDIR=<path to Qt dir> -DLIBOBS_INCLUDE_DIR=<path to the libobs sub-folder in obs-studio's source code> -DLIBOBS_LIB=<path to libobs.so> -DOBS_FRONTEND_LIB=<path to libobs-frontend-api.so> ..
make
sudo make install

OS X

git clone https://github.com/jbwong05/obs-text-slideshow.git
cd obs-text-slideshow
mkdir build && cd build
cmake -DLIBOBS_INCLUDE_DIR=<path to the libobs sub-folder in obs-studio's source code> -DLIBOBS_LIB=<path to libobs.0.dylib> -DOBS_FRONTEND_LIB=<path to libobs-frontend-api.dylib> -DQTDIR=<path to Qt dir> ..
make
# Copy libobs-text-slideshow.so to the obs-plugins folder
# Create a obs-text-slideshow folder in the obs data directory and copy the locale folder into the new obs-text-slideshow directory

Possible future work

  • Text input from files (UTF-8)
  • Individual text settings for each text source
  • GUI dock for easier transitioning between sources
    • Find work around for the need for a refresh sources button; because the obs-frontend-api doesn't have a source added or edited event libobs handles the different signals for sources and not the frontend api

obs-text-slideshow's People

Contributors

foexle11 avatar jbwong05 avatar pyr0x1 avatar

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.