PDA

View Full Version : How to improve a 16mm film to video transfer?


carlmart
6th April 2009, 19:47
A friend of mine asked me to help him on a difficult task: trying to improve a 16mm to video transfer from a film he shot many years ago.

He provided me with a DVD copy taken from the Betacam tape used on the transfer.

Today I had my first look at that copy and I find the job will be rather difficult, particularly because there seem to be random flashes of what looks like copy problems, probably due to faulty store and/or other reasons.

What I would like to know is what can we do with it using avisynth tools. The file is uploaded here:

http://www.mediafire.com/?sharekey=baad3af1c8fb5a28d6baebe61b361f7cdea0fab9927d37ffc95965eaa7bc68bc

2Bdecided
6th April 2009, 21:00
To ask the obvious: is the 16mm film print available? Is the Betacam tape available?

You don't start a restoration from a DVD unless it's the only copy available.

Cheers,
David.

carlmart
6th April 2009, 21:08
To ask the obvious: is the 16mm film print available? Is the Betacam tape available?

You don't start a restoration from a DVD unless it's the only copy available.


From a budget point, it's not. A new transfer can't be done and my friend can't find the Betacam tape. This restoration is not an attempt on doing a top quality job.

With the problems I mentioned, that are plain to see, you can't get too far.

For me it's just one more exercise on learning what can you do with avisynth tools. Being a practical one, with real field problems, makes it more interesting, I think.

In this case the problem is difficult.

Blue_MiSfit
6th April 2009, 21:20
Indeed it is!!!

The field structure is at least intact. TFM.TDecimate seems to return the original frame rate pretty easily.

But, man oh man those nasty splotches are tough!

I wonder what RemoveDirt would do to them.. I don't have the package installed though... Anyone?

~MiSfit

carlmart
6th April 2009, 21:25
Indeed it is!!!

Sorry! :D


The field structure is at least intact. TFM.TDecimate seems to return the original frame rate pretty easily.

That is good.

But, man oh man those nasty splotches are tough!

Tell me about them! It's the first thing I called my friend about, like we say here "opening the umbrella" about something we won't be able to cure. If we could at least attenuate it.

I wonder what RemoveDirt would do to them.. I don't have the package installed though... Anyone?

What package are you talking about?

poisondeathray
6th April 2009, 22:27
@carlmart-
http://home.arcor.de/kassandro/RemoveDirt/RemoveDirt.htm

I tried it quickly , and RemoveDirt at default settings removes some of the splotches, but quite a few remain. The tradeoff is less crispness/sharpness. You might be able to tweak the settings a bit.

Before
http://i44.tinypic.com/sbpiy8.png

After
http://i40.tinypic.com/e9b711.png

