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

Open
opened 2026-02-20 01:04:53 -05:00 by deekerman · 4 comments
Owner

Originally created by @metorm on GitHub (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.

Originally created by @metorm on GitHub (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.
Author
Owner

@lastzero commented on GitHub (Feb 12, 2024):

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+:

github.com/photoprism/photoprism@5bd822e616/frontend/src/common/caniuse.js (L45-L47)

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! 🙏

@lastzero commented on GitHub (Feb 12, 2024): This should not be happening and could be related to either your browser or [graphics driver](https://support.microsoft.com/en-us/windows/display-requirements-for-hdr-video-in-windows-192f362e-1245-e14d-3d3f-4b3fc606b80f). 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+](https://en.wikipedia.org/wiki/High-dynamic-range_television): https://github.com/photoprism/photoprism/blob/5bd822e616d8ee9e503f9670b009543a8b6f3e56/frontend/src/common/caniuse.js#L45-L47 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! 🙏
Author
Owner

@metorm commented on GitHub (Feb 15, 2024):

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

@metorm commented on GitHub (Feb 15, 2024): OK. My problem may have been caused by a cracked version of a HEVC UWP decoder. I'll test it later.
Author
Owner

@metorm commented on GitHub (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?

@metorm commented on GitHub (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](https://github.com/photoprism/photoprism/assets/12082680/a052b3ed-a33b-4a21-b185-02374172dfdb) However, when I click a hevc-encoded mov file shot by iPhone, I got this in the network monitor: ![image](https://github.com/photoprism/photoprism/assets/12082680/1c7a0bab-3d18-4a29-8712-15d4337b28d0) ``` 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?
Author
Owner

@lastzero commented on GitHub (Feb 26, 2024):

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 commented on GitHub (Feb 26, 2024): 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! ❤️
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#2033
No description provided.