Page 1 of 1

Motion Interpolation

Posted: 25 May 2008 04:57
by twister_nt
VLC is is an amazing piece of software, but it is missing a type of video processing that makes a significant difference in playback quality: "Motion Interpolation".

Motion interpolation improves the playback quality of just about ANY video file by increasing the number of frames displayed per second. These extra frames are created by blending or shifting two existing frames, increasing the FPS from 29.9 to 60.

Image

Video is noticably smoother to watch; and I have recently become a fan of this type of video processing. As any gamer would agree, there is a startling difference playing a video game at 30fps vs 60fps; and this difference is distinctly seen in the playback of motion interpolated video. You can see the difference for yourself for free by using http://www.crystalplayer.com/home/home/ ... ype=cp_pro (Remember to enable "Motion Morphing" in the options menu).

I am currently using crystalplayer as my main OS movie player, but it suffers from codec limitations AND KEEPS CRASHING!

Would it be possible for this feature to be added to VLC?

Please see http://en.wikipedia.org/wiki/Motion_interpolation for more information on this technique, and http://www.crystalplayer.com/cp/?feature=multisampling for a graphical example.

Cheers!

Re: Motion Interpolation

Posted: 25 May 2008 08:00
by Jean-Baptiste Kempf
This is a very interesting feature request...
Have you tried looking at VLC code ?

Re: Motion Interpolation

Posted: 25 May 2008 16:46
by CloudStalker
Sounds pretty cool. Tell CloudStalker, does this use that much more processing power then if the feature weren't enabled?

Re: Motion Interpolation

Posted: 25 May 2008 21:50
by twister_nt
Thanks for your speedy responses. Using crystal player as a benchmark, I checked the cpu usage of Motion Interpolation being enabled VS disabled. Here are my results:

Disabled = 2.31% Max Cpu Usage
Enabled = 5.47% Max Cpu Usage

This is on an AMD 9600 phenom processor with 4 GB RAM, indicating a modest increase in CPU usage with significant gains in video realism.

Do you think it will be possible to encorporate Motion Interpolation into a future version of VLC?
Is there anything else I can do for you?

Thanks!

Re: Motion Interpolation

Posted: 25 May 2008 22:07
by Jean-Baptiste Kempf
I don't know if someone will work on that, but it is possible.

Re: Motion Interpolation

Posted: 25 May 2008 22:15
by VLC_help

Re: Motion Interpolation

Posted: 25 May 2008 23:48
by CloudStalker
viewtopic.php?f=7&t=42137&p=131849&hilit=120+fps#p131634
should be about same request.
Hmm, CloudStalker heard that they're different, lemCloudStalker find where, maybe it was a magazine or something.

Re: Motion Interpolation

Posted: 06 Jul 2010 13:08
by webjames
I'd like to see this feature. I'm using a mac and as far as i know this would be a platform exclusive if VLC implemented this.

Re: Motion Interpolation

Posted: 26 Aug 2010 12:57
by JDou
Please see http://en.wikipedia.org/wiki/Motion_interpolation for more information on this technique, and http://www.crystalplayer.com/cp/?feature=multisampling for a graphical example.
Cheers!
Something similar could be implemented into VLC with GPU acceleration? Coz the below works for me, with my AMD 4400+ x2, but only on SD video... It is quite process intensive, but im betting a well made VLC motion interpolation implementation will work better. I have been using is Windows Media Player, K-Lite mega codec pack, MVTools version 2, Avisynth 2.5.8 and MT for Avisynth 2.5.8.

Avisynth 2.5.8 (http://sourceforge.net/projects/avisynth2/files/) *update working link*
MT for Avisynth 2.5.8 (http://www.mediafire.com/?zy2xm2ejvzg) *update working link*
ffdshow (http://www.free-codecs.com/FFDshow_download.htm) or K-Lite mega (http://www.free-codecs.com/download/K_L ... c_Pack.htm)
MVTools version 2 (http://avisynth.org.ru/mvtools/mvtools2.html#version2)

The following is only a graphical example, but would love to see this in VLC...

1. Place MVtools2 into the Avisynth/plugins folder.
2. Place MT.dll into the Avisynth/plugins folder. MT.dll is for people who can multithread.
3. The avisynth.dll is then placed into the Windows/system32 folder.
4. Enable avisynth in ffdshow settings. Uncheck the RGB24 and RGB32 checkboxes. Uncheck add ffdshow video source.
5. Paste one of the following scripts into the script window.

--------------------------------------------------------------------------------------------------------------
Script for DUAL-CORE processors (Buffer back 0, Buffer ahead 8):
--------------------------------------------------------------------------------------------------------------
SetMemoryMax(1080)
SetMTMode(3,4)
ffdShow_source()
SetMTMode(2)
#change pel=1 to pel=2 if you have enough power left; however max CPU load should not exceed 75%;
super=MSuper(pel=1, hpad=16, vpad=8)
#change searchparam=1 to 2 or 3 if you have no artifacts; The higher the number, the smoother it is;
backward_1=MAnalyse(super, chroma=false, isb=true, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
forward_1=MAnalyse(super, chroma=false, isb=false, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=16, blksizev=8, searchparam=1, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=16, blksizev=8, searchparam=1, search=3)
MBlockFps(super, backward_2, forward_2, num=FramerateNumerator(last)*2, den=FramerateDenominator(last)*1, mode=2)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
--------------------------------------------------------------------------------------------------------------
Script for QUAD-CORE processors (Buffer back 0, Buffer ahead 12):
--------------------------------------------------------------------------------------------------------------
SetMemoryMax(1080)
SetMTMode(3,8)
ffdShow_source()
SetMTMode(2)
#change pel=1 to pel=2 if you have enough power left; however max CPU load should not exceed 75%;
super=MSuper(pel=1, hpad=16, vpad=8)
#change searchparam=1 to 2 or 3 if you have no artifacts; The higher the number, the smoother it is;
backward_1=MAnalyse(super, chroma=false, isb=true, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
forward_1=MAnalyse(super, chroma=false, isb=false, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=16, blksizev=8, searchparam=1, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=16, blksizev=8, searchparam=1, search=3)
MBlockFps(super, backward_2, forward_2, num=FramerateNumerator(last)*2, den=FramerateDenominator(last)*1, mode=2)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
--------------------------------------------------------------------------------------------------------------

Adjustment:

If you want to watch all movies in 60fps or 50fps (or whatever your Monitor's Hz rate is) here is what you have to do:

To get 60 fps
change
MBlockFps(super, backward_2, forward_2, num=FramerateNumerator(last)*2, den=FramerateDenominator(last)*1, mode=2)
to:
MBlockFps(super, backward_2, forward_2, num=60, den=1, mode=2)

To get 50 fps
change
MBlockFps(super, backward_2, forward_2, num=FramerateNumerator(last)*2, den=FramerateDenominator(last)*1, mode=2)
to:
MBlockFps(super, backward_2, forward_2, num=50, den=1, mode=2)

Cant remember all sources but main one was: http://www.avsforum.com/avs-vb/showthread.php?t=1025800

Re: Motion Interpolation

Posted: 28 Nov 2010 08:48
by jonidimo
There is no news about this ? i'm on windows 7 64 bits, when I play hd movies the codec ffdshow doesn't appear but I installed. I tried on VLC and Media player classic 64. It appears codec: h264mpeg- avc

Re: Motion Interpolation

Posted: 29 Nov 2010 15:57
by VLC_help
FFDshow cannot be used with VLC.

Re: Motion Interpolation

Posted: 23 Jan 2012 00:48
by ArJunaBug
Motion interpolation is NOT quite what you think it is. It is not capable of creating new images to add in between the frames of a movie, at least not to the extent you indicate. The problem it improves is the "choppyness" of watching a movie on a monitor that normally refreshes the image at 60hz. Typically, movies are 24 frames per second (FPS). When the TV has to display the 24 fps on a display refreshing at 60 fps it will more or less display the frames twice in a row to fill in the gaps. The problem is that 24 does not divide into 60 very well, so you end with some frames having to be displayed for 3 frames. This causes a noticeable jerkyness in the image. The 120hz & 240hz technologies essentially give you more frames to divide into making the image appear more fluid. There is SOME "interpolation, but this is on a pixel level only. The technology can create intermediate images by comparing and averaging the pixels between frames making it a bit more smooth. 120hz refresh improves the jerkyness, 240 is even better because 24 frames divides quite nicely into 240. Again, the images that interpolation creates will be barely different than the original movie frames, but not enough to create a horses leg in another place entirely between two frames of fast motion as you seem to indicate in your graphic.

That said, it would be nice if VLC would do this. Since your PC is already doing the 59-60hz conversion before the video signal gets to your monitor, it is not likely the monitor, even if it has this technology, will improve the fluidity of the images. It would have to be done in the player.

Re: Motion Interpolation

Posted: 08 Mar 2012 10:15
by Saucistophe
You, my dear sir, made me register just to reply to this.
"It is not capable of creating new images to add in between the frames of a movie"
So, the motion interpolation, does not, well, interpolate anything?

Also, the "simple pixel interpolation" DOES exist (can't remember which player did that...) but is simply awful, leaving ghost images and blurry movements.
Just like watching a video on the first cheap LCD screens available 10 years ago.

I'm not yelling at you at all, but this issue must be made clear, because, for a reason I don't quite get, some people don't physically see the difference between 24 and 60 hz.
On every forum there are guys telling that the problem is not the number of frame, that motion interpolation is useless, etc.

My eyes water on 24 fps videos. I love VLC but had to move to Corel WinDVD. I really hope this feature comes soon!

Re: Motion Interpolation

Posted: 09 Mar 2012 23:48
by messiahandrw
There are a couple of open freely available algorithms for performing good motion interpolation (e.g. http://monochrome.sutic.nu/2010/10/12/m ... ation.html) however it is far too computationally heavy for use in real-time.

I wouldn't mind it if when I download a video clip off the Internet, I ran a tool overnight which preprocessed the motion interpolation at high quality, spitting out a smooth 60fps video. (Over course, I wonder how many CPUs/GPUs could decode high quality 1080p60 in real time.)

For example, this could be a hypothetical tool that used libvlc to decode a video frame by frame, apply interpolation at your desired framerate, then re encoded the frames in the exact same source format (albeit with a higher framerate). Such a tool could be ran from the command line like:

Code: Select all

vlc-upscale.exe dancing-rabbits.mkv dancing-rabbits-85fps.mkv 85
Then you could play the outputted file it in VLC player at real time with no interpolation having to be done during playback.

Here is an example of video captured at 60fps and upscaled to 1000fps (then played back at 60fps so it appears to be playing smoothly in slow motion): http://vimeo.com/13557939 You could apply the same technique to 24fps->60fps.

Re: Motion Interpolation

Posted: 26 Nov 2012 21:48
by rogerdpack
Related discussion here: viewtopic.php?f=7&t=42137

Re: Motion Interpolation

Posted: 27 Aug 2013 19:05
by mng519
Yeah, ArJunaBug, not quite correct. Just because you have a 60hz monitor, that doesn't mean you get frame doubling to fill in the gaps. You are still only viewing @ 24fps if that's the source frame rate. A 60hz monitor is capable, though, of showing 60fps. I suggest anyone who is interested to try SVP Smooth Video Project. Will solve all problems with smooth video. Of course, you need a good cpu & gpu. And yes, it really does work, to the extent that you would think. One more note, not really sure how much you would really notice smoothness beyond 60fps. I tried the software @ a friend's house w/a 120hz tv and only got 60fps anyway, not sure if it actually goes any higher than that for real.

Re: Motion Interpolation

Posted: 08 Sep 2013 12:26
by Matt Kirby
I had nearly the same idea but just for better slow motion

https://forum.videolan.org/viewtopic.php?f=7&t=112814

Re: Motion Interpolation

Posted: 13 Sep 2013 04:18
by isamu
Please add motion interpolation to VLC :(

Re: Motion Interpolation

Posted: 16 Sep 2013 14:52
by Jean-Baptiste Kempf
Please send patches :)

Re: Motion Interpolation

Posted: 20 Sep 2013 01:27
by dante157
splash pro already does but I want to vlc will add this possibility in a function that turns on and off at home haci who does not like to turn it off and go all happy

Re: Motion Interpolation

Posted: 20 Sep 2013 12:48
by Matt Kirby
and when the pal FPS-rate ist pumped up to 50 fps I want to slow down it to 33.333 fps and all are happy :)

let's collect donations