buletti
6th April 2009, 22:47
Maybe a look at the The power of Avisynth: restoring old 8mm films (http://forum.doom9.org/showthread.php?t=144271) thread may be of help. Fred got very nice results on restoring and recoloring old film footage.

carlmart
7th April 2009, 00:41
I tried it quickly , and RemoveDirt at default settings removes some of the splotches, but quite a few remain. The tradeoff is less crispness/sharpness. You might be able to tweak the settings a bit.

I'm afraid the tradeoff is not acceptable. I think the image needs adding some sharpness, not softening.

carlmart
7th April 2009, 00:47
Maybe a look at the The power of Avisynth: restoring old 8mm films (http://forum.doom9.org/showthread.php?t=144271) thread may be of help. Fred got very nice results on restoring and recoloring old film footage.

It looks quite promising. It deserves a try.

Mug Funky
7th April 2009, 01:58
yuk. what was it transferred on? an FDL60 or something? i can't tell if the softness is from the film or the transfer (most likely the film mind you, unless the operator forgot to re-focus the gate for print instead of neg).

my guess was this print was made from a hand-cleaned neg that didn't have time to dry before it was re-spooled (you have to turn the hand winders VERY SLOWLY and watch the fluid evaporate before it winds onto the spool. even then it's not very reliable.) ultrasonic cleaning at a lab is unfortunately more costly than a telecine transfer of a dirty neg. of course everyone wants their old films restored, but nobody wants to get it cleaned or even have the condition checked first (then they complain about the bill when i have to spend 2 hours fixing splices because it wont even run on the machine without breaking apart).

the splotches could probably be handled with a combination of removedirt (script or plugin - i forget which i'm using) and motion compensation.

here's one i use (i think it uses the old plugin version of removedirt, and mg262's "motion" package for speed):

function qmc (clip c,int "threshold", int "reset")
{
threshold=default(threshold,80)
reset=default(reset,50)

degrain=c.removegrain(mode=19).removegrain(mode=19)#.removedirt()
vf=degrain.findmotion(reset=reset,from=previous,initialise=6,iterate=2)
vb=degrain.findmotion(reset=reset,from=next,initialise=6,iterate=2)

interleave(c.swc(vf,bilinear=true),c,c.swc(vb,source=next,bilinear=true))
removedirt(mthreshold=threshold,dist=2,tolerance=32)
selectevery(3,1)
}

use it thus:

qmc(<strength>)

the number there controls how likely a block is to be replaced. if the block is too noisy it'll be left out. raise the number and more blocks get cleaned. raise it too high and thin objects or complex moving shapes get affected (but not necessarily noticably so be careful).

80 is a good number to start at.

rfmmars
7th April 2009, 04:53
Combination of Colormill 2.11, RGBeq, HDRagc

http://img16.imageshack.us/img16/2963/recover0.th.png (http://img16.imageshack.us/my.php?image=recover0.png)

Richard
photorecall.net

videoFred
7th April 2009, 07:36
It looks quite promising. It deserves a try.

Yes, please try it.

Fortunately, those red artefacts are random, never the same on two frames. This means they can be removed almost completely with MVDegrainMulti(), averaging 6 frames or more. Degraining strenght 600 or more.

PS: the problem with Removedirt() is sharpening afterwards (artefacts!). A clip, degrained with MVDegrain() can be sharpened very well afterwards with LimitedscharpenFaster() and even with UnsharpMask().

Fred.

Mug Funky
7th April 2009, 07:48
btw, this looks like an orange-cyan duotone. there's barely any true green, red or blue.

you might be able to recover some of this using tweak(starthue=x,endhue=y). if you can grab the bluish cyans and twist them around to real blue, and the same with the greenish cyans to green, and oranges to pink, you might have something that looks like real colour from this degraded print. if you or your friend had attended the telecine session they could have done it for you with better precision, as it's a simple adjustment to make in the transfer.

rfmmars
7th April 2009, 16:09
btw, this looks like an orange-cyan duotone. there's barely any true green, red or blue.

you might be able to recover some of this using tweak(starthue=x,endhue=y). if you can grab the bluish cyans and twist them around to real blue, and the same with the greenish cyans to green, and oranges to pink, you might have something that looks like real colour from this degraded print. if you or your friend had attended the telecine session they could have done it for you with better precision, as it's a simple adjustment to make in the transfer.

I have found that the customers are looking for black blacks, white white whites, and as close as flesh color as possible. I have taken blue faces and made them look reasonable good with this process. When the color has distorted non-linera, there no chance to get back all the original color. Best way is to do it over.

Richard
photorecall.net

Didée
7th April 2009, 21:11
A quick attempt on the colors, using "simple" manual level curves adjustment in HSV colorspace.

http://img16.imageshack.us/img16/7093/hsvadjusted.th.png (http://img16.imageshack.us/my.php?image=hsvadjusted.png)

Not golden, but not too bad either. A starting point for more toying. At least the blue jeans are blue and the green plants are green. (instead of orange faces in a green world, some posts above...)

The used HSV curves:

http://img16.imageshack.us/img16/4062/hsvcurves.th.png (http://img16.imageshack.us/my.php?image=hsvcurves.png)

rfmmars
8th April 2009, 00:35
A little more re-maping

A quick attempt on the colors, using "simple" manual level curves adjustment in HSV colorspace.

http://img16.imageshack.us/img16/7093/hsvadjusted.th.png (http://img16.imageshack.us/my.php?image=hsvadjusted.png)

Not golden, but not too bad either. A starting point for more toying. At least the blue jeans are blue and the green plants are green. (instead of orange faces in a green world, some posts above...)

The used HSV curves:

http://img16.imageshack.us/img16/4062/hsvcurves.th.png (http://img16.imageshack.us/my.php?image=hsvcurves.png)

http://img18.imageshack.us/img18/3526/redo0000.th.png (http://img18.imageshack.us/my.php?image=redo0000.png)

Richard
photorecall.net

videoFred
8th April 2009, 07:40
This example shows how the artefacts can be removed:

http://users.telenet.be/ho-slotcars/DOOM/comparison_001.jpg

I have increased contrast too.
And perhaps a bit to much sharpening.
Color correction is another matter.

Fred.

rfmmars
8th April 2009, 07:50
Very nice cleanup.........VideoFred

Richard

videoFred
8th April 2009, 08:18
Thank you Richard :)

