Comments (22)
那把KSOptions.displayCriteriaMatchingEnabled 设置为false是不是就不会有问题了
from ksplayer.
If I disable that setting then no video will be detected as HDR/DV.
Previously both HDR and DV was detected perfectly. Now only HDR is.
from ksplayer.
重载的preferredDisplayCriteria 方法的实现方法你是怎么写的呢?反馈不能显示DV的用户是用tvOS 16还是tvOS17呢?
from ksplayer.
I use the exact same code in the override as the function is. Except I added an if statement to check if user has come from live or vod - so I can disable hdr on the fly. I can’t post code as I am away from computer.
Dolby vision is detected as HDR. Using tvOS 17
from ksplayer.
那可能是tvOS 17的方法判断不准,所以不要用
if #available(tvOS 17.0, *) {
if let formatDescription = track.formatDescription {
return AVDisplayCriteria(refreshRate: refreshRate, formatDescription: formatDescription)
} else {
return nil
}
}
还是继续用
let videoDynamicRange = track.dynamicRange(self).rawValue
return AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: videoDynamicRange) 来判断吧
from ksplayer.
since your commit about dynamic range 485f995 all DV content are forced to HDR
from ksplayer.
sorry @kingslay the issue started after this discussion:
#563
the "old code" would work perfectly
from ksplayer.
you can also have a look at this one too @kingslay
from ksplayer.
那就是AVDisplayCriteria(refreshRate: refreshRate, formatDescription: formatDescription) 这个方法是不支持DV的。那我先默认不开启AVDisplayCriteria(refreshRate: refreshRate, formatDescription: formatDescription)
from ksplayer.
thank you I will try,
also can you please update the testflight tracy player?
thank you
from ksplayer.
I don't know why, but since you renamed the settings to toggle HDR/SDR my code no longer works.
It probably never worked before, because you were setting displayCriteriaMatchingEnabled to true and now you set to false.
I set
myOptions.contentMatchingLive = true
KSOptions.displayCriteriaFormatDescriptionEnabled = true
and inside my myOptions() class, displayCriteriaFormatDescriptionEnabled is always false
public class meOptions: KSOptions {
var contentMatchingLive = false
#if os(tvOS)
override open func preferredDisplayCriteria(track: some MediaPlayerTrack) -> AVDisplayCriteria? {
if contentMatchingLive {
let refreshRate = track.nominalFrameRate
if KSOptions.displayCriteriaFormatDescriptionEnabled, let formatDescription = track.formatDescription, #available(tvOS 17.0, *) {
return AVDisplayCriteria(refreshRate: refreshRate, formatDescription: formatDescription)
}
}
return nil
}
}
from ksplayer.
你看我最新的提交 我改了 你试下
from ksplayer.
Already using the latest code.
No matter where I set displayCriteriaFormatDescriptionEnabled to true, it is always false in the override for the display criteria.
from ksplayer.
displayCriteriaFormatDescriptionEnabled 要设置为false。tvOS17那个新的api是不兼容dv格式的。所以还是要用老的方式来设置
from ksplayer.
ok, I understand about DV. but toggling HDR/SDR switching via the old displayCriteriaMatchingEnabled switch you added worked 100%. You have renamed it to displayCriteriaFormatDescriptionEnabled and set it to false by default.
It is not possible to set this to true. In the preferredDisplayCriteria(track: some MediaPlayerTrack) -> AVDisplayCriteria? function it is always false. it can't be changed to true.
This affects normal HDR as well. there is no switching possible now because displayCriteriaFormatDescriptionEnabled cannot be set to true, ever.
from ksplayer.
跟这个开关没有关系。你只要改成用 AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: videoDynamicRange) 这个初始化方法来创建 AVDisplayCriteria。 你重载的方法里面 甚至可以不用判断那个开关。 现在的问题是tvos17新的api初始化方法是有问题的话 所以我们要用之前老的初始化方法。 我还保留这个开关是期待后续Apple可以修复这个问题 然后到时就可以把这个开关打开了。
from ksplayer.
ok, thanks for the information. I will use the other code and this should solve dolby vision?
from ksplayer.
Now this opens again a problem I thought was solved but was a bug instead:
many HDR streams use HLG instead of HDR10, and this code output Dolby Vision.
Thing is, in tvOS, HDR HLG is supposed to be output as HDR10, not Dolby Vision.
https://community.firecore.com/t/hlg-on-3rd-gen-atv-4k/39538/16
https://www.flatpanelshd.com/review.php?subaction=showfull&id=1668063491
from ksplayer.
Now this opens again a problem I thought was solved but was a bug instead:
many HDR streams use HLG instead of HDR10, and this code output Dolby Vision.
Thing is, in tvOS, HDR HLG is supposed to be output as HDR10, not Dolby Vision.
https://community.firecore.com/t/hlg-on-3rd-gen-atv-4k/39538/16 https://www.flatpanelshd.com/review.php?subaction=showfull&id=1668063491
你是否可以提供下对应的HDR 、HDR10、 Dolby Vision的视频小片段吗?我看下是否有一些视频属性可以把这三个区分开。
from ksplayer.
Now this opens again a problem I thought was solved but was a bug instead:
many HDR streams use HLG instead of HDR10, and this code output Dolby Vision.
Thing is, in tvOS, HDR HLG is supposed to be output as HDR10, not Dolby Vision.
https://community.firecore.com/t/hlg-on-3rd-gen-atv-4k/39538/16 https://www.flatpanelshd.com/review.php?subaction=showfull&id=1668063491Can you provide video clips corresponding to HDR, HDR10, and Dolby Vision? I'll see if there are some video attributes that distinguish these three.
Sure thing.
HLG HDR: https://4kmedia.org/travelxp-4k-hdr-hlg-sample/
HDR10: https://4kmedia.org/life-untouched-hdr-uhd-4k-demo/
HDR10+: https://ff.de/hdr10plus-metadata-test/
Dolby Vision: https://4kmedia.org/lg-earth-dolby-vision-uhd-4k-demo/
Also, here's more info about the attributes for HLG HDR videos: http://forum.doom9.org/archive/index.php/t-175533.html
basically, for HLG HDR you must check for the transfer characteristics.
edit: added hdr10+ sample
from ksplayer.
@edge261 我试了下
HLG HDR: https://4kmedia.org/travelxp-4k-hdr-hlg-sample/ 识别为 HLG
HDR10: https://4kmedia.org/life-untouched-hdr-uhd-4k-demo/ 识别为HDR10
HDR10+: https://ff.de/hdr10plus-metadata-test/。 识别为HDR10
Dolby Vision: https://4kmedia.org/lg-earth-dolby-vision-uhd-4k-demo/ 识别为dolbyVision
这样是符合预期的吧。
from ksplayer.
@kingslay then why the HLG streams i'm testing are triggering Dolby Vision on my TV instead of the standard HDR10 mode?
I can send you in a email the link of the stream I'm trying to watch.
from ksplayer.
Related Issues (20)
- Can the caching function be added? HOT 5
- 您好,如何在不播放的情况下,获取视频的总时间长度? 目前貌似没有 api 可以获取? HOT 1
- Stream doesn't start HOT 2
- Compilation warning in AudioEnginePlayer.swift
- Unable to add via Swift Package manager HOT 3
- 双语字幕重叠 HOT 3
- Error sanbox when build application
- Package resolution failed HOT 2
- Fix Apple TV App HOT 1
- Video cache support HOT 5
- Crash when view livestream HOT 1
- 能否自定义一个KSPictureInPictureController? HOT 3
- 使用swift Package Manager更新KSPlayer,添加依赖失败
- 请问咱这个播放器支持3d播放吗? 左右眼 HOT 6
- Transferring to Bluetooth doesn't work until stop-start HOT 1
- pod install for visionos 不兼容 HOT 1
- Playing this URL fails most of the time HOT 12
- Switching from WiFi to Cellular fails HOT 2
- Fix Apple TV App HOT 1
- Does it support video/mp2t format? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksplayer.