Log in

View Full Version : High Speed Film to Video Transfer Machine -- Need IVTC Help


Pages : [1] 2

johnmeyer
4th February 2006, 21:53
I'm transferring 16mm film to video. I have an 8mm Workprinter, which captures one frame at a time, but at very slow speed.

I had a brainstorm: Remove the shutter from a 16mm projector, set the "shutter speed" on my video camera to 1/1000 second, capture the video, and then process with IVTC software. A sketch of the relative timing of the film and the video camera shows that no matter what the relative timing of the projector and the camera (they cannot be synchronized), I can be absolutely assured of the camera taking two complete fields (one frame) for every frame of film. Depending on where the film is in its pulldown cycle, the next field after the two good ones will either be: 1) A third duplicate; 2) The film during its pulldown cycle, which will not match either the film frame before or the film frame after; 3) The next frame of film.

I have tried the normal Telecide() Decimate() routines because I thought that the captured video would be virtually identical to video that contained 3:2 pulldown film. However, I have not been able to get this to work. I can use SeparateFields to look at each individual field, and indeed what I expected in theory is indeed what I have captured in practice.

I really do think that this invention will let me capture film a frame at a time, but at full 24 fps speed. However, I need some ideas, guidance, or help on what I should try next.

I have thought of building a script using motion estimation software, like MVTools, to do my own field matching and decimation and ultimately that's what I may have to do. However, it sure seems like this software -- perhaps with FDecimate instead of Decimate -- should be able to do the trick.

With the Show=True in the Telecide filter, I get four good recovered frames. Then, either the fifth or sixth frame (not consistent because the projector is slightly slower than 24 fps), I get an interlaced frame (as reported by Telecide) which needs to be discarded. However, about every fifth group of five frames, I instead get a duplicate frame (because the unique frame captured during pulldown is skipped). This frame should also be discarded.

One last piece of info: Even with a synchronous AC motor in my Eiki projector, the film is not exactly 24 fps, so the pattern doesn't exactly repeat. Therefore the software has to adapt, which of course is the heart and soul of this smart IVTC software.

Backwoods
5th February 2006, 01:43
Can you post a sample?

rfmmars
5th February 2006, 03:10
I'm transferring 16mm film to video. I have an 8mm Workprinter, which captures one frame at a time, but at very slow speed.

I had a brainstorm: Remove the shutter from a 16mm projector, set the "shutter speed" on my video camera to 1/1000 second, capture the video, and then process with IVTC software. A sketch of the relative timing of the film and the video camera shows that no matter what the relative timing of the projector and the camera (they cannot be synchronized), I can be absolutely assured of the camera taking two complete fields (one frame) for every frame of film. Depending on where the film is in its pulldown cycle, the next field after the two good ones will either be: 1) A third duplicate; 2) The film during its pulldown cycle, which will not match either the film frame before or the film frame after; 3) The next frame of film.

I have tried the normal Telecide() Decimate() routines because I thought that the captured video would be virtually identical to video that contained 3:2 pulldown film. However, I have not been able to get this to work. I can use SeparateFields to look at each individual field, and indeed what I expected in theory is indeed what I have captured in practice.

I really do think that this invention will let me capture film a frame at a time, but at full 24 fps speed. However, I need some ideas, guidance, or help on what I should try next.

I have thought of building a script using motion estimation software, like MVTools, to do my own field matching and decimation and ultimately that's what I may have to do. However, it sure seems like this software -- perhaps with FDecimate instead of Decimate -- should be able to do the trick.

With the Show=True in the Telecide filter, I get four good recovered frames. Then, either the fifth or sixth frame (not consistent because the projector is slightly slower than 24 fps), I get an interlaced frame (as reported by Telecide) which needs to be discarded. However, about every fifth group of five frames, I instead get a duplicate frame (because the unique frame captured during pulldown is skipped). This frame should also be discarded.

One last piece of info: Even with a synchronous AC motor in my Eiki projector, the film is not exactly 24 fps, so the pattern doesn't exactly repeat. Therefore the software has to adapt, which of course is the heart and soul of this smart IVTC software.

Are these commerical 16mm or home 16mm movies? If they are home 16mm your hitting your head against the wall because consumer cameras are not persision cameras, they are either spring motor or battery operated and are not constant speed, so you will have always some blended fields, no way around this. A frame at a time is the only way to go.

Richard
www.photorecall.net

johnmeyer
5th February 2006, 03:40
they are either spring motor or battery operated and are not constant speed, so you will have always some blended fields, no way around this. A frame at a time is the only way to go.

If I was doing a capture with a 3- or 5-bladed shutter, you would be correct. However, I am doing something completely different here. I have removed the projector shutter and am capturing using a very high shutter speed on the video camera (1/1000 of a second). Therefore, there are no blended frames. There can't be. The resulting video is very similar to telecined video -- although not exactly the same, hence this post. Thus, whether the original video was shot at 15, 18, or 24 fps, or whether the camera or projector are constant speed don't really matter, except that the IVTC algorithm can't rely on the "pulldown pattern" being exactly constant (it never can even with telecined film, but this is even tougher).

I am quite certain that the film can be IVTC'd. I'm working on uploading a sample. I should have it shortly.

johnmeyer
5th February 2006, 03:43
OK. Here's a link to a 14.9 MB 3-sec NTSC DV AVI clip. This is exactly as it was captured, with no modifications at all. The link will take you to my Yahoo briefcase page. You will then need to click on the "film to video test" link to download the clip (I can't post a direct link to it).

http://briefcase.yahoo.com/bc/john_meyer77@sbcglobal.net/lst?.dir=/Video&.view=l

rfmmars
5th February 2006, 05:10
they are either spring motor or battery operated and are not constant speed, so you will have always some blended fields, no way around this. A frame at a time is the only way to go.

If I was doing a capture with a 3- or 5-bladed shutter, you would be correct. However, I am doing something completely different here. I have removed the projector shutter and am capturing using a very high shutter speed on the video camera (1/1000 of a second). Therefore, there are no blended frames. There can't be. The resulting video is very similar to telecined video -- although not exactly the same, hence this post. Thus, whether the original video was shot at 15, 18, or 24 fps, or whether the camera or projector are constant speed don't really matter, except that the IVTC algorithm can't rely on the "pulldown pattern" being exactly constant (it never can even with telecined film, but this is even tougher).

I am quite certain that the film can be IVTC'd. I'm working on uploading a sample. I should have it shortly.


My question is how do you know that the frame is stopped and centered when you take the 1/1000 sec exposure? Without some type of sync circuit, how are you eliminating capture frames when the film is advancing?

Thanks for posting the clip.

Richard

rfmmars
5th February 2006, 05:15
OK. Here's a link to a 14.9 MB 3-sec NTSC DV AVI clip. This is exactly as it was captured, with no modifications at all. The link will take you to my Yahoo briefcase page. You will then need to click on the "film to video test" link to download the clip (I can't post a direct link to it).

http://briefcase.yahoo.com/bc/john_meyer77@sbcglobal.net/lst?.dir=/Video&.view=l

The link isn't correct

See
http://briefcase.yahoo.com/bc/john_meyer77@sbcglobal.net/lst?.dir=/Video& (http://briefcase.yahoo.com/bc/john_meyer77@sbcglobal.net/lst?.dir=/Video)

Richard

johnmeyer
5th February 2006, 05:25
My question is how do you know that the frame is stopped and centered when you take the 1/1000 sec exposure? Without some type of sync circuit, how are you eliminating capture frames when the film is advancing?

I'll admit that what I'm doing is pretty unconventional and therefore may not be immediately obvious. If you draw a timeline and put tick marks every 1/24 second, that represents the timing for the film. Now about 12% of the way into each 1/24 second frame, put a little tick mark. The point between the start of each frame and that tick mark is the pulldown, when the film is moving. The rest of the time, the film is stationary.

Now, above that timeline, place a dot every 1/60 of a second. Each dot represents the capture of one field of video. You need two fields of video to get a complete frame. If you stare at these two timelines, you'll eventually realize that no matter when the camera happens to take its two fields relative to when the film comes to rest (because, as you point out, the projector and the video camera are in no way synchronized), the camera will ALWAYS be able to capture two good fields of every frame of film.

Now, the trick -- and the whole purpose of this post -- is to figure out what to do with the "extra" fields that are captured. Sometimes you will get a field that is captured while the film is moving. Sometimes you will get a third field that duplicates the previous two. Those need to be discarded.

I thought up this whole scheme a month ago and have been working on it for some time. Everything is working exactly according to theory, and all I have to do is figure out how to either modify Decimate() or FDecimate() so they will do what I want, or else write my own decimation code (which I can do, but would like to avoid, since lots of sharp people have written some pretty smart decimation code that can handle exactly this sort of problem).

johnmeyer
5th February 2006, 05:35
The link isn't correct

If you get a Cannot Find Server message, press the retry button on your browser to retry the link. Yahoo Briefcase is finicky. I just clicked on the link above (the one in your email) and did indeed get a Cannot Find Server error. I just clicked on retry and was connected.

If you have any suggestions of a more reliable, free place to upload my clip, I'll gladly upload there.

johnmeyer
5th February 2006, 22:19
That link I provide does work -- but apparently only sometimes. Here is a link to my own website. This will download just by clicking on the link:

http://www.themeyersite.com/Sounds/film_to_video_test.avi

Not the fastest server in the world, but it shouldn't take too long. Thanks for being patient.

Also, thanks in advance for any help that any of you can provide!

rfmmars
6th February 2006, 04:16
My question is how do you know that the frame is stopped and centered when you take the 1/1000 sec exposure? Without some type of sync circuit, how are you eliminating capture frames when the film is advancing?

I'll admit that what I'm doing is pretty unconventional and therefore may not be immediately obvious. If you draw a timeline and put tick marks every 1/24 second, that represents the timing for the film. Now about 12% of the way into each 1/24 second frame, put a little tick mark. The point between the start of each frame and that tick mark is the pulldown, when the film is moving. The rest of the time, the film is stationary.

