Feature Requests

Support forum for DGDecNV
DAE avatar
Zathor
Posts: 94
Joined: Sun Nov 28, 2010 5:06 am

Feature Requests

Post by Zathor »

Thanks, it does work now as expected :hat:

And I am sorry, I am a bit slow these days :oops:
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Great to hear, thank you.

IMHO, you have earned the right to some serious R&R.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

Rocky wrote:
Tue Apr 26, 2022 10:18 am
* VFR support features.
Hoping, you never know :)

And also ... any chance of a NV filter (vapoursynth compatible) which converts VFR video to CFR ?
I can't picture a decent approach, although many must exist, your view would be handy.

I had to try try to kludge a dummy's approach by a couple of methods I'm unhappy with.
  • use ffms2's dups/drops to yield a framerate = 2 x the target framerate (eg 2x25=50fps in my case) and then SelectEvery to the final framerate
  • use ffms2's dups/drops to yield a framerate = 2 x the target framerate (eg 2x25=50fps in my case) and then mv.FlowFPS to the final framerate
  • use ffms2's dups/drops to yield a framerate = 2 x the reported average vfr framerate and then mv.FlowFPS to the final framerate
If you give a hint on better methods, that'd be wonderful :)
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Thank you hydra3333 for your request. I'm going to do some research on VFR and then come back to you.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Hello again. Can you please provide a sample VFR file for me and explain how you know it is VFR, i.e, really VFR and not just marked as VFR in the container? I see from a doom9 thread that you know about 'pseudo VFR'. Thank you.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Feature Requests

Post by Curly »

I'm feeling a flash of brilliance. Hang on ...
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Feature Requests

Post by Curly »

Too intense! Stupid is easier.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

OK I'll look for a few. some were as low as 16 :)
Now off to find a couple ...
I have forgotten, where can I upload them or do you want a a google drive link ?
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

OK, In regard to phone cameras of various sorts, VFR seems to be common.
I used both medianfo (mi) and ffprobe (ff) to query framerates and check for differences within each.
Will pm you a link to the videos, some results are in a text file,

Many hover around the magic 30 fps but are not 30 fps and may be "pseudo VFR" .
Some have low minimums (of indeterminate duration) ... over time, audio desync could build up.
Other clips are a bit all over the place like this wonder:

Code: Select all

ff_avg_frame_rate=23.650798968208772 || mi_FrameRate=23.651 || mi_FrameRate_Minimum=5.917 || mi_FrameRate_Maximum=58.824
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Google drive is fine, otherwise I can PM you our FTP details.

Realize that if the stream has VFR with a wide variation of frame rates you are going to have to duplicate frames. But that should not be a perceptual problem.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

OK. You have a PM.
I tried to google for an algorithm; not much luck so far.
I wondered about motion-interpolating a target frame where it (according to the destination CFR's timestamp) is in between 2 VFR frames either side of the target. If a vfr frame interval is longish, may need to motion interpolate a couple or more frames.
Maybe it's all too hard and dups/drops per existing source filters are as good as one gets.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Not seeing a PM. Who did you send it to?
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

Oops, Curly sounded funny so I sent it there. Sorry. Sent it to you now.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Thank you, I have the files now. But that text file, what is it? A lot of numbers and no file names.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

Any chance you have any with talking heads or something better to assess audio sync? If not, don't worry, I can get going with what you gave me. Thank you.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

Feature Requests

Post by Curly »

hydra3333 wrote:
Fri Jun 09, 2023 9:47 am
Curly sounded funny so I sent it there.
Smart man. If at first you don't succeed, keep on sucking till you do succeed.
User avatar
Natasha
Posts: 150
Joined: Wed Nov 20, 2019 11:11 am

Feature Requests

Post by Natasha »

Teach me, Curl.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Feature Requests

Post by Sherman »

Don't do it.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

Curly wrote:
Fri Jun 09, 2023 9:04 pm
Smart man. If at first you don't succeed, keep on sucking till you do succeed.
At one time I worked in the Public Service. Well versed.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

:D You should tell us some stories.
User avatar
Rocky
Posts: 3557
Joined: Fri Sep 06, 2019 12:57 pm

Feature Requests

Post by Rocky »

I wrote a tool to show which of the MP4 files you gave me is the most VFR-ish. It is 20170720_191239.mp4. The frame rate is 29.97 declared. The first timestamp is 0 and the second is 4202. It should be 2997, so it is 1205 too large. But 1205 is not a full frame (2997) so we can't dup this one. Then the stamps oscillate around a delta of 2997 (some a wee bit short and some a wee bit long). About 3/4 of the way through there is a delta of 5259, which is 2262. The accumulated deviation is now about 1205+2262=3467, which is larger than 2997, so we can dup a frame here. The rest of the stream has only the wee deviations around 2997.

Now using ffmpeg to convert to CFR, we find that is exactly what is done, and the final converted stream has one extra frame inserted at the point. This is certainly not very VFR-ish, and I wish you had some more highly VFR-ish files. Nevertheless, I will come to an interim conclusion: The way to convert is to track the accumulated deviation and insert a frame when it exceeds one frame time, then adjust the accumulated deviation accordingly. This is just what the existing converters like ffmpeg do. Now the question is whether there is any advantage to CUDA-izing the process. I do not see anything in the algorithm that would benefit. The gain from trying to include this processing in DGSource() is small compared to having a separate filter or preprocessing with ffmpeg. So tentatively I'm going to decide not to do anything.

Note that there is no difference perceptually between showing a frame for 100ms versus showing the same frame twice for 50ms each. I do not see how interpolation can be relevant here. It would just introduce things that are not present in the source.

You are welcome to try to convince me otherwise. ;)
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Feature Requests

Post by hydra3333 »

I am convinced you know what you are talking about !

Unlike many in the Public Service :)

Gift of the Gab got many to elevated levels in the PS, well past their Peter Principle limit.
One of the less clever ideas promoted just a few years ago was that any manager can manage any area and any project manager can manage any type of project, regardless of their backgrounds. Beside being a means to diminish and bypass anyone who actually knew anything, projects would not go well since a pm did not grasp the significance and implications what people were telling him/her. I thought that silliness was on the wane, however I heard someone very senior in a PS Tax area recently promote it all over again (an economist ... of course).
Welcome to the new-ish world of know nothings. We may as well be ruled by politicians ... oh, wait ...

So, given your thoughts on vfr, am happy to just forget it and run with the ffms2/ffmpeg dups/drops as good enough.

Thank you.
User avatar
Sherman
Posts: 576
Joined: Mon Jan 06, 2020 10:19 pm

Feature Requests

Post by Sherman »

So you have the gift of gab!

User avatar
Baltasar
Posts: 60
Joined: Tue Nov 02, 2021 9:51 am

Feature Requests

Post by Baltasar »

User avatar
Albert
Posts: 40
Joined: Thu Oct 15, 2020 1:20 pm

Feature Requests

Post by Albert »

Post Reply