Question / Help You tube restream quality goes tiny

marcotosom

New Member
Hi all,
i post just an example of what we are facing. We are restreaming our content loaded via youtube (so no problem related to claims).
But when we load our own content to be re-streamed we are facing a very frustrating issue with the OBS browser source.
(the livestream used in the example is not our it's just used for testing locally and not restreamed live)
I post an image here below so you can see, the youtube quality inside the browser is just "tiny" not fhd. We test even with a custom player with plain js and setPlaybackQuality to "hd1080" doesn't work. This problem started after version 21in addition we cannot keep live more than 13 secs of youtube playback before facing again the "tiny" or the "large" resolution, we need the hd1080 not the large.
screen_OBS.png
 

TryHD

Member
what you do there is from a technical point of view total crap. What do you try to achieve with this? why you don't restream from the source so you avoid all the quality degregation of youtube compression and browser capture.
 

marcotosom

New Member
@TryHD :
First point first, you know nothing about our needs, or about what we can or cannot do with the hardware behind.
We are just showing a problem with the OBS broswer source that is unable to play a youtube page with a correct playback quality.
The only "total crap" here is your pointless and arrogant answer showing not only that you cannot see the problem, but that you cannot even understand how youtubeplayback quality works.
So, if you have to say useless nonsense, please avoid answering.

But just to answer:
1 we cannot use the original source due to various technical problems that cannot be explained here.
2 the problem is not related to stream compression or quality degradation due to the youtube player in the browser source, the main problem is that the playbackQuality youtube sets is "tiny" to mostly every youtube video or livestream in the browser source OBS plugin since version 22.
 

koala

Active Member
@TryHD is right. He just didn't explain anything. If you record a browser session with a video playing inside, you are grabbing the pixels that are shown in the browser session. You are not grabbing the original pixels of the video. For example, if you have a browser window with resolution 1280x720 and a player with the a size of 900x500 within it, and you cut this video with the crop filter, you're grabbing a video of 900x500. If you scale this video up to your canvas size, it's still from the 900x500, just scaled up. It's not the native resolution of the video.

The resolution the Youtube player chooses to play is taken from the size of the browser session. For example, it makes no sense to send the full HD version of the video, if the player size is just 300x400. It chooses an appropriately downscaled resolution for that. To get the native resolution of the video, you have to make the player the size of the native resolution of the video. Usually, this means fullscreen, and the browser source size has to be this native resolution.

Much better is to not use the browser source to play media, but one of the media source types instead. The vlc media source is able to play youtube videos as well, The vlc media source does directly download the native video and feeding it to OBS directly, instead of first rendering it to a browser source frame buffer and grabbing it again like with the browser source.
 

marcotosom

New Member
@koala sorry but TryHD is not right at all as much as youre wrong too as you both did't understand where the problem is.

What you are refering above is just common knowledge we perfectly know and understand; we are not talking about upscale-downscale within the browser player and the OBS re-stream.

Let me explain even the obvious, as it seems you are unable to get it:
the screenshot i attached on the top shows the behaviour of a normal browser (on the right) compared to the behaviour of the OBS browser source(on the left) for the same page.
In the browser we see a full-hd resolution in the player, in the OBS browser we just get a playbackQuality "tiny".

PLEASE: search on google and get all the info about youtube playbackQuality before continuing this discussion please.

Then again, we CANNOT handle things as you "suggest", as we have different needs, but that is not what we are here for, if we could have used a different solution we wouldn't be here posting this issue with OBS browser source.

Please stay on topic and do not digress into "why" or "do it differently" ... those are not your concerns.
The problem is the youtubeplayer inside the OBS Browser source playing always with quality tiny.
The only way we managed to get it work for a short time is by installing OBS static then running it in protable mode ( -p param ) and then celaning up the browser cache manually.
Once the cache is wiped out the quality goes back to full-hd -> for a short period of time.
Then suddenly drops to tiny. That happens even on a full page 1920*1080 player (tested both embedding the iframe and loading the js player) then to be sure we tested over a std youtube page with same results ( happenend the same with small and big players )
 

koala

Active Member
Let me explain even the obvious, as it seems you are unable to get it:
the screenshot i attached on the top shows the behaviour of a normal browser (on the right) compared to the behaviour of the OBS browser source(on the left) for the same page.
In the browser we see a full-hd resolution in the player, in the OBS browser we just get a playbackQuality "tiny".
This is not obvious at all, so thanks to your explanation. It is clear now that you know what you want to do, and that what you are doing is what you want to do. This is not obvious. Most of the people who do what you do are actually wanting something different - they want to rebroadcast the original video in its original quality. They don't want to capture the rescaled video within the playerr. They don't realize they are losing quality by capturing the rescaled video, like filming a video from a screen with a camera and wonder why the quality is so bad. To these people my posting was targeted.

In your case, the obs-internal browser does not seem to correctly transmit its resolution to the youtube player, so the youtube player doesn't know the size of the browser, so it chooses a too small resolution for playback. That's probably something for the developers of OBS to handle.
 

dodgepong

Administrator
Community Helper
This isn't really at all what the browser source is intended for. At the very least, you could just add a regular window or desktop capture to capture the browser.

Can we back up? Why are you trying to capture a YouTube stream like this in the first place? I feel like there is a much better solution to what you're trying to do here.
 

marcotosom

New Member
@koala i understand why you misunderstood the problem. In the end is what we thought about, that there is some problem regarding the screen viewport in the simulated browser size.

@dodgepong Please do not go into the "why", there is a problem with youtube in the browser source, can we please focus just on that?
I repeat if we could achieve our goal in a different way we wouldn't be here reporting this issue.

To recap the problem:
OBS version 21 browser source works fine (at least for 13 secs)
OBS version 22 and 23 browser source immediately drops playbackQuality to "tiny" (tested with js API)

We installed version 23 static and launched with -p (portable) mode.
Cleaning the browser cache fixes the problem, we tried to use the incognito parameter -> no success.
There is no way to fully clear the browser cache other then manually remove the files insire the obs installation dir (for portable mode)
So there must be a reason why youtube player acts weird in OBS 23.

We just need technical info please.
 

dodgepong

Administrator
Community Helper
No, we can't focus on that, because you're using the browser source for something it's not intended for. If it's not intended to be used that way, it can't effectively be supported, and it won't likely be fixed.
 

marcotosom

New Member
Excuse me but OBS is capable of handling an internal browser that allow users to stream browser contents.
But we cannot reproduce a youtube stream with FHD resolution beacuse the browser source is not intended to work that way.

So what seemed to be a bug is instead a "feature" interesting. Now i get why it's almost impossibile to have the browser source to work with a youtube stream, so i see that the problem is not related to youtube but to some internal browser source setup that lowers the quality.

To conclude:
thank you for the clarification. I take note that we cannot use the browser any more to re-stream our own content in such way by using a web page as control room.
Very sad to hear such definitive sentence "won't likely be fixed" . That may end our usage of OBS for future plans.
Goodbye.
 

koala

Active Member
You can always just window-capture Chrome or any other external browser instead of using the browser source.

An internal browser is a moloch if it comes to time required to handle it from a developer's perspective. The code of the chrome-based browser source is as big as all of the other code of OBS together. This is to explain why the OBS developers don't intend to look deeper into this. It even may be that it is not an issue with OBS itself but an issue with the 3rd party chromium library.
 

marcotosom

New Member
@koala thanks for your reply and suggestions unfortunately we cannot do that unless we find a very specific browser capable of running ina a very specific way (cannot detail more) And then i perfectly understand aboud the 3d party chromium code. But at least we've found out the point and that is browser source the problem. Without having to rely on it any more we can now find another way to reach the goal.

@Suslik V the referenced image i posted above is taken randomly just to show the behaviour, and testing with a youtube js player api the playbackQuality sets to "tiny" ( got the data from calling player.getPlaybackQUality() in the js code)
Anyway 720 is too low quality for us, we need the "hd1080" (even if a little degraded by the player stream compression).

Guys thanks for your replies, but cannot rely anymore on the browser source we will try to find a different solution.
Regards,
Marco.
 

dodgepong

Administrator
Community Helper
To be clear, the browser source is intended for rendering HTML/JavaScript/CSS, usually for the purpose of having HTML-rendered graphics, not to be a browser. Perhaps the name needs to change to better reflect the intention of the source. If you need to capture browser content as if it were a normal browser, then we recommend you use a normal browser and capture the window.
 

marcotosom

New Member
@Suslik V unfortunately is not so abstract, the problem is confirmed to be related to the OBS browser source that goes crazy when reproducing youtube streams, both on the youtube pages and on the custom players. The admin confirmed that.
We now have to move to a different solution for out control room.
 

Suslik V

Active Member
There, I used Interact option of obs (right-click menu over the Source). And 720p was max available quality for the source stream (for me).
 

marcotosom

New Member
@dodgepong yeah for sure, as the the HTML was born to show documents online linked to each other and not to be used as an language for applications coupled with js.
Btw you do not have to justify about that, we needed to understand why the browser source behaved like that, and now we know. At least we can stop testing every king of solution over the browser source, and move on to a different solution if any with OBS.
Or even choose to use a different streaming platform.
 
Top