De-interlace again

RexA wrote on 9/27/2008, 10:46 PM
I know this has probably been covered multiple times over the years but a quick search didn't point me to a good formula. I'm only occasionally doing video these days and only check into the forum randomly. Seems Farss went through something similar with interlace issues recently.

A friend of mine had some old super-8 film converted to DV recently. This is some film from the 60's and the DV output is SD. The problem is that whoever did it, made 29.97 720x480 interlaced output with no attempt to synchronize. There are lots of horrible interlace smears throughout the video.

The best solution is probably to trash this DV and capture again with frame-by-frame, probably non-interlaced, techniques. Are any software tools worth trying on what I have? I'm assuming my best flow would be outside Vegas, maybe TEMPGenc with a plug-in. As I said, does anyone have a formula or pointer to a previous thread that might be worth trying on this bad DV file.

To explain the situation, the interlace issues roll in waves as the film and video sync become better and worse in a predictable pattern. If the film scene happens to be stable, no real problem. If the scene is moving, certain frames get horrible interlace artifacts as the fields are from different film frames. (I assume that's what I am looking at.) Here is a link to an example of a bad frame...
http://www.xertech.net/pub/Interlace_frame.jpg

Thanks for any advice, and my apologies for bringing back a subject that has probably been done many times before.

Comments

fldave wrote on 9/28/2008, 4:57 AM
Try rerendering a section to progressive, but make sure your Project Deinterlace method is set to "Interpolate" That will drop one whole field instead of trying to blend the two.

See if that clears it up.
RexA wrote on 9/29/2008, 4:50 AM
Try rerendering a section to progressive, but make sure your Project Deinterlace method is set to "Interpolate" That will drop one whole field instead of trying to blend the tw

That worked pretty well. Thanks.

Guess I should study up on what those deinterlace options mean. Not sure I completely understand what's happening.
SCS PBC wrote on 9/29/2008, 6:34 AM
Here's a nicely done and informative video:

The Joy of Interlacing
johnmeyer wrote on 9/29/2008, 7:07 AM
This has NOTHING to do with interlacing. It has everything to do with how the film was captured and then what was done do pad out the frames to get to 29.97 from 18 fps.

If you want to post five seconds of the original video somewhere, I'll take a look at it and see what can be done. If you want to do this yourself, what you want to do is use AVISynth or similar tool, use the Separatefields command so you get each field of video, and then see what is happening on a field-by-field basis.

I started a thread about six months ago asking whether deinterlacing is ever really needed, and the responses pretty much confirmed what I already believed, namely that the answer for those planning to watch the result on a TV set is NO.

What you are probably seeing is the result of either bad capture, or badly-done pulldown. The answer is NOT to deinterlace, but to use a tool call inverse telecine to remove the pulldown fields, getting back to the original 18 fps capture. You then re-insert the pulldown, this time properly. Since it sounds like the pulldown was done incorrectly, it will require a custom script to remove it, but that may not be that hard to do.


RexA wrote on 9/30/2008, 9:04 PM
John, good to know you are still around the forums.

I do think that the problems I see in this video are the result of a poor capture method. If I had it done myself, I would have wanted non-interlaced, 18 fps to get one straight frame of video per film frame. When I step through it in Vegas I seem to see the bad spots about every 3rd frame, assuming the image is not static.

So I started to capture about 5 seconds of a bad spot to post. After a day of trying and googling, I have decided I really don't know what I am doing. The good news is that I recognize that.

There are two problems in the capture task. 1st the DV file is a mov file. This seems to limit the tool set I can use to open the file. In Vegas I can put the file on the timeline and select a region. The problem is that if I render that to an AVI with default settings, the frames in the new clip seem to be not the same as the original.

Can you give me a formula for simply cutting a portion out of the mov file (I assume to an avi) without changing the encoding? For reference the information in the file is... Type: QuickTime Stream Video: 29.970 fps, 720x480x24, DV/DVCPRO - NTSC . There is an audio stream too, but it is empty.

Thanks for any further guidance you may be able to provide.
johnmeyer wrote on 9/30/2008, 10:25 PM
Unfortunately, I have done everything I can to avoid Quicktime, so I only have it installed on one computer so I can't give you a "for certain" answer. However, whenever I want to cut a video file which uses some "strange" codec, I always try to open it in Virtualdub. If you select "direct stream copy" it will do what Vegas calls a "smart render" and simply copy the cut portions of the video. So, that's one possibility.

The second thing I do when faced with these sorts of problems is head to the videohelp.com site and look at their guides.

Finally, if you can get the MOV onto the timeline in Vegas, right click on the MOV video event on the timeline and see what framerate it shows. Set your project settings to exactly match the framerate, the field order, pixel aspect ratio, and horizontal and vertical pixel size. If you then render, you should get the identical fields and frames. If you don't, use a codec like HuffYUV which can encode practically anything, unlike the Vegas DV codec which really doesn't like encoding strange framerates and pixels.
Sebaz wrote on 10/1/2008, 3:38 PM
If you can get a Canon camcorder with 24 fps and capture the Super 8 films with that, you would have much better results. I'm not saying it's the best method of course, there are far better but also more expensive. If you are on a budget, you can carefully align the projector and the camera, and use 24p and Cine Mode on a Canon and you should get decent results. Also, set the white balance on daylight, because if you leave it automatically on some poor quality films it will go towards the blue too much. With daylight on, it goes a little bit towards yellow, but it's easily corrected in Vegas with the color corrector. Any other white balance setting will be less optimal.

Depending on how good the film quality is you can get great color or terrible color. I recently transferred all my childhood Super 8 films and there were some from 76 that looked great, with vibrant colors, and some much newer that looked almost monochromatic because the film quality was bad.

I have a Canon HF100, but I suppose any Canon with 24p mode will work for this. Getting a new lamp for the projector is also a good idea, and the surface to be projected on must be as white and as clean as possible.
johnmeyer wrote on 10/1/2008, 7:03 PM
I haven't done transfers with a 24p camera, but if we are talking about projecting the film onto a screen and then photographing the result, I would think that 24p would be a bad idea. Bob (farss) may have more experience on this. The problem I would expect is that the film projector shutter closings (which happen at least three times for every frame of film) are going to blank out an entire section of a frame of progressive video whereas with 60i, it will only affect part of one field, and therefore be less noticeable, because the other field which makes up the frame will be completely intact. Also, since there is no sync between the camcorder and the film projector, I think you want the highest possible video capture speed to minimize the number of discrete video "objects" that will contain a blend of one frame of film and the next frame of film, something that is unavoidable with this form of film-to-video conversion.

But, if you've done it and it looks good, then that's all that matters ...

Sebaz wrote on 10/1/2008, 7:55 PM
Well, here's the thing, your theory might be correct, however I tested every frame rate and 60i is the worst, it produces a slow flicker that would probably give you a migraine in five minutes, then 30p is a little better but there's still flicker, and 24p is the best of the three. Of course if they made a camera with 18p I suppose that would be awesome, but I doubt any consumer camera would have that.

I will make a small clip of my footage and post it on Vimeo in the next couple of days so you can see what it's like.
farss wrote on 10/1/2008, 9:24 PM
It's not theory. Take a look at how a film scanner works. Advance film , scan, advance film, scan. Scanning film i.e. capturing it one frame at a time is a much simpler process than what is used in a telecine to transfer in real time to video. It's also much gentler on the film itself. Of course it takes longer, much longer but the process is simple enough to automate so it's set and forget.

Once you've got the discreet frames then you can do as you please with them using software.

[edit] If anyones interested in how to transfer film here's a great site on how to build your own film scanner:

http://www.super-8.be/s8_Eindex.htm

Sorry it's not all in English but you'll get the idea. You could spend a LOT of money on a serious commercial scanner and still get the same results.

Bob.
RexA wrote on 10/2/2008, 3:05 PM
A couple of things to update my status...

First, I completely agree with John and Farss that a frame by frame scan is the way the capture should have been done, but apparently wasn't on the video I have.

Next, I haven't posted more because dealing with the mov file is more challenging than I expected. Trying to import it into VirtualDub / Avisynch hasn't worked for me so far. The other people involved with the film/video don't seem to be too concerned about the frame issues I'm seeing and another person is going to do the editing, so I guess I won't do more now.

I did notice one curious thing as I was playing with the mov file. Apple Quicktime says that the video is 29.97 fps. I also played it in VLC which says it is 18.386503 fps. I am not sure what, if anything, to think about that.

One more question while we are on this topic. If I had an AVI that actually contained 18 fps frame-by-frame video from the super8, If I put that on the timeline, can Vegas be used to add pull down frames to take it to 24 or 30 fps? I was just reading about Cinecap. Seems that it could do the task.
johnmeyer wrote on 10/2/2008, 4:36 PM
If I put that on the timeline, can Vegas be used to add pull down frames to take it to 24 or 30 fps? I was just reading about Cinecap. Seems that it could do the task.Yes Vegas can do it. I prefer the result you get when you disable resample. This gives you true pulldown. Cinecap is even better. Personally, I use a script I wrote in AVISynth because it gives me exact control (you can do the pulldown in a number of different ways) and I know for sure that I'm getting exactly the correct result.

Here is my AVISynth pulldown script, showing all the options for various framerates which I frequently encounter. Remember that you always must alternate even and odd fields, even when you repeat fields (which is what pulldown is all about). If you include two even or two odd fields in a row, you'll get judder.




AssumeFrameBased

# Pulldown for 24 fps
#separatefields()
# SelectEvery(8, 0,1, 2,3,2, 5,4, 7,6,7)

# Pulldown for 18 fps using repeats normal-repeat-normal-weave-normal
#separatefields()
#selectevery(6, 0,1, 0,1, 2,3, 2,5, 4,5)

# Pulldown for 18 fps using all weaves normal-weave-normal-weave-normal (I like this the best)
#separatefields()
#selectEvery(6, 0,1, 0,3, 2,3, 2,5, 4,5)

# Pulldown for 18 fps using a technique in the Doom forums (seems to produce same as above)
#changefps(59.94)
#separatefields().selectevery(4,0,3)
#separatefields().selectevery(4,1,2)

#Pulldown for 16 fps using all weaves
separatefields()
SelectEvery(16, 0,1, 0,3, 2,3, 2,5, 4,5, 4,7, 6,7, 6,9, 8,9, 8,11, 10,11, 10,13, 12,13, 12,15, 14,15)

weave()
AssumeFPS(29.97, true)



farss wrote on 10/2/2008, 4:53 PM
Thank you John.
This has always been my stumbling block, how to go from 16/18fps to 24fps or in our case 25p/50i.

Bob.
johnmeyer wrote on 10/2/2008, 5:05 PM
This has always been my stumbling block, how to go from 16/18fps to 24fps or in our case 25p/50i.I could certainly write an AVISynth script to do the 25p to 60i conversion, if you want.

The key thing with Vegas, if you use if for this purpose, is to turn off re-sample. The reason for this is that you want to preserver exactly each field of the original film/video without any modifications, and create the additional fields needed to slow things down by duplicating existing fields rather than creating new ones by blending adjacent fields/frames, which is what resample does. If you let Vegas resample, you end up with something that looks a little "soft" and no longer has the film feels. If this is the sort of thing you want, then IMHO a much better solution is to use MVTools (in AVISynth) or Twixtor to actually synthesize "real" fields rather than blend fields. This yields a very interesting result, namely something that feels much more like video in that it has a very fluid, smooth feel to it, especially when the camera pans horizontally. In fact, I have used this technique on many occasions when I had footage that contained lots of horizontal pans (typically amateur movies) and the judder was beyond distracting. The difference is not subtle at all.
farss wrote on 10/2/2008, 5:28 PM
The idea of going from 18p to 25p using optical interpolation does sound attractive. It shouldn't destroy the filmic feel too much.
That said the only time I had something on 8mm that was worth the effort it was shot at 25fps by someone who knew what a tripod was for.

Thanks for the offer but I'm now really out of that game, have most of the parts to build a scanner like the one in the link I gave above. Tempting just for the heck of it. Thing is I'm pretty much tied up helping retrieve 100s of reels of 2" quad videotape and now I'm being sucked into a project to shoot and deliver 3D on a small budget with a couple of other Vegas users.

Now here's a thing. They can't afford cameras with genlock so the two video streams are out of sync. We could get around that by using optical interpolation. They seem to have been trying to use Vegas to do that but the resampling as you've noted doesn't do much for the resolution.

Bob.
johnmeyer wrote on 10/2/2008, 5:44 PM
Boy, I don't know how you can do 3D without having the left/right video streams perfectly in sync. I don't hold out much hope that motion estimation is going to get you what you want.

As for what film looks like when you use motion estimation instead of pulldown, I've provided a sample file below. The link is good for 7 days.

If you click on the link, you'll download a 28M mpeg-2 file which shows the results of using motion estimation on Super8 film This was one of the first film transfers I ever did, about seven years ago, and I used Motionperfect to do the 18 fps progressive (from Workprinter) to 29.97 interlaced conversion. For anyone accustomed to the judder you get with 18 fps Super8 when the camera pans, you will immediately understand how amazing this looks.

These were hand-held, and given how stable they look, I may also have done something with some form of motion stabilization, but I can't remember.

Please do NOT look, however, at the horrible color balance and contrast. It took me a long time to find the right software and techniques to be able to get somewhat reasonable results when transferring Kodachrome movie film to video. Even with those techniques, many of my current transfers still looks pretty contrasty.

Here's the link:

Super8 Pan Judder Corrected with Motionperfect
farss wrote on 10/2/2008, 6:16 PM
Thanks for the video, looks fantastic!

Regarding synced shutters.
You'd think they'd have to be in sync and yet the first 3D I cut was shot with 2x PD150s with a large interaxial and despite my objections about shutters not being in sync it came out OK. More recent attempts with two a1s shooting HDV show the same thing, the brain seems to cope. The question could be for how long before nausia sets in.

Biggest challenge to date has been getting a cheap screen that doesn't mess with the polarization. Best result so far is from aluminium paint straight onto bare masonite. Works better than expensive paint made for the purpose.

Bob.

johnmeyer wrote on 10/2/2008, 6:32 PM
Gee, I've never shot 3D, so I never considered the the problem of having the left/right video channels being shot with polarizers at right angles to each other. You'd end up with dark sky in one eye and bright sky in the other. So, I guess real outdoor shots won't work, although as I think about it, I guess you could rotate each polarizer so that they remain 90 degrees offset from each other, but at some point, the sky, or reflection, or whatever, would look the same.

I can see how paint, windows, and all sorts of other things would be an issue. Wow, a whole completely new set of constraints and challenges!

Good luck.
farss wrote on 10/2/2008, 6:59 PM
No, no. The polarizers are used on the projectors. You wear glasses with polarizing filters. The problem is that a lot of high gain screens destroy the polarizing.

Bob.
johnmeyer wrote on 10/2/2008, 8:10 PM
Brain freeze here. No need for polarizers until you view. I am stupid.
RexA wrote on 10/4/2008, 12:48 AM
If anyones interested in how to transfer film here's a great site on how to build your own film scanner:


Interesting stuff. I didn't see anything that didn't have an English translation on that page.

I found another DIY telecine page tonight
http://homepage.mac.com/onsuper8/diytelecine/index.html

The page seems to have pretty good detail on the general project concept and also refers to a French page with no translation but more details about optics between the projector and camera.

I may try this myself sometime soon. After all, I only have a dozen or two half-completed projects now.