Now, above that timeline, place a dot every 1/60 of a second. Each dot represents the capture of one field of video. You need two fields of video to get a complete frame. If you stare at these two timelines, you'll eventually realize that no matter when the camera happens to take its two fields relative to when the film comes to rest (because, as you point out, the projector and the video camera are in no way synchronized), the camera will ALWAYS be able to capture two good fields of every frame of film.

Now, the trick -- and the whole purpose of this post -- is to figure out what to do with the "extra" fields that are captured. Sometimes you will get a field that is captured while the film is moving. Sometimes you will get a third field that duplicates the previous two. Those need to be discarded.

I thought up this whole scheme a month ago and have been working on it for some time. Everything is working exactly according to theory, and all I have to do is figure out how to either modify Decimate() or FDecimate() so they will do what I want, or else write my own decimation code (which I can do, but would like to avoid, since lots of sharp people have written some pretty smart decimation code that can handle exactly this sort of problem).

I want to thank you for taking another fork in the road not traveled. I am going to study this very closely.

One way you may want to detect the moving frame is the the vertical resolution will drop off the chart, this should be the key.

Thanks for making me think.

Richard

johnmeyer
6th February 2006, 04:25
So far, detecting the frames with Telecide() works perfectly. The frames that it reports as interlaced ALL should be discarded, and the frames that it reports as duplicates should be discarded. The only thing missing is figuring out how to use an existing decimation routine -- like Decimate() or FDecimate() -- or one that I write, to take that information and delete the frames. I think that Telecide() can be made to pass information to other routines, but I'm not quite sure what the interface might be.

