INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MadVR repeated frames contradiction in OSD  (Read 5364 times)

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
MadVR repeated frames contradiction in OSD
« on: September 01, 2018, 05:39:17 pm »

I have a strange problem with repeated frames in MadVR that I hope someone can explain to me...

First some facts:
Videoclock is ON
MadVR is NOT changing the refresh rate, but MC is doing that (Display Settings Automatic Change Mode is ON)
Problem ONLY occurs with SD content at 29.970fps in MPEG2 format. (but not ALL such videos)
  (Not in h264 content at same resolution and refresh rate)
  (Not in HD content at 29.970fps, even if MPEG2)
MadVR smooth motion is OFF.

The strangeness is a contradiction in the MadVR on screen display information regarding repeated frames.

When I play videos (movies) that exhibit this problem, I will get a very good result in the MadVR repeat/drop calculation, something like 1 frame repeat every 30s/5min/1.2days that sort of thing.  The interval keeps increasing the longer the video plays.

But the repeated frames count down lower in the OSD is constantly increasing, at approximately 12 frames every second.
(see screenshot attached; in this one I took the shot soon after the video started, so the interval isn't very long yet).

If my "1 frame repeat" line says every few minutes, or hours, then why is my "repeated frames" count down below increasing by roughly 12 every second.  In other words, after 5 minutes of watching a movie, the calculated interval might be 1 frame every 12.6 hours, but the actual count of repeated frames will be several thousand, and constantly increasing.

What's going on here?

If I force MadVR Smooth Motion to ON in all circumstances, the repeated frames count stops increasing, but I don't want to turn on any interpolation/blending.

I can't understand why MadVR is repeating frames when the display rate is a nice multiple of the movie frame rate. (the repeated frame count is not equal to the actual elapsed frames, which would indicate doubling to play a 29.97 movie at 59.94)  And I thought having Videoclock on was supposed to eliminate any small deviations.

Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10968
Re: MadVR repeated frames contradiction in OSD
« Reply #1 on: September 01, 2018, 06:08:26 pm »

Some 29.97 FPS content is encoded using whats called "Soft Telecine", which makes the content look like 29.97 FPS, but its actually only 23.976 FPS, with additional metadata flags to indicate that certain frames need to be repeated. This is sometimes used in broadcast or on DVDs where the content is supposed to be the same rate (ie. all 29.97), but the actual content is mixed.

This results in madVR needing to repeat frames to match the 23.976 to 29.970. Basically, you need 6 additional frames per second to match up 24 fps to 30 fps, and if you then do that on a 60 Hz screen, you want 60 fps, so you end up with 12 repeated frames instead of 6 per second.

Unless you can actually spot a visual problem with those files, its probably just fine.
Logged
~ nevcairiel
~ Author of LAV Filters

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: MadVR repeated frames contradiction in OSD
« Reply #2 on: September 01, 2018, 08:10:13 pm »

Ah!

Thank you Hendrik, that is very interesting.  I don't think I ever knew about the soft telecine concept.

That makes a lot of sense, and corresponds with what I was seeing, not only mathematically, but also in terms of content: only some of my files exhibited this behavior, but all the ones that did were SD-DVD rips of movies.  So indeed, all of that original content would have been at 24fps, and then on some they fudged the DVD release with the process you describe.  Other SD-DVDs that did not exhibit this behavior were obviously mastered differently.

One thing that confused me was that despite the large number of dropped frames, I was not seeing any obvious visual defect.  They seemed fine, as you said, and so are probably working as intended.

The contradiction between the two repeated frame calculations in the MadVR OSD was doubly confusing.  But I guess that if the repeated frames are "expected behavior" when MadVR encounters soft-telecined source material, it doesn't include that in the calculation up top, but does included it in the bottom count anyway.  To me that's confusing behavior, but ok.

Thanks so much for educating me on this.

I've found that if you open the file in MPC-HC and look at the MediaInfo, it will show a frame rate of 23.976 for a file that doesn't have this issue, but 29.970 for one that does (which must be the Soft Telecine).  JRiver (also VLC) thinks both files have a framerate of 29.97, of course.

Thanks!
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: MadVR repeated frames contradiction in OSD
« Reply #3 on: September 02, 2018, 12:43:38 am »

madVR is capable of fixing this, but it requires that you do two things:
    1. Force the content to use film-type deinterlacing.
    2. Use madVR's display mode switcher and not the media player's.
There are several options for #1:

1. Tag the file with [deint=film] in the filename (or [deint=video] if you want to force video-type deinterlacing).
2. Use the keyboard shortcut CTRL+ALT+SHIFT+T to manually switch the content type.
3. Configure madVR to disable source type detection in the deinterlacing options and default to film-type for all content. This works best if you mainly or exclusively watch movies rather than TV shows, and you can use one of the options above if there are any exceptions which need video-type deinterlacing.
 
When it is using film-type deinterlacing, madVR treats the video file as though it is natively 24p and will switch your display to 24Hz rather than 60Hz.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: MadVR repeated frames contradiction in OSD
« Reply #4 on: September 03, 2018, 03:49:38 am »

Will forcing deint=film cause any resolution loss or softness?

I had to do that once before for a video that had definite interlacing problems...

But in order to use deint=film, do I have to let MadVR control the display mode?  I can't really do that, because on my machine things malfunction when I've tried that, and the mode does not switch back properly when playback stops.  I've found that only letting JRiver do it is reliable.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: MadVR repeated frames contradiction in OSD
« Reply #5 on: September 04, 2018, 10:26:45 am »

Will forcing deint=film cause any resolution loss or softness?
No, it tells madVR that you are trying to decode a film and will use inverse telecine to pull out a 23.976 FPS video from the 29.97 FPS stream (films are encoded to this rate using a 3:2 cadence, which is a reversible process).

But in order to use deint=film, do I have to let MadVR control the display mode?  I can't really do that, because on my machine things malfunction when I've tried that, and the mode does not switch back properly when playback stops.  I've found that only letting JRiver do it is reliable.
You don't have to, but since Media Center thinks it's a 30 FPS video, it will switch the display to 60Hz rather than 24Hz so it's not going to solve the problem.
madVR can switch the display to 24Hz because it's the one performing IVTC.
Logged
Pages: [1]   Go Up