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

Video: Allow streaming of all HEVC videos under Windows, e.g. by transcoding to AVC #4067

Open
metorm opened this issue Feb 12, 2024 · 4 comments
Labels
enhancement Refactoring, improvement or maintenance task help wanted Well suited for external contributors! metadata Related to Exif, XMP, IPTC & Co. video Video Formats, Transcoding, FFmpeg, Streaming & Co

Comments

@metorm
Copy link

metorm commented Feb 12, 2024

Describe what problem this solves and why this would be valuable to many users

There is a lot of discussion and controversy about what standards trigger transcoding and when. I believe that allowing users to choose to play the original file or the transcoded file on the page can solve many similar problems.

The specific problem I encountered is that some hevc/mov files shot by iPhone play normally on windows, and the avc files generated by transcoding after uploading play normally in browsers without hevc support. However, in Windows browsers with HEVC support, the system automatically selects the HEVC data stream, but it cannot be played due to some unknown reasons.

In fact, I don't care what kind of data stream I'm watching, I just want to be able to preview the file normally. However, since my browser has a HEVC decoder, I lost the ability to view the AVC stream. This is unreasonable.

Describe the solution you'd like

I wish there was an additional option on the webpage to watch the transcoded video.

Describe alternatives you've considered

Alternatively, there can be a global option in the system to control whether to provide transcoded video to all clients.

@metorm metorm added the idea Feedback wanted / feature request label Feb 12, 2024
@lastzero
Copy link
Member

This should not be happening and could be related to either your browser or graphics driver. It might also be an issue with the specific HEVC file, as our video format support detection does not include checks for optional features like HDR10 and HDR10+:

export const canUseHevc = canUseVideo // HVC, Basic Support
? !!document.createElement("video").canPlayType('video/mp4; codecs="hvc1.1.6.L93.90"')
: false;

So instead of investing time in a workaround, it would be great to get help improving those three lines of code (or our troubleshooting guide if it's a browser/driver issue that can be diagnosed and fixed). Thank you very much! 🙏

@metorm
Copy link
Author

metorm commented Feb 16, 2024

OK. My problem may have been caused by a cracked version of a HEVC UWP decoder. I'll test it later.

@metorm
Copy link
Author

metorm commented Feb 16, 2024

No, I think it's not a problem in the front end, but something in the core.

I tested more videos, and it turned out only those shot by iPhone triggered the issue. Those taken by Android phones are OK.

The network monitor indicates that when playing a hevc-encoded mp4 file, the browser gets a normal hevc stream like below:

image

However, when I click a hevc-encoded mov file shot by iPhone, I got this in the network monitor:

image

no data found for resource with given identifier

That's all I can found. May it be caused by a failed file parsing or something similar?

@lastzero
Copy link
Member

To force the transcoding of non-AVC videos that are currently being streamed as original, a workaround could be to set a lower bitrate limit in your configuration, as HEVC-encoded videos with special features such as HDR/HFR generally have a high bitrate (despite the more modern codec).

In our upcoming release, the hvc1.1.6.L93.90 part in the code snippet above could be changed to (also) check support for any optional features (like HDR10) so that such HEVC videos are not streamed to Windows, but only to macOS/iOS for as long as only these support them. Any help with this is much appreciated! ❤️

@lastzero lastzero changed the title Video: Allow the user to chose original/transcoded data source from the page. Video: Allow streaming of any HEVC video on Windows, e.g. by transcoding to AVC Feb 26, 2024
@lastzero lastzero added help wanted Well suited for external contributors! video Video Formats, Transcoding, FFmpeg, Streaming & Co metadata Related to Exif, XMP, IPTC & Co. enhancement Refactoring, improvement or maintenance task and removed idea Feedback wanted / feature request labels Feb 26, 2024
@lastzero lastzero changed the title Video: Allow streaming of any HEVC video on Windows, e.g. by transcoding to AVC Video: Allow streaming of all HEVC videos under Windows, e.g. by transcoding to AVC Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactoring, improvement or maintenance task help wanted Well suited for external contributors! metadata Related to Exif, XMP, IPTC & Co. video Video Formats, Transcoding, FFmpeg, Streaming & Co
Projects
Status: Ideas 💭
Development

No branches or pull requests

2 participants