Question / Help Problem with Videos Loading in Browser Source Plugin

You can see my stream start screen rendered using OBS standard here:


I use an HTML file to do this in the browser plugin, accessing video files using the file:/// prefix in the HTML... (continued next post).
 
Last edited:
When I try to do it in OBS Studio it doesn't work:(background video removed but the videos in the rotating panes should still be there).


If you fast forward the videos you will see that the rotating videos do eventually load, but it's almost like the videos are being preloaded/cached. However, when I check my disk activity, it seems virtually non-existent.

The HTML definition of the videos goes something like this:

<video nocontrols loop preload=none muted class="item neonbox" id="vid4">
<source src="http://absolute/g:\StreamData\Videos\Intro\HORROR.mp4" type="video/mp4">
</video>

Replacing the file:/// in the original HTML with html://absolute. This is the only change to the HTML file that I make.

Any suggestions how I can stop this so it works properly?
 
Last edited:
And what does it do in a regular browser?
Chrome gives the error message "Failed to load resource: net::ERR_NAME_NOT_RESOLVED" for each of the videos, since it doesn't recognise http://absolute/.

vfHGJ8.jpg
 
I removed the http://absolute and place all the videos in a folders within the folder containing the HTML file and reference them thus:

<video nocontrols loop preload=none muted class="item neonbox" id="vid8">
<source src=".\vid\Buildersim.mp4" type="video/mp4">
</video>

This works in chrome and the videos appear instantly. Not so in OBS studio though the videos do seem to load faster with half loading before the first revolution is complete.

EDIT: Also works with chrome in incognito mode.
/* EDIT2: However it does not seem to work at all in OBS classic. */ but see below...
 
Last edited:
OK so here's a thing. The original just stopped working in obs when I reloaded it. Weirdly a very similar piece of HTML worked in another scene ... however, having spend several hours poring over the HTML files ... discovered it was nothing to do with them. When I selected the HTML file using the file selection dialog it shows with an http://absolute tag and doesn't work, the rotating videos don't work:
7z1Xcq.jpg

If I delete the http://absolute (which I must have done before and forgotten about it) the HTML works and the videos load.
ODfxy9.jpg

OBS Studio never shows an http://absolute but perhaps it has an implied one?
 
Got it working. Somewhat crazily: uncheck the "local file" checkbox in OBS Studio browser properties, then use "file:///" to refer to the HTML file URL.
chHn9Y.jpg


This is the original HTML file without all the 'http://absolute's
 

Osiris

Active Member
When you enable Local file it will prefix the location with http://absolute/. This is a custom scheme defined in the browser source, this also means some extra processing, which is no problem for small files, but i'm guessing processing the mp4 files gives a delay in loading them.

When using file:// you are telling CEF to load that URL directly from filesystem.
 
Last edited:

Electrocudead

New Member
I'm not trying to necro this, but honestly thank you. A simple looping logo used as a media source was using massive amounts of resources and I found this thread trying to find a solution. Using this method, it barely even registers in obs. Huge help!
 
Top