Posts: 47
Threads: 5
Joined: Oct 2018
Hello there, people.
I'm a bit of a newbie when it comes to video coding, so naturally from time to time I get in troubles that I can't solve on my own.
My today's problem, as the title states, is with variable FPS video. It is a DVD source, that Hybrid and MediaInfo both identify as telecine 720x480 29.97fps mpeg-2, but in reality I encounter two problems with that.
First one: I recently discovered, that my previous attemt to build intermediate frames and increase it's fps to 60 resulted in double frames during most of the video.
Second one: Hybrid output has the length of 2:00:38 instead of the source's 2:20:47 effectively losing 20 minutes in length without losing any parts of the initial video - at least as far as I can tell (I didn't watch the whole 2 hours to be honest). So in my attempts to pinpoint the problem I eventually opened the source in Media Player Classic, put my Smooth Video Project on temporary suspend mode (it is a program, that builds intermediate frames for the video being played on the go, so by that I effectively excluded a possibility of it's interferance), and then watched the source with "Statistics" mode turned on.
What I saw was video fps statistics fluctuating from scene to scene - it went as high as 60 and as low as 24 fps. So now my goal is to come up with a way to "pull" all the low fps parts up to 60 and drop everything, that exceeds. The problem with SVP script that I use seems to be that it sees 60fps parts in the beginning of the video and then just stops building intermediates for the rest of it.
Any ideas?
Posts: 10.556
Threads: 57
Joined: May 2017
"DVD source" -> then the video should be cfr
No clue what you are doing,... share details,..
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 47
Threads: 5
Joined: Oct 2018
(14.04.2020, 12:45)Selur Wrote: "DVD source" -> then the video should be cfr
No clue what you are doing,... share details,..
That's what I was thinking, but the evidence so far shows otherwise. And I also believe my eyes: some parts of that dvd actually look smoother than the others.
Here I made a short video demonstration of that: in the beginning it shows as ~60fps even though frames are obviously doubled, there are also smooth fragments in the beginning and then the actual concert is fluctuating around 30fps which is just weird.
https://www.youtube.com/watch?v=Wb1JFAteLtA
What kind of details do you need? Debug from Hybrid of some level?
Posts: 10.556
Threads: 57
Joined: May 2017
14.04.2020, 19:39
(This post was last modified: 14.04.2020, 19:39 by Selur.)
That frame rate happens if you bob such content.
-> bob your content look at the pattern of movement/changes and determine what your source is
Content usually is either: - progressive: content does who no combing even when no deinterlacer is applied
- field shifted: content shows no combing when a deinterlacer is applied, but also shows no content when the content is field hifted (uncommon for DVD content)
- interlaced: when bobbed no combing artifacts and each frame changes
- telecine: when bobbed no combing artifacs and usually a 3:2 motion pattern is noticable (3 frames change, 2 frames are equal; https://en.wikipedia.org/wiki/Telecine)
- some other pattern is visible (uncommon for DVD content; see above link)
- mixed (this is can be a mix of interlaced, progressive, telecine content with different pattern)
If your content is mixed you can either bob and live with the repetitions, or spend some time using other tools to figure out how to properly handle the content. (usually by creating vfr content to handle the different frame rates that have to be handled when all the mixed content is converted to progressive content without repetitions. (Yatta and similar tools are usually used.)
- just broken trash, sometimes whoever mastered the DVD just produced trash that is not really worth spending time on it.
side note: mixed content often isn't properly played back by normal DVD players
May be interessting: http://www.mediafire.com/file/kkw0j7z2fm...n.zip/file
So my advice is: Figure out what you really have.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 47
Threads: 5
Joined: Oct 2018
Thanks - I'll meditate on that.
But to be completely honest it is hard to believe, that to this very day nobody came up with a sound method to analyze content and interpolate it to some form of progressive constant frame rate while skipping frame doubles. I mean from what I could gather even latest versions of SVP use double frame dropping for smoothing the played video even further and avoid stuttering.
Posts: 47
Threads: 5
Joined: Oct 2018
Another weird thing.
I tried to bob it with Hybrid with Scale output frame rate set to 29.97fps in hope that bob deinterlacer would build progressive frames and that the Scale ofr option would simply drop extra frames, which in turn could be enough to build intermediates from them by processing the resulting video.
But what I didn't expect to see is a four hour long video. Because it clearly states in the description, that it "Changes the output to the selected frame rate by duplicating or dropping frames from the source. Scale output frame rate does not change the duration of the clip!"
Posts: 10.556
Threads: 57
Joined: May 2017
Depending on the deinterlacer the resolution and your system deinterlacing can take quite a while.
I think it's bad idea to use scale in combination with bob.
It's still not clear to me what you are aiming for.
What you could do, is:
1. deinterlace using a Bobber, for example using QTGMC in Bob mode.
2. Drop Frames do archive a specific bitrate using sRestore
3. Interpolate Frames using Interframe
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 47
Threads: 5
Joined: Oct 2018
(15.04.2020, 05:36)Selur Wrote: Depending on the deinterlacer the resolution and your system deinterlacing can take quite a while.
I think it's bad idea to use scale in combination with bob.
It's still not clear to me what you are aiming for.
What you could do, is:
1. deinterlace using a Bobber, for example using QTGMC in Bob mode.
2. Drop Frames do archive a specific bitrate using sRestore
3. Interpolate Frames using Interframe
Cu Selur Deinterlacing the whole 2:20:00 source while also resizing it to 1440x1080 using NVEnc only takes me about 20-30m. Building the final mp4 out of it takes about the same afterwards.
Why is it a bad idea to use Scale with bob? Why does Scale increase the length of the video in this case to 4:00:00 if according to the description it clearly shouldn't?
I'm aiming for turning the 720x480 interlaced source into 1440x1080 progressive 60fps. The plan was to first and foremost do deinterlacing and resizing and then 60fps conversion, but I am currently struggling with the variable fps. I am reluctant to use ivtc-filmdint because even though it seems to be the only available deinterlacer capable of dropping double frames, I can clearly see the horizontal stripes on the preview. bob and cubic interpolation seem to handle it better, but in those cases variable fps stays. Kind of a dilemma.
Plus I don't quite get the methods you propose. Maybe a step-by-step instruction would help. For example so far QTGMC doesn't even apper for me under (De-)Interlace/Telecine tab and I can't find anything resembling it under the Avisynth tab. The only mention of it is in the deinterlacer help window.
Posts: 10.556
Threads: 57
Joined: May 2017
Quote:Why is it a bad idea to use Scale with bob? Why does Scale increase the length of the video in this case to 4:00:00 if according to the description it clearly shouldn't?
My guess the problem is that you mix Avisynth/Vapoursynth and FFmpeg parameters,...
Would need a debug output level 9 of the job creation to know what exactly happens (Hybrid thinks you want).
Quote:Why is it a bad idea to use Scale with bob?
Because, scaling is a stupid option, it simply drops frames without any intelligence. So it should only be used in some rare cases.
Quote:I'm aiming for turning the 720x480 interlaced source into 1440x1080 progressive 60fps.
Assuming your frame rate is 29.97 bobbing on it's own should already to the frame rate adjustment.
Quote:but I am currently struggling with the variable fps.
no clue where that comes from,... but you can tell Hybrid to decode to cfr,...
Quote: For example so far QTGMC doesn't even apper for me under (De-)Interlace/Telecine tab and I can't find anything resembling it under the Avisynth tab. The only mention of it is in the deinterlacer help window.
Are you perhaps using NVEnc and enabled 'Only use encoder'
Quote:Only use encoder:
When only NVEncC will be used, so no Avisynth, Vapoursynth or filtering through FFmpeg or Mencoder.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 47
Threads: 5
Joined: Oct 2018
Quote:My guess the problem is that you mix Avisynth/Vapoursynth and FFmpeg parameters,...
I don't even apply any Avisynth/Vapoursynth to the first processing of the video. I'll repeat it again: I'm trying to build resized and deinterlaced cfr first, and only then process it again with Avisynth for intermediate frames.
Or I don't get what you're talking about.
Quote:Because, scaling is a stupid option, it simply drops frames without any intelligence. So it should only be used in some rare cases.
Well, I wanted to see if this would do the trick.
Quote:Assuming your frame rate is 29.97 bobbing on it's own should already to the frame rate adjustment.
If the source wasn't actually vfr fluctuating from 24 to 60 fps.
Quote:no clue where that comes from,... but you can tell Hybrid to decode to cfr,...
From the video source? I can tell it to decode to cfr, but won't it make double frames in the areas where fps is lower? I'm trying to avoid that.
The next thing I'm gonna try is rendering it to 24fps in hope of dropping all above without getting doubles.
Quote:Are you perhaps using NVEnc and enabled 'Only use encoder'
I already mentioned, that I'm using NVEnc, but no 'Only use encoder' under Filtering tab isn't ticked.
I'll post the debug level 9 a bit later.
|