I'm so close to having this work. Hopefully with a couple of hints I can finish this off. I've have about 50 hours of films waiting to be transferred (and that's just the start).

Thanks for you input and help.

Mug Funky
6th February 2006, 04:37
this is quite ingenious. rfmmars has a good point about vertical resolution. a modified comb mask (that takes a wider area into account) could be used to detect these frames. scenechange detection could also be useful, but would drop fields on actual scenechanges.

also, i haven't spotted a ratio of blurred fields to good fields as yet. i'm sure one exists, but it might vary by quite a bit. so it might make more sense to output a copy of the last good field and then decimate in a separate step (this would also make scripting a solution much easier - avisynth's conditional environment isn't able to arbitrarily remove frames. input framecount and output framecount must be equal).

i can imagine a reasonably simple method of detecting and replacing "blurs", and then decimating using a regular decimator plugin like decimate or tdecimate or whatever.

this would also mean A/V sync isn't an issue.

johnmeyer
6th February 2006, 07:03
The moving frame isn't really the way to do any detection, because it is possible to happen to take the 1/1000 second capture just at the beginning or end of the pulldown, in which case the error will be rather slight. Instead, the way to do this is to have a routine that "syncs up" to the pattern using field matching. This is easy because there are two ways to sync up. First, when one field is completely different from the next, you know you have crossed into a new frame or film, or into the film pulldown area. If the next field after that "matches," then you are within a frame of film and those two fields should be chosen. If the field after that one matches also (which happens once in awhile, then you take the better match between fields one and two, or fields two and three, and use those two fields to make a frame.

The second way to sync up is to look for situations where one field is totally different from both the field before and the field after. This clearly is a pulldown field, and should be discarded. The next two fields will always be good.

The Telecide() function that is part of Decomb is detecting everything perfectly and is giving me all the information I need to make this work. The problem is that I can't get any decimate function to use this information to take the proper action and throw away the frame. If you use this code:

converttoYV12(interlaced=true)
AssumeBFF()
Telecide(show=true,guide=0,post=1)

and step through the video, you'll see that Telecide() shows "interlaced" every time the film pulldown is captured. In addition, every time the relative timing causes the video capture to miss the pulldown and instead show a third duplicate field, it properly reports this by changing from "n" to "c" (next to current). Any time this happens, the frame should be discarded. If I can hook into that information, I can decimate properly and I'm home free (I think).

foxyshadis
6th February 2006, 07:26
TFM should be able to match Telecide's prog/interlaced decisions, and it has a "clip2" parameter so that you can supply your own output for interlaced frames. Maybe a blankclip(last) or blankclip(last,color=$0000FF) or even colorbars, something you can easily detect and delete. Then you can decimate away spurious duplicates, which hopefully might even show some pattern.

I don't know if a filter exists such as

tfm(clip2=colorbars)
removefrom(last,colorbars)

I have the right pieces to build it efficiently, I'm just a filter novice still. ^^;

johnmeyer
8th February 2006, 01:55
Thanks for the TFM tip. I am getting close using this script:

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
AVISource("E:\Film\Film Test.avi")
converttoYV12(interlaced=false)
AssumeBFF()
tfm(display=false,mode=5,pp=1,cthresh=16,mi=125,debug=false)
tdecimate(debug=false,display=false,cycleR=7,cycle=38)

However, it is not quite perfect. The problem is that IVTC software has to make allowances for the fact that the pulldown pattern may change. In this application, the pattern will never change, but because of the drift between the projector speed and the video camera capture speed, the duplicate or the combed frame happens either every five, or every six frames. 98% of the time, the combed frames are easy to spot because one of the fields is the film while it is moving. This doesn't match either the previous or next field and tfm reports it as interlaced with a value of 255. However, once in awhile, the film has just started to move or is just about to finish moving, so the combining is not too obvious. However, this always happens on the fifth or sixth frame.

So, in a nutshell, what would be ideal is to use the combining values of 255 as a way to reset the cadence (so the thing can sync up at the beginning of the film). From that point on, the next four frames can absolutely, positively be guaranteed to be progressive. Then, one of the two next frames is either going to be massively combed or, if the timing between camera and projector is just right, it will be a third duplicate (TFM matches the third duplicate field with the previous field). In either case, that's the one to decimate.

Thus, what I want to do is somehow figure out how to communicate with TFM from within a script and write my own decimation code that smartly deletes the fifth or sixth frame, but never touches the next four.

Guest
8th February 2006, 02:09
Thus, what I want to do is somehow figure out how to communicate with TFM from within a script and write my own decimation code that smartly deletes the fifth or sixth frame, but never touches the next four. I think you'd be better off starting from (say) the Decimate() source code, and adding your own intelligent modes.

johnmeyer
8th February 2006, 05:07
Problem is, the last time I compiled anything in C was 1995. Most of my programming at this point is VB, scripts, jscript -- basically small stuff. My old compiler won't work.

foxyshadis
8th February 2006, 05:30
If you're willing to install .Net 2, VS2005 express (http://msdn.microsoft.com/vstudio/express/visualc/) is free. You should be able to load and compile decomb immediately, and make changes from there.

johnmeyer
8th February 2006, 18:14
Didn't know about that. It requires SP2, which my new laptop has. I'll see what other things it requires.

BillB
2nd December 2006, 18:06
I realize you guys are into this deep, but I have to stick in my 1.5 cents worth. To get my 8mm and 16mm films into AVI or Mpeg file, I simply use the old mirror reflector box and project the film to the mirror and record that image to my Video Camera. Then dump the video to my computer to play with.
It isn't a Kodak lab set up, but I get results good enough to show on a TV.
BillB

johnmeyer
2nd December 2006, 18:29
I simply use the old mirror reflector box and project the film to the mirror and record that image to my Video Camera.

Yup, that's the way most people do it, and as you've found it works pretty well. The problem is that you lose a lot of clarity due to the fact that most video frames are a blend of adjacent frames of film. However, for many projects, this is not that big a deal.

One piece of advice when using this technique is to pay attention to the shutter speed used. You want to use the slowest shutter speed on your video camera that still permits you to achieve the normal 29.97 fps. If you inadvertently use a fast shutter speed, as you might for sports video, you'll end up with a fine mess.

Here's probably the most common link given to people who want to do transfers themselves and who want to make sure their technique is correct. I think you'll find it useful:

http://www.filmshooting.com/telecine/index.php

It is a little out of date, since it doesn't mention the Workprinter. Also it doesn't give you much information on exposure. Regardless of he tehcnique used, when you are actually capturing, you need to manually "ride" the exposure on your video camera to make sure the highlights don't get "blown out." This is ESSENTIAL. If your video camera has zebra patterns that identify overexposed portions of the video, they really help. Lacking that, use an external monitor when doing the capture, and when detail disappears from the highlights, turn down the exposure. If the picture looks way too dark, turn up the exposure. You'll almost always have to fix exposure and color balance in post production anyway.

Don't ever let the highlights get overexposed when doing film transfer.

jmac698
2nd December 2006, 18:57
Yay! Finally an opportunity for my HDR video in avisynth idea. Could you do a test with two captures; one with exposure set to always show detail in bright areas, one with overexposure to show dark areas. I will write you a filter/script to put the two together. I plan on using two clips to store 16bit video.
I can do many things better as well; if you can get hold of a true black/white camera (like a security camera), then use 3 color filters and capture 3 times; I can get you HD video.
Finally you should know there are programs to correct the geometric distortion from the lens. In the end, I could get you scanned film like quality.
As far as IVTC, I think this should be a simple problem; you have detected the badframes and just need to remove them. The key is the script() function which many people don't know how to use, but it lets you do something on a frame by frame basis.
That's what the IsCombed() function in decomb package is for.
Let me test this and get back to you; I can also write my HDR script on synthetic tests for now.
This is going to be fun ! :)

jmac698
2nd December 2006, 19:09
another idea: if you use 60fps as in "sports mode" that some cameras have now, you would only have to find duplicated frames and output one example only. Messed up frames would never have a duplicate. It just might be an easier way to write a script.

johnmeyer
2nd December 2006, 20:18
BTW, I never posted, in this thread, the results of my work.

The results are spectacular, and the process works very well. I have now transferred over 100 cans of film for various people. Some of the work is posted on YouTube, under the same user name I use here. I have been lucky enough to find some real gems in the 16mm film people have given me to transfer, including a 6-minute sequence of the 1929 Chicago- Philadelphia World Series game from Wrigley Field.

For sports, doing frame-by-frame transfers, which my process allows, lets you freeze frame any single frame, which is great for slow-mo.

Also, when doing 50 cans of film at one time, it sure is nice to be able to run at full speed, instead of 6-9 fps like my Workprinter does.

jmac698
2nd December 2006, 20:34
AVISource("C:\MyVideos\film+to+video+test.avi")
converttoYV12(interlaced=false)
AssumeBFF()
#uncomment to put black in badframes
#conditionalfilter(last,blankclip(0,width=720,pixel_type="YV12"),last,"IsCombedTIVTC","=","true")
#The following is supposed to return clean frames
#only but doesn't work
v=last
ScriptClip( \
"IsCombedTIVTC(v)?Trim(v,clean,clean):Trim(v,current_frame,current_frame)"+chr(13)+ \
"subtitle(string(current_frame)+string(IsCombedTIVTC(v)))" +chr(13)+ \
"clean=(IsCombedTIVTC(v)==true) ? 0:current_frame" +chr(13)+ \
"return(last)" \
)

BillB
3rd December 2006, 14:23
The mirror method works quite well.
I was wondering if I could set up an 8mm or 16mm projector to shoot the film images directly to a translucent mini screen and have a digital camera capturing the image on the other side of the screen? I know the image would be backwards, but I am sure there is a way to fix this in a computer. Adjusting everything would be trial and error, to say the least. This is how I capture Kodachrome Slides via a still digital camera. It is probably how the Workprinter works, but a lots less complex.

foxyshadis
4th December 2006, 00:57
Well, a workprinter shoots onto a lens designed so that all the light condenses back onto the camera lens (whereas a mirror scatters it eveywhere), and digitally signals to the computer exactly when it's ready to capture to synchronize everything. (That's why it's so damn slow.) You can use a much lower-powered bulb that way, which is the main benefit of using it over using a mirror.

You can also try pulling the lens off entirely if your camera is capable of zooming all the way down onto the film, but most likely you'll end up needing some kind of lens anyway, since most digicams don't have anything like that kind of focus capability.

By translating it onto a translucent screen, you'll lose significant contrast, but if it's recorded in 16-bit, it's not too bad, except for the random variations in translucency. Since nearly everything is 8-bit until you get reeeeally expensive, that would destroy the contrast.

johnmeyer
4th December 2006, 01:05
I use the Workprinter with the aerial lens for 8mm/Super8. The pictures are crisp, but you have to fiddle a LOT to get all the distances and focus lined up just right in order avoid both keystoning and also chromatic aberrations.

For my 16mm transfer, I was lucky enough to get a projector on eBay that had a lens designed to project on a screen a long ways off (i.e., telephoto rather than wide angle). With this lens, I can simply point the video camera directly at the projector, at a distance of about five inches (distance between the projector lens and the video camera lens). The picture is upside down, but this is easily fixed in post. Alignment is extremely simple compared to the aerial lens, the mirror, the translucent rear-screen, or any other approach. This is definitely the best way to go, if you have the right lens.

As others have pointed out, you HAVE to use a lower wattage bulb when doing these kind of transfers. You can find specialy stores that sell bulbs that are pin-identical replacements and which are 25 watts instead of 250 watts. The lower the better.

videoFred
4th December 2006, 08:54
I have seen Johns results and they are very good.

I use a different setup: (more details on my website...English translation)

http://users.pandora.be/ho-slotcars/Nieuwe%20Scanners/videoFred_Transfer_Unit_bis_001.jpg

Why this setup?
Because it's very easy to use and to align.
The (machine vision) camera 'looks' straight to the film plane.
I use a macro lens with extention tubes for this.
And a 'home brew' reflected backlight source.

But the result from a machine vision cam needs post processing...
This is what I get after HDR and LimitedsharpenFaster:
1972...Super-8....Kodachrome

http://users.pandora.be/ho-slotcars/Frames/Rudy_001.jpg


Fred.

videoFred
4th December 2006, 10:08
Could you do a test with two captures; one with exposure set to always show detail in bright areas, one with overexposure to show dark areas. I will write you a filter/script to put the two together. I plan on using two clips to store 16bit video.
I can do many things better as well; if you can get hold of a true black/white camera (like a security camera), then use 3 color filters and capture 3 times; I can get you HD video.
Finally you should know there are programs to correct the geometric distortion from the lens. In the end, I could get you scanned film like quality.


Two captures... Multi exposure...I have done this. I even have software for my machine cam to do this. But the HDR AGC filter gives better results.... Maybe my Avisynth overlay script was not good enough.

Soon I hope to test a machine cam with much better dynamic range (above 60db) and 12 bits output. I expect a lot from this cam... We'l see....

PS: Johnmeyer... sorry for hijacking your thread...
Let me know if I have to stop:o

It's my enthusiasm....:)

Fred.

2Bdecided
5th December 2006, 14:22
I like this thread - some clever ideas!

