PDA

View Full Version : New FrameDbl.dll makes movies at 48 FPS


trbarry
21st June 2003, 04:06
I was re-reading a paper today that I had recently linked from my site and it convinced me that 24 frames / second is really not very good for movies. The flicker is easily handled by faster refresh rates but there is still a problem with dynamic resolution having to do with our eyes automatically tracking motion.

It occurred to me I could probably make a very simple motion compensated frame doubler out of my STMedianFilter code. So I did.

I made a filter, FrameDbl.dll, that will double the frame rate of any clip. I generates extra frames using a motion compensated interpolation I first used in TomsMoComp.

This is still very experimental, but you can try it at:

www.trbarry.com/Readme_FrameDbl.txt (the readme file) and
www.trbarry.com/FrameDbl.zip

I usually tend to detest blended frames. And if you look at the output one frame at a time in Vdub it really doesn't look all that good since it has alternating crisp frames and blended softer frames.

But it actually looks pretty smooth if you play it real time since each blended frame appears for only 1/48 second and is between 2 crisp frames. The best way to try this out is put FrameDbl.dll in your plugins folder and the run the following script to play any AVI file.


AviFileSource("c:\whatever\somefile.avi")
FrameDbl(255,3) <-- edit, should have 2 parms


Then play this script in ZoomPlayer or WMP. Of course it takes more CPU to play 48 FPS, not counting the filter overhead. But be sure to check somehow you are getting the full 48 (or PAL 50) FPS or you won't see the benefit of the extra smoothness.

I confess I haven't thought this through at all and it was not something I was planning to write. I just stumbled into it this morning. So I'd really appreciate some feedback here.

- Tom

jorel
21st June 2003, 05:30
@ Tom Barry

thanks for this great news!

something strange:
under the zip file have another FrameDBL.zip
and this second file is corrupt!



editing:
the first FrameDBL.dll is ok.

:)

trbarry
21st June 2003, 05:46
jorel -

How is it corrupt? Do you get a message? It is a Win/Me compressed folder like all my others. I just downloaded it from the above link to a different machine and the zip seems okay, though I didn't try to run the DLL. How far did you get?

- Tom

trbarry
21st June 2003, 05:58
jorel -

Okay, I see what I did. I had an empty zip in the folder I copied into the zip. It should have been harmles but I just updated the web page anyway. Thanks for the alert.

- Tom

jorel
21st June 2003, 06:05
i download the file again and is ok!

thank you again Tom.

the filter is cool and working fantastic.

:)

Dark-Cracker
21st June 2003, 09:51
hi,

i will try to test this filter but i think it will kill my CPU :) for reading or encoding.

Bye.

kilg0r3
21st June 2003, 12:01
whew thanks for this filter!

and now the complaints ;)

1. I tried it with the warcraft iii trailer available from divx.com and it showed some visible artifacts. (a) flickering horizontal lines (b) some flickering and jerking during the scenes with the writing. It is hard to describe. I suggest you try it yourself. If the clip is nolonger available, you can get it from me.

2. it does not work inside ffdshow. yet, I suppose this more due to ffdshow than the filter.

Cheers!

Fedor

trbarry
21st June 2003, 15:38
kilg0r3 -

I'll try it with that trailer. It is still very possible there are bugs or even major design errors in the filter since at this time yesterday I didn't even know I was going to write it. And I haven't tried it with any text overlays or sharp graphics yet. But I will.

Sorry, I don't know at all what the requirements are to run under ffdshow.

- Tom

kilg0r3
21st June 2003, 16:28
The problem with the text is less due to the sharp edges than it is due to the shadow and reflection moving over it.

Originally posted by trbarry
Sorry, I don't know at all what the requirements are to run under ffdshow.

O.K. then, just write an OGMsource plugin for Avisynth and I'll be reconciled :D(right word?).

trbarry
21st June 2003, 19:07
kilg0r3 -

I tried with the file WoWMarchGameplay.avi from the Divx site and could not understand which problem you are referring to. Was that the right file?

And sorry, I don't have any idea how to do OGM programming.

In any event, I should release v 0.9.1 shortly that might help some folks, though probably not your specific problem.

- Tom

kilg0r3
21st June 2003, 19:51
Nope, I don't think it is officially available anylonger. Yet, the right file can be downloaded here (http://download.divx.com/showcase/WIII_5.02_v820_a128.avi)

trbarry
21st June 2003, 21:18
I just posted a new version that implements a Search effort parm like TomsMoComp to determine how hard it searches to find the best match. My own opion is to just use SE=3 for everything so far, like:

FrameDbl(255,3)

