Obs-studio: Webm videos with alpha channel crashes for mid-spec computers when displayed using a browser source

Created on 15 Dec 2019  路  16Comments  路  Source: obsproject/obs-studio

Since version 24 we encounter an issue where webm videos with alpha channel may crash when trying to be played in a browser source.
Lately version 24.0.5 was released and it did improve this behavior a little bit, it seems to crash less but it's still laggy and choppy.
When downgrading to 23.2.1 everything works fine again.

Expected Behavior

Video should be played smooth, like in version 23

Current Behavior

Video crashes/choppy and works fine only for very high specs (CPU, RAM)

Steps to Reproduce

Add this URL as a browser source (1920x1080) to OBS
https://dab.altnext.com/ax236uFO
You should see a video playing with text "This is a test", using OBS 23.2.1 it plays fine but using OBS 24.0 or higher video crashes/choppy.
My Discord ID is lubabaluba #7107 I am a member of OBS server as well.

Attached are two videos showing the same browser source, one is using version 24.0.2 (choppy one) and the other uses 23.2.1 (works great)

OBS 24.0.2 - https://cdn.altnext.com/static/ori-obs-test-do-not-delete/ezgif.com-video-to-mp4.mp4
OBS 23.2.1 - https://cdn.altnext.com/static/ori-obs-test-do-not-delete/ezgif.com-video-to-mp4+(1).mp4

Most helpful comment

Pull Request here: https://github.com/obsproject/obs-browser/pull/193
Should fix the issue.

All 16 comments

There doesn't appear to be any video at https://dab.altnext.com/ax236uFO

Works fine for me, video may take a minute or two to load at first but then will appear every 10 seconds

This doesn't seem to be an issue with OBS, the video has intense decode requirements in a regular Chrome browser too (https://i.imgur.com/ISUXjPA.png). The video is 1080p 60 FPS VP9 with alpha, which is not hardware accelerated. It plays back smoothly for me in both OBS and Chrome.

For reference, the actual video can be found at https://cdn.altnext.com/components/e85ed59e6454e9d1627d3b9ae0013f8e/4f957e75e8ebcd3446e89526408e2ee2eed6502299504959.webm

The video indeed uses intense decode requirements, some videos may have lower requirements but the one I sent has high ones.
Still, it works significantly better on OBS lower than version 24.0, high-spec computers run it fine.
For example, I use a MacBook Pro Mid-2015 (i7 4th gen, 16gb ram ddr3, Intel Iris Pro 1536) and it plays bad on OBS v24.0+ (great on OBS with lower version).
Although when I use Dell XPS 15 9570 (i7 8th gen, 32gb ram ddr4, NVIDIA GeForce GTX 1050) it works great on all OBS versions

I have the same issues with .webm files in OBS v24, videos just stopped playing (frezee after few frames).

I'm able to reproduce it also on Windows 10 and macOS Catalina environments by simple adding browser source with .webm file: e.g: http://dl5.webmfiles.org/big-buck-bunny_trailer.webm.

What is interesting, everything is working smoothly in version number 23.

it seems to be an issue with the cef update in obs-browser that went with v24. Saw an issue reported about webm files.
I confirmed the problem with a core i5 8265u while with my Threadripper 2950x, i have zero problem.
To help us troubleshoot, could you @OriErel @dkonopka test with the big buck bunny file loaded locally with the browser source ?
edit: happens to me also with local file

There could be a fix along the lines given here (last post): https://magpcss.org/ceforum/viewtopic.php?f=6&t=17200 ; f... It requires patching chromium ...

ok i got the issue fixed by using cef 3904. This is both good and bad news. Good since it's fixed. Bad because I can't foresee any upgrade to cef 3904 any soon because it doesn't support shared textures.

I've been looking into this, and I think the problem might be bigger than just WebM video with Alpha.

I added a browser-source that points chrome:\\gpu (after re-adding the white background) I see that all the graphic accelerations are off or set to CPU-ONLY, while if I go to the same site from chrome browser everything is on and as expected (TESTED on Mid-2015 Macbook-Pro and new laptop with i5-1035G1 using the UHD graphics).
When checking same thing on the previously referenced Dell XPS 15 with a GTX card the acceleration seems connected and working.

OBS Screenshot
Chrome Screenshot

Not sure what to take from it but as far as I see only Intel Graphic cause this issue.

@DmitryDodzin that's unrelated; we blacklisted intel iGPU for hardware acceleration because it often wouldn't render.

If it is intentional the iGPU won't accelerate the browser-source this might be the root cause of the problem and the solution is simply to hookup a GPU card that will provide the hardware acceleration for the browser-source.
Also it's not helpful that we want the video to be an asset in the stream and the quality + bit-rate need to be quite high so that's a huge tax on a cpu-only render if not equipped with cpu hardware decoding of vp9.

@DmitryDodzin just comment out this line : https://github.com/obsproject/obs-browser/blob/f94f909690b2acc57d71ed767bd527d86321dad3/obs-browser-plugin.cpp#L452
and recompile obs if you really need hw accel on browser source with intel iGPU

Upon further investigation, the webm issue seems to stem from the blacklisting of Intel iGPU from hardware acceleration.
If I re-enable hw accel for Intel, the link provided by @OriErel plays perfectly fine.
@OriErel can you confirm that you're using an intel iGPU ?
I'll discuss with other devs about adding maybe a setting re-enabling intel iGPUs. They were disabled because they create serious issues in dual GPUs setups on laptops.

I can confirm this situation, I am using an Intel GPU and if I compile a version of OBS without the blacklist it works fine.

Any updates on this guys?

Pull Request here: https://github.com/obsproject/obs-browser/pull/193
Should fix the issue.

Was this page helpful?
0 / 5 - 0 ratings