Love your webpage videoFred.

johnmeyer, do you have any stills from the 16mm transfers? They look surprisingly good on youTube, but it would be nice to see how sharp they are.

What is the aspect ratio? I thought 16mm was 4:3, but the transfers look different.

Cheers,
David.

BillB
5th December 2006, 14:34
Have any of you guys played around with 16MM film with a sound track? Or is this a whole new ballgame?

I have several 1939 newsreels with sound, of the meetings of Churchill and Hitler, but I am afraid to tamper with these old flicks.

Suggestions, please!

BillB

johnmeyer
5th December 2006, 17:11
johnmeyer, do you have any stills from the 16mm transfers? They look surprisingly good on youTube, but it would be nice to see how sharp they are.


Yes, I posted over in the HDRAgc thread here:

http://forum.doom9.org/showthread.php?p=868799#post868799

2Bdecided
6th December 2006, 13:34
That's great, thanks.

What causes the slight colour fringing?

Cheers,
David.

videoFred
6th December 2006, 15:20
Yes, I posted over in the HDRAgc thread here:

http://forum.doom9.org/showthread.php?p=868799#post868799

That's the picture I have seen.
Ah! Those 16mm film pics are awesome
This must be around 1920, right?
Incredible this is still so well preserved.

Very good transfer, Johnmeyer:p

Fred.

johnmeyer
6th December 2006, 16:13
What causes the slight colour fringing?
That may be mostly your monitor. I just went the link I gave, captured my original image, brought it into my photo program, and then completely desaturated it (i.e., made it pure B&W). I then went back and forth between the color and B&W versions. (The posted image is actually a color image, because most people prefer a little "warmth" to the whites in their B&W.)

When I did this, the only place I could see anything that looked like color fringing was around the kid's glove (around the thumb), and only in the corrected picture. There was also a hint of fringing around a black edge in one of the walls in the far upper right of the picture, again only visible in the corrected version of the picture. Neither of these really looked like chromatic aberrations, or if they were, they were pretty minor. They were also both near the edge of the frame where, in any optical system, you are likely to see a small amount of fringing.

Of course, B&W is the ultimate test of this problem with any optical system since such aberrations are usually hidden or obscured in a color photo. Don't confuse the face that there is some residual color, which was done intentionally by balancing the picture to the "warm" side, with true fringing where there is a rainbow around a light/dark transition.

Compared to using a mirror (which an earlier poster talked about) -- especially when most people use conventional "rear-silvered" mirrors where you get reflections from the front glass as well as the rear mirror, creating horrendous ghosts and fringes, this is pretty clean. Same is true of the aerial lens I use with my Workprinter which is almost impossible to align without getting some fringing around the edges when doing B&W.

I'm not trying to be defensive, but instead just pointing out what's actually going on, and how it compares to other techniques I've actually tried myself.

BillB
7th December 2006, 20:27
Thought this might be of interest:
http://www.moviestuff.tv/dv8_sniper_pro.html

Also a 16mm version.

Big $$ though!

johnmeyer
7th December 2006, 21:18
This is basically Roger's Workprinter, but with the camera included, along with a lens that can focus directly onto the film, thus eliminating the aerial lens and its associated problems (noted in my earlier posts). Still doesn't allow HDV capture, since you can't use HDV for stop-motion captures (although a really high-end HD camera should be able to do it).

2Bdecided
19th December 2006, 12:10
I'm not trying to be defensive, but instead just pointing out what's actually going on, and how it compares to other techniques I've actually tried myself.

Sorry john - I didn't mean to sound critical, or to imply that it was worse than other techniques. I've seen what I think is horrible colour fringing on other techniques, but given the source was colour, it could have been in the original image. I bet it often was, given the quality of lens on typical 8mm home movie cameras.

It's interesting about people preferring the warmer colour of B&W images - I've experienced this too with still photos. It's trivial to desaturate them, but it's often subjectively better not to do this!

As for the colour fringing - I'm very sensitive to it. Probably because I was silly enough to buy a digital still camera (Fuji F10) which is very prone to it, and it annoys the heck out of me! Anyway, the right hand side of the child's hat and coat is green - it's not my monitor. I can zoom in and see it very clearly.

I'm still very impressed with your results - I will have to make sure my next camera also supports 60fps - with 50fps (PAL) I would have to slow the film down to do the same processing thing, which seems quite pointless. It's also not possible on some projectors, though an 18fps setting for silent films which some projectors have would give a similar result but with a different (unconventional) pull-down pattern.

Cheers,
David.

BabaG
21st May 2007, 22:11
so what does the final script for this project look like?

johnmeyer
21st May 2007, 23:49
I've done over 100 reels of film, including this amazing footage I found of the 1929 Cubs World Series (which was broadcast, by permission, by WFLD-TV this past weekend 5-21-2007, as part of the Cubs-Sox game). Here's the YouTube version:

http://www.youtube.com/watch?v=U63LW6wV3no

As for the code, I still am using my prototype. The actual AVISynth script is simple. However, by necessity, the process requires two passes (because the decimation is not strictly "1 of n"). I create a text file in pass 1, and then parse this file using Excel as my prototype parser. I wanted to create a hard-wired parser, but go caught up in doing the films. The process works perfectly, and I've talked to a patent attorney about getting a patent.

Finally, since you asked, here are the two scripts: pass 1 and pass 2. Not much to look at. The real fun stuff happens in the Excel spreadsheet which has formulas and scripts and all sorts of other goodies.

# Script to recover film frames from film projected on shutterless 16mm projector.
# First Pass
# Copyright 2006 John H. Meyer
# Revision October 20, 2006
#-----------------------------

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")

AVISource("P:\OPRFHS 1970\1970-09-26 Evanston_2-0001.avi")
AssumeBFF()
converttoYUY2(interlaced=false)
colorYUV(autogain=true)
tfm(display=false,micout=2,mode=0,cthresh=45,mi=120,pp=1,metric=0,field=1,micmatching=2,sco=-1,slow=2,output="d:\tfm.txt")


Here's pass 2:

# Script to recover film frames from film projected on shutterless 16mm projector.
# Second Pass
# Copyright 2006 John H. Meyer
# Revision August 9, 2006
#-----------------------------

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\TIVTC.dll")
loadplugin("c:\Program Files\AviSynth 2.5\plugins\MultiDecimate.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\AGC.dll")

AVISource("P:\OPRFHS 1970\1970-09-26 Evanston_2-0001.avi")

converttoYUY2(interlaced=false)
AssumeBFF()
tfm(display=false,input="E:\film\input.txt")
MultiDecimate(pass=2)
FlipVertical()

HDRAGC(coef_gain=1.5,coef_sat=0.8,min_gain=1.5,avg_window=1,corrector=.75)

#AssumeFPS(23.976, true)
#AssumeFPS(18, true)
AssumeFPS(16, true)

BabaG
23rd May 2007, 18:02
johnmeyer,

i too have a bunch of 16mm that would be great to get
xferred and that's why i'm interested in your clever method.

pretty new to anything but the simplest avisynth usage at
this point. looks like you are passing field matching info to
a text file with: output="d:\tfm.txt"

then you're loading that into excel, doing some math and
exporting another text file from excel to: E:\film\input.txt
which is used to get rid of duplicate frames (decimate?).

then there's some other stuff like paviko's hdragc and setting
the frame rate. you set the frame rate by uncommenting
lines for either 24, 18, 16fps?

one thing i've seen you explain at length that i can't quite
visualize is the accuracy of the frame removal process. (btw,
i looked at the you tube world series footage which is really
great, although difficult to really judge on the web.)

how exhaustive has your results analysis been? i'd be very
curious to know if you've ever done anything like taking a
loop of 16mm film which has each frame numbered and
capture/process it. that would be a good way to check for
duplicate/missing frames. have you done anything like this
or has your method been mainly intuitive? looks good is good.
you seem a very thorough person so i'd be curious about
this. also, what's the longest reel you've xferred this way?

and lastly, am i correct in understanding that your process
is reliant on using interlaced material? as i understand it, you
are using the fields to imply a higher frame rate, 60 rather
than 30, in order to insure a good capture of each frame in
the seated position in the projector gate. and by using this
method you are, of necessity, interpolating full frames from
fields?

thanks for helping me understand a very interesting process,
BabaG

johnmeyer
23rd May 2007, 18:29
one thing i've seen you explain at length that i can't quite visualize is the accuracy of the frame removal process ... how exhaustive has your results analysis been?
I don't have any film with frame numbers on it, but i have spent dozens and dozens of hours going over film, frame by frame, looking for skipped or duplicated frames. Except on poorly exposed film, I have never seen either. If I ever got around to writing some software to eliminate the Excel prototype kludge, the process would be 100% perfect. It is perfect now with normally exposed film (actually anything that would normally be considered watchable).
what's the longest reel you've xferred this way?
All work to date has been on 400 foot reels. I have transferred over 100 of these.

and lastly, am i correct in understanding that your processis reliant on using interlaced material?

Your understanding of the process is perfect up until this last paragraph. I'm afraid that nothing there is correct. Obviously, there is no interlaced material with film. What I do rely on and what I need is a camera that takes sixty pictures a second. 60p or 60i, either will work, although 60p is rare.

However, the second part of your misunderstanding is the idea that somehow I am interpolating or losing resolution. All I am doing is recombining fields back into frames, where sometimes I take the bottom field from one frame and the top field from the next, and other times take both fields from the same frame. Normally you can't do this and you have to use deinterlacers, etc. None of that is needed here, and most people who have dealt with the issue of deinterlacing never quite "get it."

