Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make vp9 codec to run everytime on chromium #11

Open
zzepto opened this issue Jan 5, 2020 · 10 comments
Open

Make vp9 codec to run everytime on chromium #11

zzepto opened this issue Jan 5, 2020 · 10 comments

Comments

@zzepto
Copy link

zzepto commented Jan 5, 2020

Hi,
Is it possible to make chromium to force vp9 codec instead of h264? There is a script for tampermonkey on reddit but i didnt find a way to make it work on nvidia shield.
Your apk is working great but the picture on nvidia shield chromium is muddy, i have tried this script on laptop and the picture is very clear now. So im sure chromium uses h264 codec

@vrodriguezf
Copy link

I use this extension in chromium-dev in Linux with hardware acceleration enabled and it looks better to me too while in VPN. Can you install chromium-dev in nvidia shield?

@zzepto
Copy link
Author

zzepto commented Jan 5, 2020

I use this extension in chromium-dev in Linux with hardware acceleration enabled and it looks better to me too while in VPN. Can you install chromium-dev in nvidia shield?

I will try but this build is excellent for dualshock4 gamepad as all buttons are correctly working even if controller connected to shield which utilize xbox mappings

@vrodriguezf
Copy link

Btw how can you check in Chromium that Stadia is actually running VP9?

@zzepto
Copy link
Author

zzepto commented Jan 5, 2020

Btw how can you check in Chromium that Stadia is actually running VP9?

I guess with tampermonkey

https://www.reddit.com/r/Stadia/comments/eimw7m/tampermonkey_monitor_your_stream/

@vrodriguezf
Copy link

Thanks!

And another one: How can I check that VP9 is running with hardware acceleration?

@zzepto
Copy link
Author

zzepto commented Jan 5, 2020

Thanks!

And another one: How can I check that VP9 is running with hardware acceleration?

Cant help you with that. Try to contact this guy, he might be able to add hw acceleration check in the next version
https://chrome.google.com/webstore/detail/stadia%20-extension/bbhmnnecicphphjamhdefpagipoegijd

@vrodriguezf
Copy link

I will, thx!

@sigmaxipi
Copy link
Owner

It should already be doing this. I had to put in a hack at https://github.com/sigmaxipi/chromium-for-stadia/blob/master/chromiumForStadia.diff#L146 that forced the codec to work around #3. That code runs

if (key == "video_codec_implementation_by_codec_key" && value == "{\"vp9\":\"libvpx\"}") {
    return setItem(key, "{\"vp9\":\"ExternalDecoder\"}", exception_state);
}

which should force VP9. If you can figure out how to get an Chrome Dev console on the Shield, you should be able to verify the codec. There may be some other issue resulting in a muddy picture on that device.

@vrodriguezf
Copy link

Thanks!

So, if I use getItem in a Chromium console (desktop version) I should be able to monitor the current codec being used?

@sigmaxipi
Copy link
Owner

I don't think localStorage contains the current codec. I think it just has the list of supported ones. The JS snippet at https://www.reddit.com/r/Stadia/comments/eimw7m/tampermonkey_monitor_your_stream/ shows how to extract the current codec. If you run that bit of JS code in your dev console, you should be able to get the active codec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants