PDA

View Full Version : convert 30fps video to *smooth* 24fps?


phædrus
23rd November 2003, 23:16
I've searched the forums quite a bit on the topic of converting the dreaded hybrids. I've tried DVD2SVCD using Don Graft's decomb with Decimate mode=3, which does a beautiful job of effectively inverse telecining filmed portions, and then it reduces NTSC 30fps interlaced video to 24fps by blending blocks of 5 frames into 4, but this still is noticeably jerky if an object is moving across the screen at a high speed.

I have not read anywhere about a method to translate 30fps interlaced video into a 24fps rate so that it will be perfectly smooth.

I am not a programmer, but conceptually what needs to be done for this to happen is to take each block of 5 30fps video frames, and then create 4 new frames by a process of interpolation (I hope that is the correct word), but do it in such a way that a moving object will move an even distance from frame to frame -- then there will be no jerking. To accomplish this, you'd have to weight the interpolation to give different weights to each frame. For example, you'd combine the first and second frames by interpolation into a new frame, but you'd weight the first frame much more than the second one. When you interpolate the second and third frames, you'd weight the second one just a bit more than the third. And so on. I worked out the exact percentages you'd have to use to weight each frame in every 5 frame block of video.

The total explanation of this would be lengthy, but I believe it would work. I don't know how this would be worked out in terms of an algorithm or how much processing power it would take, but if this could be achieved, not only would we be able to solve some of the problems of hybrid film/video DVDs, we could also convert pure video material down to a lower framerate, which would naturally increase the quality of any encode of given filesize.

Have I just reinvented the wheel? I've read a number of messages on this board, especially regarding hybrids, because there are a number of hybrid TV shows that I am interested in backing up on SVCD. Never have I heard of any program or plugin that will do this.

DDogg
25th November 2003, 01:45
The closest thing I have ever found is the script referenced in this post (http://forum.doom9.org/showthread.php?s=&threadid=65109) Thats nothing easily adapted to hybrid source, but it is the closest thing I have found to create 23.976 from true interlaced source without jerks. Maybe it is something you can play around with on a snip of your source. I only tried it on NTSC DV.

phædrus
25th November 2003, 04:57
That's cool, Ddogg. I'm sure it would work for pure video sources. I maybe have one pure video DVD in my collection, but I could try it on that.

I'm sure it would be smooth. But it does so by blurring.

Many people doing backups need some ability to deal with hybrid sources, though.

I don't even know if what I suggested is technically feasible. But if it was/is, it wouldn't involve blurring, so that's a plus. Then it would have to be integrated into some plugin that can handle telecined film and video in the same clip, treating them differently. A plugin like decomb500.dll, in other words.

Trahald
25th November 2003, 16:02
phaedrus - what you suppose is possible, but would a technical feat. a truely smooth and not blurry 30->24fps filter. its made more complicated by the fact that its really 60 fields per second to 24frames per second. either its going to be clear and jerky , or blurry and smooth(or somewhere in the middle). the intelegence of a filter needed to create 24 perfectly spatialy separated yet clear frames would be a bit much to ask someone to code for free. perhaps even for money.. hehe.. and actually if you really want a smooth result, you should just stick with the origional interlace and not deinterlace at all. ;)

phædrus
26th November 2003, 14:46
Thanks for the info w00kiee, I agree that the best compromise in dealing with hybrids, if they are 4:3 aspect ratio, is just to keep it interlaced. So programs like X-files, or Star Trek Next Gen, or Deep Space 9, would work perfectly for that. Of course, keeping 30fps, the quality is reduced.

However, if you have a 16:9 hybrid source like Babylon 5, if you keep it interlaced, then you have an SVCD that must be anamorphically stretched on output back to 16:9. I don't think most DVD players can do that. My WinDVD won't do that. Perhaps some other player would do that.

If you use the SVCD letterboxed 16:9 format, then you cant keep the original 480 lines, which means you can't keep the fields separated. You need some sort of smart IVTC for the film portions and if you wanted to reduce to 24fps, some smart interpolating on the video portions.

The other option is just to crop the sides, and encode the middle of the picture as 4:3. No stretching beyond the normal stretching will be needed on playback then, and you can keep the fields separate, because both input and output picture have 480 lines. Whether this can be done without losing too much picture depends on the source material. Babylon 5 was originally filmed in widescreen 16:9, but it was shown as 4:3 in USA. So, it is doable. Although, on a test I did recently, I found that the picture does not seem to be perfectly centered. Even the titles are not centered in the 16:9 frame. You have to crop more off the right side than the left to get the best centering and to lose the least significant parts of the picture. (I'm not a purist about keeping aspect ratios. I often watch 2:35:1 movies by magnifying them until they are about 1:85:1 and the ends of the movie run off the screen. I can't recall a time when I ever felt I lost anything useful or artistically siginificant that way. Personally I think 2:35:1 is just too skinny. Aesthetically I don't like it. The filmmaker's original intent be darned.)

I'm sorry to hear that you think turning this concept into an algorithm is so difficult. I know that decomb already has some kind of interpolation built in. In combed areas, you can choose parameters according to whether you want blending or interpolating for decombing. The instructions for this plugin state that interpolation is actually faster than blending for this particular function. Perhaps there might be an efficient way to do it after all. Hope springs eternal.

Trahald
26th November 2003, 19:35
his interpolation doesnt find a middle zone between 2 frames like youd think. it just chooses between the two fields which one it would like to keep. then doubles the verticle rez and smooths it out. this method is almost gauranteed to be jerky on scenes with some moderate to heavy motion. blending fields takes both fields and puts them on each other so the static areas appear fine but the motion areas appear at 50% (causes them to look blurry) but alot more smooth motion wise.

to do what you want and to appear clear, the middle ground (well not exactly middle since we are weighting 5 frames) would have to be found. this would result in a perfect 24fps.. coding something like that is very difficult and would require some serious intelligence on the filters part.