kingslay / KSPlayer

A video player for iOS、macOS、tvOS、visionOS , based on AVPlayer and FFmpeg, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, support subtitles.
GNU General Public License v3.0
868 stars 181 forks source link

Video player does not take into account dynamic metadata on #727

Open cdguy opened 5 months ago

cdguy commented 5 months ago

Description

When playing Dolby Vision streams, the player does not take into account the dynamic metadata that are present in the stream. Several tests were carried out on Tracy with video samples to test the different layers and revealed the problem:

Expected behavior with video streams

The video should change its contrast/brightness.

I will send you in private the video file links

Thank you in advance!

djokt commented 5 months ago

I confirm. I tried the samples in question and there is a problem with the dynamic mets. Finally we end up with a simple HDR10 with the DV logo.

kingslay commented 5 months ago

With a DV profile 5, CMV 4: Tracy indicates the presence of Dolby Vision streams at 24 fps but the player does not switch to Dolby Vision mode. @cdguy 这句话的意思是。在播放器没有点亮Dolby Vision 。但是播放出来的效果,应该也是Dolby Vision的吧

djokt commented 5 months ago

Yes exactly.

kingslay commented 5 months ago

我刚更新了iOS和tvos的Testflight。你们可以在试下 DV profile 5, CMV 4 。看下是否可以点亮Dolby Vision

FaiChou commented 5 months ago

IMG_5305

kingslay commented 5 months ago

你对这个流执行下 ffmpeg -i 看下他返回的信息是什么

FaiChou commented 5 months ago
Input #0, matroska,webm, from 'House.of.the.Dragon.S01E07.2160p.HMAX.WEB-DL.DDP5.1.Atmos.DV.MKV.x265-SMURF-1mins.mkv':
  Metadata:
    ENCODER         : Lavf60.16.100
  Duration: 00:01:03.65, start: 0.000000, bitrate: 18694 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 2846.000000
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 2846.000000, end 2921.280000
      Metadata:
        title           : Credits
  Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(pc), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default) (original)
    Metadata:
      BPS             : 17662828
      NUMBER_OF_FRAMES: 84426
      NUMBER_OF_BYTES : 7774443899
      _STATISTICS_WRITING_APP: mkvmerge v70.0.0 ('Caught A Lite Sneeze') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:01:03.646000000
    Side data:
      DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
  Stream #0:1(eng): Audio: eac3 (Dolby Digital Plus + Dolby Atmos), 48000 Hz, 5.1(side), fltp, 768 kb/s (default) (original)
    Metadata:
      BPS             : 768000
      NUMBER_OF_FRAMES: 110040
      NUMBER_OF_BYTES : 338042880
      _STATISTICS_WRITING_APP: mkvmerge v70.0.0 ('Caught A Lite Sneeze') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:01:03.404000000
  Stream #0:2(eng): Subtitle: subrip (original)
    Metadata:
      BPS             : 36
      NUMBER_OF_FRAMES: 453
      NUMBER_OF_BYTES : 14010
      _STATISTICS_WRITING_APP: mkvmerge v70.0.0 ('Caught A Lite Sneeze') 64-bit
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:01:03.521000000
djokt commented 5 months ago

@kingslay nothing changes ...

djokt commented 5 months ago

@FaiChou I think your problem has nothing to do with the subject.

You must have a hacked DV file. I have already had this kind of problem with releases in profile 05.06 in bt.1886.

kingslay commented 5 months ago

@FaiChou 我更新了下testflight。你在试下,看下会不会还有这个颜色不对的情况

FaiChou commented 5 months ago

是的,颜色正常了。软件解码手机发烫严重。这只能希望下个版本ffmpeg支持了。

另外,tf的代码都是同步在Demo中吗?

kingslay commented 5 months ago

tf的代码没有同步到demo里面

kingslay commented 5 months ago

@cdguy 我发现你发给我的profile 8 播放的颜色也会不对。 在你的iOS 设备上不会颜色不对吗?