brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.53k stars 2.27k forks source link

Unable to playback HEVC #40101

Open cmdshft opened 1 month ago

cmdshft commented 1 month ago

Description

I run Unifi Protect security cameras, and the cameras recently had an update that allowed the use of the HEVC codec to record with and also view the live feed with. It's great on iOS through their own app, but on the web browser only browsers that support HEVC will be able to play. Brave seems to be unable to play them as such.

Steps to reproduce

  1. Open up Protect Web App
  2. Cameras all report that the browser cannot playback the video
  3. ???

Actual result

image image

Expected result

Should be able to playback HEVC.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.68.131

Channel information

Reproducibility

Miscellaneous information

No response

cmdshft commented 1 month ago

Anyone?

bsclifton commented 1 month ago

NOTE: i had shared a link to an extension - but it is only for Chrome OS. I deleted that post to avoid confusion.

bsclifton commented 1 month ago

@cmdshft I found a solution that works! Special thanks to the guide here: https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding

Basically, it seems this is only supported if you enable the feature via command line. Not just for Brave, but for any Chromium based browser.

If you're on Windows, there should already be a shortcut for Brave on the desktop. You can edit this and add --enable-features=PlatformHEVCEncoderSupport to the end of the Target field. image

macOS I'd have to look - but I am pretty sure you can do shortcuts with command line arguments too

After enabling and launching, I tested it using the test website from the guide: https://w3c.github.io/webcodecs/samples/encode-decode-worker/index.html

Let me know if this works for you! πŸ˜„ Thanks

cmdshft commented 1 month ago

@bsclifton Unfortunately, this doesn't seem to work as well. I used the test site, as well as trying the Protect web application and setting my cameras to the HEVC encoder option and still unable to use it.

What's interesting to me is that both Chrome and Edge work without issue and without needing to use this special command on the shortcut for either browser.

cmdshft commented 1 month ago

I did manage to resolve this, though. I completely removed Brave (and the browsing data, after backing up passwords to CSV) and reinstalled and it’s working as expected. Not really sure what caused it to break as I have not been using Brave for longer than a few months already. But, it is working none the less.

bsclifton commented 1 month ago

@cmdshft super good to hear! πŸ˜„ Thank you for digging in and trying some troubleshooting - and then especially thanks for coming back to report what worked for you here.

I'll make sure our support team sees this. I am curious why the flag worked for me (I am on Nightly).

MrJimmyPenguin commented 1 month ago

I have the exact same issue on popos, still doesnt work. Brave [v 1.68.128]

bsclifton commented 1 month ago

cc: @rebron for prioritization

MrJimmyPenguin commented 1 month ago

Same issue linux popos and Brave: v 1.68.137

Logan-Quest commented 1 month ago

I'm also running Brave on Linux Mint (22) and adding the --enable-features=PlatformHEVCEncoderSupport flag still doesn't allow my H.265 security cameras to play in Brave Browser on Linux. I can play it in Windows.

However, the H.265 security cameras do work on the Thorium browser (chromium based) on my Linux system. So Linux is capable of it, it's just something Brave doesn't seem to support.

joewood9364 commented 1 month ago

Not working on Linux. This repository may contain a solution somewhere: https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding