URL/API Source: Live Data, Media and AI on OBS Made Simple

URL/API Source: Live Data, Media and AI on OBS Made Simple v0.3.0

royshilkrot

Member
First off: Neat plugin! Definitely something that I wanted for a while but would've needed to use a custom browser source with some JS in before haha

Now, I'm kinda curious.
My idea is to use this to fetch a StreamElements API endpoint to check the song request player status. That part should be easy.

However, I wonder if there's a way to show a text if the API output has specific data?
Say the endpoint returns
Code:
{ "state": "paused" }
In this case I wouldn't want it to show any text at all.

However, if it were to return
Code:
{ "state": "playing" }
I want it to show `Playing Requested Song` or something similar

On first glance it doesn't seem like that'd be possible but I thought I'd ask anyway
You can certainly achieve that fairly simply using the automatic scene switcher plugin https://obsproject.com/forum/resources/advanced-scene-switcher.395/
Just check for the value of the output (you'd need a separate hidden text source though)
 

PNO

New Member
Hi @royshilkrot,

Can I get a little more information on the output RegEx Formatter? I'm attempting to format/insert comma's in a string of numbers but alas, not getting the desired results. Thanks for the great plugin!
 

royshilkrot

Member
Hi @royshilkrot,

Can I get a little more information on the output RegEx Formatter? I'm attempting to format/insert comma's in a string of numbers but alas, not getting the desired results. Thanks for the great plugin!
the output formatter is mostly for lifting out values from a text response e.g. see the following where i extract the value in parenthesis from the incoming text

1696683566931.png
 
  • Like
Reactions: PNO

royshilkrot

Member
royshilkrot updated URL/API Source - Fetch live data and display it on screen! with a new update entry:

v0.2.0 - New powerful templating engine!

In this release we're introducing a powerful new templating engine: Inja, as well as internal build improvements. Also allowing for better URL input templating (also with Inja).

If this plugin has provided value to you consider adding a ⭐ on this repo, subscribing to my YouTube channel where I post updates, and supporting my work: https://github.com/sponsors/royshil

Note: (breaking change)
The Inja templating engine bring so...

Read the rest of this update entry...
 

royshilkrot

Member
royshilkrot updated URL/API Source: Live Data Display Made Simple with a new update entry:

v0.2.1

In this release: Added user-friendly template tooltips, JSON input formatting, HTML parsing with CSS Selectors, and set SSL verification to default 'off', improving functionality and user experience.

If this plugin has provided value to you consider adding a ⭐ on this repo, subscribing to my YouTube channel where I post updates, and supporting my work: https://github.com/sponsors/royshil

What's Changed​

  • ...

Read the rest of this update entry...
 

royshilkrot

Member
royshilkrot updated URL/API Source: Live Data Display Made Simple with a new update entry:

v0.2.2 - "Aggregate to Empty" and binary data handlers

In this release I'm adding the "Aggregate to Empty" feature and the binary data handlers for Image and Audio.

Aggregate to Empty will aggregate input from a text source until its empty and then sends the request. This is useful when working with captions as input, gathering input until there's a break.

The binary data handlers allow you to query APIs that return an image or audio as binary data on the response (e.g. with content-type: image/X or audio/X), and then either display the image...

Read the rest of this update entry...
 

DJ__Iceman

New Member
Love this plugin but getting an outdated issue because the new release assets 0.2.1' dont reflect the new release which is 0.2.2, so not sure if the asset's in the repository hit a snag while uploading or not but wanted to make a mention. I even waited a cpl days to see whether or not you we're still in progress uploading them but not the case..... https://gyazo.com/c6fc84daad5bbef5b6fcf45adc36b06f
 

royshilkrot

Member
Love this plugin but getting an outdated issue because the new release assets 0.2.1' dont reflect the new release which is 0.2.2, so not sure if the asset's in the repository hit a snag while uploading or not but wanted to make a mention. I even waited a cpl days to see whether or not you we're still in progress uploading them but not the case..... https://gyazo.com/c6fc84daad5bbef5b6fcf45adc36b06f
sorry yes there's a mixup but i'm releasing 0.2.3 instead of fixing 0.2.2- since i added a very cool new feature ...
https://youtu.be/LWN6TJIi-Mo - and tutorial: https://youtu.be/2wJ72DcgBew
 

royshilkrot

Member
royshilkrot updated URL/API Source: Live Data Display Made Simple with a new update entry:

v0.2.3 - New Image Input feature, fixing various problems

In this release we introduce a new feature: Image input (grab the image of any OBS source to use for API input), as well as fixing some build issues and warnings.

This new feature enables some very cool functionality like Live Narration

If you'd like to support my work consider Patreon or GitHub Sponsors , a ⭐ on the repo would be greatly appreciated and a rating on the...

Read the rest of this update entry...
 

royshilkrot

Member
royshilkrot updated URL/API Source: Live Data Display Made Simple with a new update entry:

v0.2.4 - Aggregation options, dynamic image input resize

This release adds some exciting new features: Dynamic input image resizing and additional aggregation options.
You can now resize the dynamic image from an OBS source before sending it on the request, e.g. to save on bandwidth.
Additionally, aggregation can now be done "to Empty" or over a few timer options like 30s, 1m, 2m etc.
This will enable applications that need periodic sending of information from OBS for processing.

If you'd like to support my work consider...

Read the rest of this update entry...
 

jasondeanny

New Member
Trying to use the JSON REGEX to replace data in the following manner. Couldn't quite get it to basically use a lookup table to replace based on the possibilities:

JSON Data (period)Replace With
11st
22nd
33rd
4OT
5OT2
JSON Data (inIntermission)Replace With
trueInt.
falsePer.

If I put a single entry in the Postprocess Regex, check the box and place the Replace With data, it works for that single entry.

Source URL is https://api-web.nhle.com/v1/score/2023-11-29 and the data is in object.games.2.clock.inIntermission and object.games.2.period. You can change the date in the URL to see live data from the current date.

Any ideas how I can get multiple replacement options?
 

royshilkrot

Member
royshilkrot updated URL/API Source: Live Data and AI on OBS Made Simple with a new update entry:

v0.2.5 - Bugfixes

In this release:
  • Fixing temp filename to enable multiple sources
  • mpeg -> mp3 to allow mp3 playback
  • Prevent fail on HTTP error - to allow seeing error msgs on 4xx responses
  • Truncate responses over 1000 characters - prevent crash of response preview modal
  • Output template fix
  • Aggregate buffer spacing
  • Fix v30 Media Sources audio playback (restart media)
Download
  • ...

Read the rest of this update entry...
 

Studiobug

New Member
Greetings,
Thank you for making such a great plugin. I recently tried to put in css commands for text right justification and the system just is not behaving. I find my text going in areas I can not reach and I tried adjusting the width but it just was frustrating. Do you have any suggestions for me?
 

royshilkrot

Member
Greetings,
Thank you for making such a great plugin. I recently tried to put in css commands for text right justification and the system just is not behaving. I find my text going in areas I can not reach and I tried adjusting the width but it just was frustrating. Do you have any suggestions for me?
Hi @Studiobug
Sorry it's not working intuitively. I will look into the CSS justification and fix it in an upcoming version. But in the meantime you can send the text to any Text Source and use more powerful styling there.
Thank you for reporting the issue
 

JamesBart

New Member
@royshilkrot I just updated to OBS 30.0.2 and now none of the data is pulling through.

The test request still shows the data, but it is no longer pulling it beyond that point. Any ideas of what I can do to fix this?
 

DJ__Iceman

New Member
<i>BTC</i>: <b>${"timestamp":"2024-01-05T15:16:05.405Z","error":true,"status":404,"message":"Not found"}</b>

This was in full working order until this morning Roy
 
Top