Fred.

carlmart
8th April 2009, 13:35
Very good, Videofred. It certainly looks quite good. Remarkable.

I already sent the film director have a look at your results, because I think that's what he's looking for.

Can you put the script you used here?

Thanks a lot!

videoFred
8th April 2009, 15:32
Hi Calmart,

Buletti already has posted the link to my script.

Fred.

carlmart
8th April 2009, 16:23
Buletti already has posted the link to my script.

Where? I must be missing something. :D

2Bdecided
8th April 2009, 16:58
Post 7.

When someone is giving you something for free which could have considerable commercial value, it's polite to do at least a little of the work yourself! ;)

Cheers,
David.

carlmart
8th April 2009, 17:06
Post 7.

When someone is giving you something for free which could have considerable commercial value, it's polite to do at least a little of the work yourself! ;)

Certainly so. But on post 7 there's a link to vimeo.com, not to a script. And there's no script there either: you have to go back to a Doom9 topic. That's why I said I might be missing something.

Is this the script that you used, VideoFred?

http://forum.doom9.org/showthread.php?p=1237653#post1237653

videoFred
8th April 2009, 18:50
But on post 7 there's a link to vimeo.com, not to a script.

On post 7 is a link to my thread 'The power of Avisynth: restoring old 8mm films." :D
Further in this thread you will find the script.


Is this the script that you used, VideoFred?

Yes, you have found it ;)


Fred.

poisondeathray
8th April 2009, 19:05
Great job videoFred!

A lot to learn from those posts

Blue_MiSfit
8th April 2009, 19:36
(!)

Wow.

VERY impressive videoFred. I think I said that about your original sample clips, but just wow.

~MiSfit

unix_sansei
8th April 2009, 20:40
videoFred:
very nice work. i think if you could have adjusted the equations of the curves directly instead using contrast the blacks wouldn't be as crushed and the colors wouldn't be as saturated.

Mug Funky
9th April 2009, 05:30
i just had a poke at it in final cut color (a program i despise, but the Scratch is busy on a real job at the moment) and got semi-promising results.

you need to throw "secondaries" at this - cyan and blue have become (almost) one, and need to be separated by increasing the difference between them. this can be done on a "hue curve". a saturation curve is also needed to spread the blue end out a bit too. ideally i'd have vectors and chroma keys, but Color doesn't do those properly (though the circa 1992 ursa gold has no problems with it. go figure, apple. that's progress).

unfortunately the colours have all merged together and it can't all be recovered (probably... i didn't spend a lot of time on it, just did what i did for the last 30 year old print that came in).

sorry, i can't be bothered posting a pic/clip. but do what i did above and it's not too tricky.

videoFred
9th April 2009, 07:21
videoFred:
very nice work. i think if you could have adjusted the equations of the curves directly instead using contrast the blacks wouldn't be as crushed and the colors wouldn't be as saturated.

