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
869 stars 184 forks source link

Interlaced stream looks shaky if the reference frame =1 using Yadifx2 #714

Closed cdguy closed 6 months ago

cdguy commented 6 months ago

the actual YADIF filters works very well if the reference frames are 4 or more;

However, if the reference frame of the interlaced stream is 1; the yadifx2 filter output shaky image; for this reason I have to use the yadifx1 filter to not have a shaky image.

I will send you 2 links the first one is an interlaced stream which has only 1 reference frame the second one is an interlaced stream which has 4 reference frames. (I send you this one to make sure that after your code change, this stream is not affected)

Thank you!

kingslay commented 6 months ago

mpv会有这个问题吗

cdguy commented 6 months ago

mpv会有这个问题吗

yes same issue with MPV; only VLC plays it correctly.

For this kind of stream yadifx1 does not look bad, maybe if you add an automated function in your code like:

if stream is interlaced AND has only 1 reference frame; then use yadifx1 filter

this would be more than enough

Thanks!

@kingslay

kingslay commented 6 months ago

好的 我看下流信息可不可以拿到这个信息

cdguy commented 6 months ago

the ios app of this application displays the reference frames https://mediaarea.net/en/MediaInfo

https://apps.apple.com/gb/app/mediainfo/id1448983823?uo=4&mt=8

@kingslay

kingslay commented 6 months ago

我不是根据reference frame 来进行判断。我对比了两个流,用realFrameRate和avgFrameRate来进行了判断。你可以多尝试更多的流。看下这个判断准不准。@cdguy

kingslay commented 6 months ago

我昨天发邮件跟苹果反馈了testfligth 的审核问题。他们说他们会看下这个审核的问题

cdguy commented 6 months ago

@kingslay before trying this; do you have an ios device that has 120hz refresh rate? I will ask a question if you have one

kingslay commented 6 months ago

现在很少有120hz的电影吧。最多60hz吧

cdguy commented 6 months ago

It is not about that I just purchased an iphone 15 pro, which has (as you know) 120hz refresh rate screen.

when I play an interlaced stream (Yadifx1or Yadifx2) Look at the sliding text. It stops scrolling for a fraction of a second

https://github.com/kingslay/KSPlayer/assets/123307657/0d0d294a-8425-449f-9542-1d665d0039ec

It happens only with 120hz screen ios devices. @djokt can also confirm this

djokt commented 6 months ago

Indeed, it creates a freeze every +/- 2s

kingslay commented 6 months ago

这个120hz的问题。在mpv上也会有吗?

cdguy commented 6 months ago

All smooth on MPV @kingslay

cdguy commented 6 months ago

@kingslay as I previously mentioned here https://github.com/kingslay/KSPlayer/issues/525#issuecomment-1681936334 MPV adapts the output refresh rate according to the device screen’s refresh rate