The smaller search improves performance and doesn't really seem to hurt the output. Plus there are fewer stray pixel artifacts with SE=3. See the readme file:

- Tom

@kilg0r3 -

I just downloaded the other file, but not in time to have any effect on this release.

kassandro
6th July 2003, 00:38
Simply doubling the frame rate by interpolating doesnīt make much sense for me: Most of the time Iīm watching movies on my notebook and its TFT display is so slow that doubling the frame rate would only turn on the cpu fan. However, I think doubling the frame rate and deinterlacing simultaneously makes a lot of sense especially for clips with a lot of action. Because unlike normal deinterlacing this kind of deinterlacing would be lossless and the original interlaced video could even be reconstructed.

trbarry
6th July 2003, 05:17
Both TomsMoComp (using a script function) or I think Neuron2's new DGBob can deinterlace and output 50-60 fps.

But I'm not aware of any deinterlace that could be considered lossless so I'm not sure what you mean there.

I mostly wrote FrameDbl as an attempt to get around the slightly jerky look of 24 fps movies. Most of us are used to it but it still doesn't look very realistic. And increasingly new computers can display 48 fps or more without working up much of a sweat.

I'm probably going to make a second attempt at this with some much more elaborate motion compensation.

- Tom

kassandro
6th July 2003, 07:37
What I understand under lossless is the following. For an interlaced video you have essentially 50 half frames with PAL and 60 half frames with NTSC. Thus if you want a clip with 50 fps or 60 fps you have to generate the other half of the frame from the previous full frame and from the current and the subsequent half frame we already have. Thatīs why one can easily reconstruct the old interlaced clip. If that can be done, it is justified to call it a lossless transformation. Now, if you a have a lot of a action and a fast display (even the TFT displays are reported to get much faster now), you have definitly a lot more detail and consequently better output quality.

morsa
6th July 2003, 10:54
I think that with a little more work it could be used as a slow motion filter.Great!!!
Motionperfect has really ugly effects!!

kassandro
6th July 2003, 11:41
I agree, such a smart slomo would be another nice application. That is probably the only time in history, where an interlaced has an advantage over a progressive source. Such a smart slomo from interlaced source should be much sharper than the ugly slomo, which we are used to from tv and which simply blends adjacent frames.

neuron2
6th July 2003, 15:21
Originally posted by morsa
I think that with a little more work it could be used as a slow motion filter.Great!!!
Motionperfect has really ugly effects!! It doesn't take any more work to get 50% slo-mo. Just use DGBob() in double-rate mode and then set the frame rate back in the AVI header using any of the available tools. I use this for my swimming instructional materials and, in fact, that is why I wrote DGBob().

Come to think of it, DGBob() should have an option to do that. EDIT: See below!

neuron2
6th July 2003, 15:23
Originally posted by kassandro
Such a smart slomo from interlaced source should be much sharper than the ugly slomo, which we are used to from tv and which simply blends adjacent frames. Or which simply duplicates fields.

neuron2
6th July 2003, 15:44
Originally posted by neuron2
Come to think of it, DGBob() should have an option to do that. DGBob 1.6.0 is now available. Use mode=2 to output a 50% slow-motion clip.

http://shelob.mordor.net/dgraft/dgbob/dgbob.html

scharfis_brain
6th July 2003, 16:01
IMO Motionperfect works a lot better, than trbarry's framedbl-filter.

His Filter blends the most of the picture, only a few parts are moved correctly.
But I hope this filter gets better in future.

kassandro
6th July 2003, 17:39
DGBob seems to do exactly that kind of frame doubling of interlaced clips which i wanted to have.

trbarry
6th July 2003, 18:14
For interlaced clips I definitely recommend using TomsMoComp (dbl script) or DGBob instead of FrameDbl, which assumes progessive.

- Tom

trbarry
6th July 2003, 20:03
While I haven't changed the DLL I noticed some of the doc was still giving examples with only one parm (invalid), so I updated it. Again, I recommend using FrameDbl(255,3) for most everything. (but not interlaced material)

In the same area of my downloads section I also posted a short (15 sec) high action Xvid sample of making a 48 FPS movie with FrameDbl. Sadly it's not quite HDTV because then nobody would be able to play it smoothly at 48 FPS. It already takes about a 2 Ghz+ P4.

- Tom

morsa
7th July 2003, 11:39
That is why I was talking about slow mo.I like making slow-mo from progressive!!

morsa
27th December 2003, 01:08
How about using a border detection code (like Msharpen has)on the first and following frame and then feed this borders as the mesh mask for Libmorph GPL library for morphing.