I agree with this. This clip needs custom colors and levels corrections.

Fred.

carlmart
10th April 2009, 20:43
I'm having some problems that I had to solve due to a worm infection on my HD, which made me delete all the Windows installation.

So please forgive my not getting back here yet with the results I got or the problems.

But I can say that the film director was enthusiastic with the results you got.

So congratulations!

Let's hope I can get back soon on my feet and convert the whole film.

mikkop
16th April 2009, 01:02
Hi Fred,
I try your script at my 720x576 footage but can't get it right.
the smooth changes like your horse clip on vimeo doesn't work for me. I get more grain at the final result. I tried to set ad grain to 0 but that does not seem to work. Can you tell me what I need to adjust? See picture (attachment).

Thanks Michael

videoFred
16th April 2009, 07:13
Hello Mikkop,

You are using to much sharpening. Set all sharpening to zero and see what you get.

Fred.

mikkop
22nd April 2009, 22:53
Thanks Fred,

Its better but now there is a mist over the film (unsharp)
And also a green glow over some parts of film that is not in the original. Any Idee what that might be?

I saw your clip with the horse and would like to try that scrip. Which result in the script is this or is this a different script?

I would like to play with the settings but am a avisynth dummy although would love to learn more. Do you have some tips to adjust some settings in the scrip to improve my footage.

Is it a problem that your film is 1024x768 and mine is PAL 720x576?

Thanks,
Michael

videoFred
23rd April 2009, 07:30
Thanks Fred,
Its better but now there is a mist over the film (unsharp)
And also a green glow over some parts of film that is not in the original. Any Idee what that might be?

You realy must play with the parameters, Michael. Try less denoising, less frames for averaging, less saturation. Try also less saturation for the AGC plugin: AGC_max_sat= 1.0 for example.


I saw your clip with the horse and would like to try that scrip. Which result in the script is this or is this a different script?

It's the very same script. Parameters must be set depending on the source. Your example looks like very old regular-8, is this correct? Do not expect miracles..


I would like to play with the settings but am a avisynth dummy although would love to learn more. Do you have some tips to adjust some settings in the scrip to improve my footage.

Changing a number in a text file is not that difficult, Michael! It's the only way to learn it.


Is it a problem that your film is 1024x768 and mine is PAL 720x576?

No problem at all. But the yellow text on the comparisons is to large now. Easy to fix with size= ... in the "stackhorizontal" lines.

Can you not upload a clip somewhere, so I can have a look at it?


Thanks,
Michael

You are welcome :)
Fred.

mikkop
23rd April 2009, 22:13
Hi Fred,

Thanks for your fast anwser. You can download a part of the film here: http://www.mediafire.com/?sharekey=caebc1e97ddd76dd08f8df73f2072ed675dbd05834afda085be6ba49b5870170.

It's a super8 film (same film as the picture)

I compressed this clip as a xvid.

Michael :thanks:

videoFred
27th April 2009, 10:57
I am sorry Michael, but it's a low quality transfer. :(
A new better quality transfer is the only way to improve this.

Fred.

mikkop
27th April 2009, 11:30
Thanks Fred,
The way i do the transfer is with a panasonic dv cam 3ccd and a projar lens. I think the cam is good enough to get a good transfer. Do you have any suggestion how to improve the quality? Maybe a different lens? I know your camera does the job, but that's still to expensive.

I hope you can help me.:confused:

Thanks,
Michael

videoFred
27th April 2009, 11:39
I hope you can help me.:confused:


Sure, send me a private mail ;)

You will find my e-mail adress on my website.


Fred.

carlmart
20th May 2009, 01:25
you need to throw "secondaries" at this - cyan and blue have become (almost) one, and need to be separated by increasing the difference between them. this can be done on a "hue curve". a saturation curve is also needed to spread the blue end out a bit too. ideally i'd have vectors and chroma keys, but Color doesn't do those properly (though the circa 1992 ursa gold has no problems with it. go figure, apple. that's progress).

unfortunately the colours have all merged together and it can't all be recovered (probably... i didn't spend a lot of time on it, just did what i did for the last 30 year old print that came in).