Here's the reason they don't get it: the two fields I choose always come from the same frame of film (that's what the IVTC software does) and there is no temporal difference between these fields. Therefore I can combine top/bottom fields from any frames, as long as they come from the same frame of film. When combined, this gives me the full resolution of the format, and there is zero artifacting (not almost zero but absolutely zero) or any other degradation one normally associates with deinterlacing. The still image on the film doesn't move, once it is at rest in the gate. Thus, this is quite a unique situation, and I take full advantage of that uniqueness.

BabaG
23rd May 2007, 19:05
i was assuming 60i as i'm unaware of any 60p cameras. when
i said interlaced, therefore, i was refering to the first capture,
not the film which is obviously not interlaced. 60i would be
an interlaced source file. i guess my assumptions made that
unclear.

i believe i see now what you are saying about the lack of
necessity for interpolation. were this 'live' footage, rather
than rephotography, interpolation would be necessary, but
since the fields, although captured at slightly different
times, represent the same material, they can be recombined
(or left alone) to create the final full frames. this couldn't
be done with live material as it would move from field to
field which a stationary frame of film in a projector gate
doesn't do.

thanks for the clarifications. i think i'm getting it. will think
on this longer and may at some point try something like it
with looped, numbered frames to check accuracy.

thanks again,
BabaG

2Bdecided
8th January 2008, 14:13
John,

Would you be willing to give any hint as to what your excel spreadsheet looks like / contains?

Cheers,
David.

videoFred
8th January 2008, 15:30
the two fields I choose always come from the same frame of film (that's what the IVTC software does) and there is no temporal difference between these fields. Therefore I can combine top/bottom fields from any frames, as long as they come from the same frame of film. When combined, this gives me the full resolution of the format, and there is zero artifacting (not almost zero but absolutely zero) or any other degradation one normally associates with deinterlacing. The still image on the film doesn't move, once it is at rest in the gate. Thus, this is quite a unique situation, and I take full advantage of that uniqueness.

Hi John,

Very good work indeed! Moviestuff is actualy using this technology right now. Is it yours?

In the mean time... machine cams have evaluated a lot. I have the same results now by using the machine cams trigger. I can capture frame accurate at 20fps now. :)

Fred.

johnmeyer
8th January 2008, 17:12
Very good work indeed! Moviestuff is actually using this technology right now. Is it yours?


I have talked to Roger Evans (Moviestuff) several times over the years, and described my invention to him in detail. I let him know that even though I was thinking of getting a patent, I'd let him have it for free, if he wanted. I think it would be great if he used it, but a quick check of his site (Moviestuff (http://www.moviestuff.tv/)) shows the same technology he has always used. The problem is that Roger is a "hardware" guy and has never felt comfortable with the software side of things. There are many things in his Workprinter approach that could have been handled much more easily in software (e.g., the cam timing adjustment) but he did it using hardware. Thus, I don't think he is likely to ever do anything like my approach. This is too bad, because I can capture frame-accurate, like his Workprinter, but at full 24 fps, and I can capture to a cheap HDV camera, whereas if he is going to do HD, he will have to use a camera that can export individual frames in HD, or will have to use a still camera (which of course would produce exceptional results, but would once again be very slow).

As for my Excel spreadsheet (the other question), I'd share it, but I can guarantee you would never figure it out. Also, it is but one step in the process. Once you get the numbers, you have to export them to a text file, use that as an input to another small program that is part of TFM, in order to put them into its format, and then run a second pass with another AVISynth script. I'm about to do several more 16mm projects and every time I have another 10-20 400' reels, I promise myself to take the several days to write the code that will eliminate the spreadsheet, and make the process push button. Maybe it's time for a New Year's resolution.

videoFred
8th January 2008, 17:28
he will have to use a camera that can export individual frames in HD, or will have to use a still camera (which of course would produce exceptional results, but would once again be very slow).

John, believe me... A machine cam is a combination of a still cam and a video cam. It takes a full progressive frame when it gets a trigger. It then puts that frame in a growing AVI container. I capture 1024x768 this way.. in uncompressed RGB24. All I need is an optical swith on my projector to fire the trigger pulses to the camera's trigger input. Those pulses must be between 5 and 12V and as 'clean' as possible.

But I agree: the benefit of your system is the fact one can use any decent DV cam or even HD-cam for this, right? But then again the benefit of a machine cam is the fact it is c-mount... One can use any c-mount lens on it and it comes with good software.. One can do all important settings on the computer screen.

Fred.

johnmeyer
8th January 2008, 17:58
A machine cam is a combination of a still cam and a video cam.
Actually, when I was talking about Roger using a cam, I wasn't talking about a camcorder, but a mechanical cam (i.e., a disc with one edge flattened) used to press a switch which in turn signals the camcorder to take a picture.

As to the advantages of using a still camera, I am agree that they are better in ALMOST every way. Resolution is only one of their advantages: Better lenses, as you point out, but also MUCH better dynamic range, better sensitivity, etc. However, the big downside -- and this is why Roger started out using camcorders and still does -- is that they take discrete pictures (rather than continuous) and therefore you have to slow the projector (or whatever you use to advance the film). The only advantage I claim for my approach is that I can get full HD resolution at 24 fps and it is frame accurate. The combination of frame accurate, HD resolution and speed would be the "key selling proposition" if I were ever to market this. I am not aware of any way to get a still camera to take 24 frames per second for ten minutes straight.