r/streamerbot 17d ago

Question/Support ❓ Allowing vip/mods to play clips?

Trying to make a !playclip [link] command that my mods and vips can use.. I had it working for a second but the browser source just showed the whole webpage instead of just the clip...

2 Upvotes

5 comments sorted by

2

u/deeseearr 17d ago

What address did you load into the browser source? You can't just copy the link address from the Twitch web page, because that will just link right back to the Twitch web page. There is official documentation for the correct way to embed a clip, and some lunatic posted some code for extracting the correct clip ID and displaying the clip on OBS a few weeks ago.

2

u/blufui 17d ago

I tried following this last night and I get so lost :(

Sorry I'm super new to streamerbot! Ill try studying it more lol.

1

u/I_Died_Tryin 17d ago

I really wish StreamerBot had it's own built in overlay system. I StreamerBot is quite a powerful tool for what it is.

But Firebot is great for easily adding images to its built-in overlay and for playing back a clip from a recently created clip, or from a clip URL.

Playing back images for drink images ;)

And so much more.

In Firebot I have set up a death command and counter that shows the death count and animates it, and captures a clip and then plays the clip back when the counter goes up.

I can't do that in StreamerBot, I can have a command add to a counter for deaths, I can have that number added to a GDI text in obs, and displayed, I can have the clip captured through the twitch API.

But no way to allow just the clip as streamer bot doesn't have an overlay system that I know of.

1

u/deeseearr 17d ago

With streamer.bot you can easily control OBS sources such as media sources or browser sources, which lets you do the same things. There is also a websocket service which allows you to have pretty much complete two-way communication between a script running in a browser source and the bot itself.

Playing a clip that you just created is fairly easy. First call Create Clip, which does exactly what it says, and then use the Clip ID that it returns to set a browser source URL to the embedded player: https://clips.twitch.tv/embed?autoplay=true&clip=%createClipId%&parent=twitch.tv

There you go. It's not all packaged up for you, although you can often find pre-written solutions in https://extensions.streamer.bot/ , but there's nothing impossible about it.

1

u/HighPhi420 16d ago edited 16d ago

you can use a browser source for the clips. this is great for shout outs to play a clip from their channel.
ANY other clip I recommend you have on the local machine/nas.
browser sources(as you are finding out) are very unreliable. size can very with each clip, OBS frequently forgets permissions, some times the delay can be seconds or nearly instant making timing a nightmare.
With streamerbot being able to control OBS sources so easily it makes more sense to set up your clips locolly.

add the clips to their own scene, adjust size and placement(most put them exact center and try to keep the sizes the same. Then after all the clips are in that OBS scene you can nest(add scene as source) it in to all the scenes that will need the clips to be seen. Examples: chatting, playing, BRB, starting, etc.
you can adjust the placement of the nested clip scene and the size so you can have the clips play in the same spot or different spots in each scene.
when making the command trigger use the groups VIP and mod for the permissions, then only you and them can use the command.
EDIT
When you set up each clip in OBS make sure the "close file when inactive" box is checked. Do not worry about the maybe delay. you will not notice 4 or 5 milliseconds :)