OK, how do I do that using a PC? I don't have an Apple or can get access to one.

Isn't there a filter in avisynth I can load and run the rulers until is right?

rfmmars
20th May 2009, 19:48
OK, how do I do that using a PC? I don't have an Apple or can get access to one.

Isn't there a filter in avisynth I can load and run the rulers until is right?

There's are plugins for Vdub that can be ported to Avisynth or frame served to Avisynth from Vdub. The plugin is RGBeq 2.11 from "fdump"
http://img188.imageshack.us/img188/335/tinteq.th.jpg (http://img188.imageshack.us/my.php?image=tinteq.jpg)

Also you want to download "Colormill 2.11" These two plugins are a must for doing film work.

Richard
photorecall.net

carlmart
21st May 2009, 13:44
There's are plugins for Vdub that can be ported to Avisynth or frame served to Avisynth from Vdub. The plugin is RGBeq 2.11 from "fdump"

Also you want to download "Colormill 2.11" These two plugins are a must for doing film work.

Sounds great!

Anyone knows where do I get these filters for download?

I just googled for fdumb, and I didn't any get to any place to get them, only other topics.

Edit: Sorry, found them after I looked for their individual names.

Here's RGBeq:

http://fdump.narod.ru/equalizer.htm

And Colormill:

http://fdump.narod.ru/rgb.htm

rfmmars
21st May 2009, 14:31
Sounds great!

Anyone knows where do I get these filters for download?

I just googled for fdumb, and I didn't any get to any place to get them, only other topics.

Edit: Sorry, found them after I looked for their individual names.

Here's RGBeq:

http://fdump.narod.ru/equalizer.htm

And Colormill:

http://fdump.narod.ru/rgb.htm

Glad you found the links, and whats this, a new version of RGBeq. Ver 2.2 Great!!!

Richard

carlmart
23rd May 2009, 01:27
OK. I could get to this image, using avisynth and Vdub.

What do you think?

Undead Sega
23rd May 2009, 16:44
There's are plugins for Vdub that can be ported to Avisynth or frame served to Avisynth from Vdub. The plugin is RGBeq 2.11 from "fdump"
http://img188.imageshack.us/img188/335/tinteq.th.jpg (http://img188.imageshack.us/my.php?image=tinteq.jpg)

Also you want to download "Colormill 2.11" These two plugins are a must for doing film work.

Richard
photorecall.net

hahaha, season finale of Lost Season 5! :D

rfmmars
23rd May 2009, 16:46
hahaha, season finale of Lost Season 5! :D

I been hooked since Season 1 ept 1 can't remember anything like it.

Richard

Undead Sega
23rd May 2009, 17:33
Same here, Lost is excellent.

you're Richard? you dont age because Jacob did that to you?

carlmart
23rd May 2009, 18:52
Can we get serious and throw some tomatoes at my first try? :D

rfmmars
23rd May 2009, 20:07
Same here, Lost is excellent.

you're Richard? you dont age because Jacob did that to you?

I don't think my mind has aged in 66 years, the rest is falling apart.

If you have the Season One DVD set, there is a bonus DVD that tells how the show almost never came together plus interesting background information.

.....................................................................

Calmart, still wait for your jpg to be approved. Remember when using these filters, easy does it. Most important when using the non-linears fuctions.

Richard

carlmart
24th May 2009, 01:59
Remember when using these filters, easy does it. Most important when using the non-linears fuctions.

What does that mean exactly?

What I used was a combo of this script:


autolevels()
ColorYUV(autogain=true)
ConvertToYV12(interlaced=true)
separatefields() # for analog interlaced source
turnleft()
DeSpot(p1=35, p2=14, pwidth=20, pheight=20, mthres=25, sign=0, mwidth=20, mheight=15, interlaced=true, merode=33, ranked=true, p1percent=0, dilate=0, fitluma=false, blur=0, motpn=false, seg=0, tsmooth=3)
turnright()
weave() # restore fields
FluxSmoothT ()
TFM()
TDecimate(Mode=2)
lsfmod(smode=5)


Plus RGBEqualizer and Brightness/Contrast. I would very much like to use ColorMill and even RGBEqualizer to correct it better, but I don't quite know how to set the values.

If someone has any suggestion on what to change on my script or what to trim in VD, please come forward.

carlmart
24th May 2009, 16:27
Please forgive me if my questions sound too basic.

My only experience with color correction were within Avid Xpress, using its own color correction system or using the 3Prong plugin, also inside Avid.

They had a "white balance button", where you picked a white within the image and it balanced to that white. So it was a good place to start putting colors right.

Is there any color correction plugin, be it within Avisynth or for VirtualDub that allows me to do that?

rfmmars
25th May 2009, 19:42
Quote:
Originally Posted by rfmmars View Post
Remember when using these filters, easy does it. Most important when using the non-linears fuctions.
What does that mean exactly?

The more sliders you use the more cirtical the adjustment become. The "Tint" defualt adjustment setting is the best for bring back the face color, however it lessens the green. I follow that plugin with the RGBeq tint. Anytime you are using the non-linear adjustments in "Fdumps" plugins, the filter order makes a big difference. You can use The "invert" plugin before and after to get other color corrections.

I also use HDRagc but for film, its Fdump plugins. There is just not a one button cure for film.

Richard

carlmart
13th June 2009, 12:16
There's are plugins for Vdub that can be ported to Avisynth or frame served to Avisynth from Vdub.

Just now did I seem to guess that what you are saying is that I can use Vdub plugins from avisynth? Or is the opposite?

carlmart
13th June 2009, 12:21
I am getting ready to to use this avisynth/virtualdub combo to process my film.

The problem is that I am not too familiar with Vdub on how to process video through it. I already know how to do that when using just avisynth, with HCEnc, but I don't quite know how to proceed with Virtualdub.

The script I wrote loads fine in Vdub, but I am not quite sure what video compression to set, for instance. The file size is very large too and I am getting an avi file, not an m2v, which is what I need.

So that's my confusion.

How should I proceed?

rfmmars
14th June 2009, 05:17
I am getting ready to to use this avisynth/virtualdub combo to process my film.

The problem is that I am not too familiar with Vdub on how to process video through it. I already know how to do that when using just avisynth, with HCEnc, but I don't quite know how to proceed with Virtualdub.

The script I wrote loads fine in Vdub, but I am not quite sure what video compression to set, for instance. The file size is very large too and I am getting an avi file, not an m2v, which is what I need.

So that's my confusion.

How should I proceed?

If your are use to using Avisynth for the processing, then set your filters in Vdub and frameserve out to Avisynth. I do it both directions, its easier to adjust plugins in Vdub than Avisynth. This is very true when using "Fdump's" filters. As I said I go both directions outputting Avisynth by (frameserving) back to Vdub and using Vdub to frameserve out to my NLE, Movie Edit Pro 14 Plus, where I can add more Vdub plugins on a frame by frame basis if needed, all in one string, no recompression ever.

carlmart
14th June 2009, 15:48
If your are use to using Avisynth for the processing, then set your filters in Vdub and frameserve out to Avisynth. I do it both directions, its easier to adjust plugins in Vdub than Avisynth. This is very true when using "Fdump's" filters. As I said I go both directions outputting Avisynth by (frameserving) back to Vdub and using Vdub to frameserve out to my NLE, Movie Edit Pro 14 Plus, where I can add more Vdub plugins on a frame by frame basis if needed, all in one string, no recompression ever.

Here comes the big question on something I am really interested: how do you do frameserve?

Is there someplace I can go learn about it?

Let's start on how should I proceed to frameserve out to Avisynth.