View Full Version : How to achieve "film look" on PAL DV source
Pages :
1
[
2]
3
4
5
6
7
8
9
E-Male
14th January 2005, 04:25
well, except for the "-1"-mystery i can't do much more, except when i find more errors in my code, which could happen likely
still waiting for word from the gimp dev-ML to get the -1 thing cleared up, it's the last obviosue missing thing for me
the only other thing i can work on atm is optimiasation
i wanna try if converting the curve-file to a lookup-table-file will speed the filter up (less computation, but more hd-readind [both per frame])
i also follow the masktools thread which deal with photoshop curves
when both formats are understood, i think i'll write a converter
the gimp comunity might like that as well
Macanudo
14th January 2005, 05:29
Outstanding!
Here are the results of my latest test using the same video and frame number as my above test. The "gimp curve" and the "gicocu curve", for all practical purposes, appear to me to be identical.
Great Job E-Male! You are a gentleman and a scholar!
Original Screen Shot (frame#360)
http://img109.exs.cx/img109/9010/boats9hu.png
Gimp Curve (frame#360)
http://img109.exs.cx/img109/1163/boatsgimpcurve2uo.png
Gicocu Curve (frame#360)
http://img112.exs.cx/img112/1645/gicocucurve4hq.png
I used the same curve file as my above test.
# GIMP Curves File
0 0 -1 44 28 43 -1 65 67 96 -1 93 -1 65 -1 140 121 139 -1 -1 -1 204 -1 201 192 190 213 224 -1 221 -1 242 255 255
0 0 -1 56 -1 47 -1 34 61 35 -1 -1 -1 118 -1 110 128 99 -1 98 162 193 -1 213 189 241 -1 236 -1 226 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 49 63 45 -1 47 100 92 -1 149 121 149 151 191 -1 186 -1 192 196 233 -1 228 -1 -1 -1 -1 255 255
0 0 21 38 -1 35 -1 -1 63 53 -1 66 104 65 117 139 -1 138 148 201 -1 203 -1 203 -1 198 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
Just for fun, I will now attempt to replicate the "Bleached Bypass" effect in "Magic Bullet Suite", but I still haven't gotten my Window's machine running right. Too bad Avisynth won't run under Linux or Unix. I have read in the Linux portion of this forum that may be coming with the release of Avisynth 3.0.
Thanks Again to E-Male and everyone involved,
Macanudo
E-Male
14th January 2005, 06:19
waiting for some curves to eb shared here
i knwo they will only be starting points, as al lrecordings differ in lighting and stuff
but it'll be godo starting point
and gimp curves are easy to share by just posting them in plain text
Macanudo
14th January 2005, 06:53
Originally posted by E-Male
waiting for some curves to eb shared here
i knwo they will only be starting points, as al lrecordings differ in lighting and stuff
but it'll be godo starting point
and gimp curves are easy to share by just posting them in plain text
I agree. I think we should share our curve files. Like you said they would make great starting points. All that would be necessary is to load the files into "The Gimp" and adjust them to your specific video clip. I plan to post my curve files and test results as I go, for those interested in seeing them. I hope everyone does the same.
Macanudo
14th January 2005, 07:21
Mug Funky,
I have been reading the following thread Producing a Film-Like Motion Blur. (http://forum.doom9.org/showthread.php?s=&threadid=75523&perpage=30&highlight=motion%20blur&pagenumber=1).
There seems to be divergent opinions on the best method to use. I noticed that you were following this thread. Did you settle on a method? If so, which do you recommend?
My plan is to use (in order)
1.)some type of bobdeinterlacer
2.)Limited Sharpen
3.)some type of Film Motion Blur
4.)Gicocu
5.)Overlay (to overlay and blend my Gicocu color curved video over a greyscale of the same video or vice versa)
Hopefully with some trial and error I can approximate the "Bleached Bypass" effect of "Magic Bullet Suite".
Sound reasonable?
E-Male
14th January 2005, 08:37
motionblur is something i might skip completely, as to me personally it is very anoying, but i'd have to try
what i'll add at the end would be a very very low amount of grain
what i think about is: this sharpening includes supersampling (in most cases) could/should some more things be done in that high resolution?
that would be closer to how film is proccessed
E-Male
14th January 2005, 08:39
a request from me:
could someone wit ha dv camera please shoot some footage (just 15 sec or so) in a well lit place of a person, sepecially a close up of the face
so i could start trying some scripts/curves/... before getting my hands on a camera
scharfis_brain
14th January 2005, 14:26
Unfortunately I cannot make public the videos I am processing.
The persons won't like that:(
And note, that different cameras are producing very different colorations!
Also, I partially agree to E-Male regarding the motin blur thing.
Always record your videos with 1/50 (PAL) or 1/60 (NTSC) seconds shutter speed.
this will be enough to get the film-look after
deinterlacing (PAL)
convert60ito24p (NTSC)
no need for artifical motionblur.
use shorter shutters, if you want to get the 'action' effect.
Mug Funky
14th January 2005, 15:16
@ Macanudo:
here's what i've got so far:
c=last
blurry = c.bilinearresize(c.width/2,c.height/2).bicubicresize(c.width,c.height,1,0).tweak(sat=0.5)
c.limitedsharpen(strength=100).mergeluma(blurry,0.5).mergechroma(blurry,0.5).converttorgb32()
gicocu("C:\MediaTools\AviSynth 2.5\plugins\filmlook_02_.txt")
and my gimp curve is:
# GIMP Curves File
-1 0 16 0 37 17 -1 -1 -1 -1 -1 0 -1 0 -1 0 128 127 -1 -1 -1 193 -1 221 -1 210 207 219 -1 241 -1 -1 255 235
0 0 -1 -1 -1 43 41 42 -1 53 -1 -1 -1 -1 -1 57 -1 39 -1 0 -1 0 -1 0 -1 204 211 226 -1 231 -1 -1 255 255
0 0 -1 -1 -1 -1 47 52 -1 61 -1 -1 -1 -1 -1 125 121 125 -1 -1 -1 -1 -1 -1 -1 210 215 231 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 40 39 -1 0 -1 0 -1 0 -1 0 127 132 -1 147 -1 -1 -1 -1 -1 207 -1 221 222 235 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
hope this gives something useful. the reds aren't as hardcore as you get on film, but overall it gives the look of push-processed film (high contrast, slight yellow/orange cast).
[edit]
you might want to tweak the saturation in the tweak up there. if you're getting oversaturated, then turn it down until it looks better. originally it was straight greyscale, but i decided that deadened things a bit much.
scharfis_brain
14th January 2005, 15:26
@Mug Funky: I'm not able to DL your sample.
It doesn't set up a connection. (is your no-ip client running?)
alternatively, you might want to upload it on my FTP.
if so, PM me.
Mug Funky
14th January 2005, 15:34
my bad, it's up now. please get quickly, as i might need to turn it off soon...
Didée
14th January 2005, 16:11
A small'n quick modification of Mug Funky's script, giving a slightly different effect (kinda "highlight glow"):
radius = 3
LumaMix = 0.5
ChromaMix = 0.5
SatMix = 0.5
c=last
blurry = c.bilinearresize(c.width/radius/4*4,c.height/radius/4*4).bicubicresize(c.width,c.height,1,0).tweak(sat=SatMix)
c.limitedsharpen(strength=100).mergechroma(blurry,ChromaMix)
mergeluma(logic(last,blurry,"max"),LumaMix).converttorgb32()
gicocu("C:\MediaTools\AviSynth 2.5\plugins\filmlook_02_.txt")
(I hope it runs as it is: fully untested, just typed off-the-cuff.)
Mug Funky
14th January 2005, 16:14
i'd gladly post a sample, but it's my ugly mug (funky) on it, and i don't want to end up as the next Star Wars Kid :)
E-Male
14th January 2005, 19:24
Originally posted by Mug Funky
...i don't want to end up as the next Star Wars Kid :)
E-Male wonders if that would be worth a few hours of rotoscoping.... *j/k*
E-Male
14th January 2005, 19:26
i gotta say that i'm quite happy how this thread progresses
i think we really are on a way of making a free and opensource alternative to some $1000+ software
scharfis_brain
14th January 2005, 19:39
If manao releases his next version of mvtools,
I will be able to knock out some nasty things of mvbob() .
(Do you have further ideas, Mug Funky?
which version of mvbob are you using?)
So we should get a very crisp progressive 25p (PAL)
or 23.976p (NTSC) out of our cheap interlaced cameras.
Afterwards, color correction
and iiP upsize to anamorphic 16:9 can be done,
because the electronic anamorpic mode of most of those cams is crap.
they commonly crop the 4:3 image to add a following interlaced upsize to 16:9. :(
DSP8000
15th January 2005, 03:41
Hi guys,
Looking at the thread and the amount of posts gives me hope for a real free solution.
I feel realy unhelpfull because I can't help in sort of improving the process because my knowledge in AVIsynth scripting is not so great:o
However, I'd like to say thanks to everyone participating in the development.
DSP8000
E-Male
15th January 2005, 05:35
wel, you can help
help by testing
morsa
15th January 2005, 05:53
Just a HINT:
If you were using a Macbeth Color chart you would notice that every film stock available out there will give you different colors for every color patch on that chart.And that is one of the key factors to achieve a film look.
The easiest way to replicate this thing would be getting a list of the response to every Macbeth color patch from a given Film Stock, then making a correction filter in the HSV or HSI color space to move those color ranges from the video footage to the desired film stock color list.
At least that is the system used by many filmlook plug-ins.
E-Male
15th January 2005, 06:57
ok, so we just need one lookuptable-file per film stock, nice
erm, where to get??
also i prefer having a little more freedom, for 2 reasons:
-sources differ, optimisation is possible when you have the material
-the "look" i wanna have might differ, maybe i want a blueish filtered look, giving a cold atmosphere, i could do this in the same step by just adjusting my curve
plus, even if i could just get a color chart some dv-cams, a movie cam and some kinds of film, ... it would be the boring way
part of the fun of getting this freeware/opensource film-look solution done is doing it ourselves
i learn from the programming, other peopel might improve their way with gimp, curves, colors, ...
no offense intended, if you can contribute any data and/or ideas, i'm thankful
communist
15th January 2005, 10:23
Great to see more people interested in getting something like this done.
Might be a coincedent but I just discovered this (http://forum.doom9.org/showthread.php?s=&threadid=88320). BBugsBunny has updated his Curves filter for VirtualDub, it now comes with a basic 'edit curve by mouse'. It lets you create / edit / import and export curves to an *.amp file.
All that is now needed is an improved 'edit by mouse - feature" cause right you'll have to slow down your mouse otherwise you'll get a spiky curve.
Still looks very promising and I hope it helps the programmers here in this thread as the sources for the filter are also available (under GPL).
E-Male
15th January 2005, 12:27
already replied to him
hope we can help each other with a feature or 2
Mug Funky
16th January 2005, 03:07
i'm intrigued by the macbeth colour patch thingy. i don't know precisely what those things are, but i think i get the idea.
we could do our own measurements, but would probably be limited to still film stocks rather than motion picture stuff. i could take a roll of kodachrome or something similar - all we need is a colour chart that can (a) give reliable and repeatable results, and (b) be easily downloaded so anybody can test it.
i see the beginnings of an opensource project here - i'm sure most colour charts out there are protected by intellectual property laws (i'm not sure if it'd count as a patent or a copyright or both), but i'm sure some cleverdicks can create their own one. the real question is how to sync everything up colourwise. this kind of thing involves multiple conversions from digital to analog and vice versa, and at each stage it's a pain to determine whether the colours are being messed up along the way. so we need some kind of relative method where the result is a colour shift from "real" to "sampled", and all the conversions in between make negligible difference.
this is probably why most people just eyeball the difference...
[edit]
oh, and scharfi: i don't know what mvbob i'm using anymore... i put them all in the same avsi file and lost track of which was which. so i just call "mvbob" and it seems to work :). i consider it experimental, so it doesn't matter much as i don't use it in production situations.
E-Male
16th January 2005, 14:17
i daubt we can get much information that way without some budget
i think doing the curves from scratch is the best way
maybe if you know someone with access to magic bullet or something similar, ask him for some before-after-clips, so we can see how close we can get
Mug Funky
16th January 2005, 17:04
that's a pretty good idea... just run some 256x256 white-to-black gradients through it and we can get an exact match (save for a bit of banding, maybe)
Leak
16th January 2005, 17:21
Originally posted by Mug Funky
that's a pretty good idea... just run some 256x256 white-to-black gradients through it and we can get an exact match (save for a bit of banding, maybe)
I'd add red, green, blue, cyan, yellow and magenta gradients (at least) to that list, as I don't think it'll only have a different luminosity curve...
np: Zorn - Michelle's Unblockable (The City's Collapsing (But Not Tonight))
E-Male
16th January 2005, 18:41
is it sure that MB only does a color curve and spatial and/or temporal filtering?
but all in all running some test images through might give us some LUTs to work with
morsa
17th January 2005, 03:55
I can gather the info about every film stock for free.
Problem is It will take some time..
Also try google and you'll find the macbeth chart and its color values in SRGB.
Mug Funky
17th January 2005, 03:58
leak: a greyscale gradient in RGB colour should be enough - the output would be a slightly coloured gradient, no?
of course, having a whole bunch of gradients might help if magic bullet works in some way i hadn't anticipated (like separating colours out and treating them separately, rather than just 1 curve per channel like we're trying to get here).
Morsa: that would be very cool indeed :)
E-Male
17th January 2005, 15:37
another thing about filmlook we might be able to do:
AFAIK on film you have a stronger difference between the in-focus and out-of-focus parts of the picture (most noticable when you shift the focus between a person in the forground and one in teh background)
now could this be imitated by blurring unsharp and sharpening sharp parts?
for example by using my (primitive) sharpnes mask (or something more advanced) with (for example) blur and limitedsharpen...?
DSP8000
17th January 2005, 15:51
Hi,
@ E-Male, did you get my email and the images?
Good reference for some of the MB looks are Harry Potter, Catwoman, most of the new DVD movies.
Bluring with edge detection and detail preservation would be a good starting point before coloring.
DSP8000
Didée
17th January 2005, 15:54
E-Male: Basically, yes. But it's not quite that easy: you would need a blur function that blurs with a rather big radius, but stops using any pixels in a certain direction for averaging as soon as an "edge" is found.
Unrestricted blurring, and applying the result to the "non-ede" areas only, leads to suboptimal results (already tried that, many times). It gets better by using a smart smoother, but that doesn't solve the basic problem of including pixels "from the other side" of an edge into averaging (although it's probably not an issue with blurring radii <= 5, or so).
E-Male
17th January 2005, 17:53
@DSP8000:
yep, got them
would be great if you could make new ones when we got some dv-test-footage (as mentioned i prefer close-ups of faces) and/or some test-paterns
@didée:
"out of focus" means totally blurred, so why stop at edges??
doesn't make any sense to me
(although such a denosier would be similar to something have on my ideas-to-code-list, just for cartoons)
i agree on the need for a big radius
is there a blur-filter with variable radius?
if not i'll quickly hack that together
tsp
17th January 2005, 18:10
is there a blur-filter with variable radius?
medianblur :rolleyes:
E-Male
17th January 2005, 18:32
wouldn't a simple averaging blur be more effective then median?
since in this case we WANT it blurred badly/strongly
tsp
17th January 2005, 19:04
it would yes. I just don't think anyone has made such a filter. Although you could use YV12Convolution it wouldn't be the most effective. I think I will make one. What colorspace do you need?
E-Male
17th January 2005, 19:14
i'd like to do it myself, i can use the training (doesn't mean you can't do one, too, of course)
morsa
18th January 2005, 02:09
Guys, if that were so easy nobody would be selling a 35mm lenses adaptor for MiniDV Camcorders at around U$ 8,000.
35mm DOF cannot be emulated using a filter, of course you can do it by hand...
www.pstechnik.de/datasheets/d_mini35.htm
E-Male
18th January 2005, 07:46
a) i did not say it would be easy, i never said that
b) i never said we would reach the quality of comercial projects, i even daubted it
c) there are many expensive things sold which have free alternatives
summa summarum: i won't stop because there is some expensive hardware avaible
and i hope the others here won't either
morsa
18th January 2005, 10:05
I never meant to stop you, if that is exactly what it sounded like.
Sorry.
I was just trying to say that it is "almost" impossible to make a filter that autonomously (if that is the intended way for it to work) detects what should be in focus and what should be out of focus.
Just that.
Sorry again, it seems everytime I say anything I upset you.
E-Male
18th January 2005, 10:50
i'm sorry, too
i often sound ruder than i want, too
it's just that to me you sound very negative, but i'm overreacting, i know
about the focus thing, i know it will only help a bit, if at all
but it can be improved, maybe to something usefull, we'll see
i know it'll be slow, but we got some people here that won't be stopped by that
if nothing usefull comes out at the end, i guess the experience will still make it worth it
maybe we should make a list of the variouse part that could/should be in a film-look-script (like sharpening, color curve, ...)
so we can later mark which are done in freeware, which are to improved, which are less neccessary as we thought, ....
Mug Funky
18th January 2005, 13:22
one way to get _slightly_ more DOF is to move the camera back and zoom in a little. obviously the aperture should be open as far as it can be.
i'm intrigued by the DOF simulation in avisynth though. it may be possible to get something that looks okay, but i think DOF isn't all that big a part of the film "look". perhaps something that uses edge-direction to adapt the shape of the filter around edges (this might give a "warpy" look though, and be slow as hell).
look at a film like "24 hour party people" that was actually shot in PAL, interlaced (i didn't realise this until i looked at the out-takes that were still interlaced. though when you watch it critically, it's quite obvious in places).
E-Male
18th January 2005, 14:37
is it correct that DV also shows blur on out-of-focus objects, just much less than film?
Didée
18th January 2005, 15:04
I'm curious how you'll try to make the distinction between in-focus and out-of-focus areas. An edgemask-approch will, depending on sensibility, either detect too much edges in the flat areas, or consider parts as out-of-focus that are actually in ...
Before too much fiddling is done, I could imagine that e.g. VagueDenoiser can be set up so that something (roughly) similar is achieved: blur the flat parts, keep the detail.
Bilateral filtering could also be a possibility, when setting the thresholds so that the assumingly "flat" areas just get catched.
edit:
Think about *skin*: A scene of a face that fills 30%-50% of the frame, background is out of focus. But too much area of the skin will show little enough detail to be considered out of focus, although it is in. - Naah, I don't want to think about that any more :(
E-Male
18th January 2005, 15:34
ok, let's put that sub-topic on hold, i'll report if i get something usefull done there
so, back to making a list:
-colors [very well in progress]
-sharpening [well in progress]
-grain(optional)[done]
-focus(laaaaater)
-..........
please add
Didée
18th January 2005, 16:07
-grain(optional)[done]
Hey! You say "done", and didn't even see that "emboss noise":
o=last
ox=last.width
oy=last.height
blank1 = blankclip(o,width=ox/2 /4*4,height=oy/2 /4*4,color=$000000)
noise1 = blank1.addgrain(15,.0,.0)
noise2 = noise1.DEdgeMask(0,255,0,255,"2 0 0 0 1 0 0 0 0",U=-128,V=-128)
NoiseDiff1=yv12lutxy(noise1,noise2,yexpr="x y - 128 +",U=-128,V=-128).bicubicresize(ox,oy)
x=yv12lutxy(o,NoiseDiff1,yexpr="x y 128 - 1.0 / +",U=2,V=2)
blank3 = blankclip(o,width=ox/2 /4*4,height=oy/2 /4*4,color=$808080)
noise3 = blank3.addgrain(15,.0,.0)
noise3a = noise3.FineEdge(1).levels(0,1.0,255,128-15,128+15).greyscale
noise3b = noise3a.DEdgeMask(0,255,0,255,"2 0 0 0 1 0 0 0 0",U=-128,V=-128)
NoiseDiff2=yv12lutxy(noise3a,noise3b,yexpr="x y - 128 +",U=-128,V=-128).bicubicresize(ox,oy)
y=yv12lutxy(o,noisediff2,yexpr="x y 128 - 1.0 / +",U=2,V=2)
#NoiseDiff1
NoiseDiff2
return last
#===================================================
function FineEdge( clip clp, int "div" )
{ logic( clp.DEdgeMask(0,255,0,255,"8 16 8 0 0 0 -8 -16 -8", divisor=div)
\ ,clp.DEdgeMask(0,255,0,255,"8 0 -8 16 0 -16 8 0 -8", divisor=div), "max", Y=3,U=2,V=2 ) }
Code suffers from major uglyness, I just teared it out of one of those brainstorming scripts ;) - but it's fun to play around with it (different strenghts & blankclip-sizes)
Guest
18th January 2005, 17:15
@E-Male
Other neat things could be black, warm, cold glows - or maybe this can be done with Didée's script above?
And maybe gradients in color/b&w - to grade down a blown out sky, make it ex. more red/blue or darker - or to grade down the corners of the image like A short film about killing (http://www.dvdbeaver.com/film/DVDReview/short-killing.htm).
Great work!
Tin2tin
E-Male
18th January 2005, 19:11
@Didée:
i thought addgrain would do the job
but seems like you scripted together some improvement again
what does your script do exactly? (i honestly can't understand it all, except that you do something with edges and LUTs again)
@Guest:
the corners thing should be done with a mask i think
for the rest:
i'm a victim of my lack of vocabulary in this area (english isn't my native language)
"glow" and "gradient" need some explaination in this context
(googeling for "gradient definition" gave some nasty mathematic non-video-related stuff)
communist
18th January 2005, 19:43
Several gradients:
http://home.att.net/~arwomack01/images/CMYKRGB-TEST-GRADIENT.jpg
Glow-effect:
http://www.aons58.dsl.pipex.com/tutorials/graphics/glowing_text.jpg
How this should look like with real footage:
Original (http://www.stud.uni-goettingen.de/~s304280/D9/pics/original_.png)
The glowing version (http://www.stud.uni-goettingen.de/~s304280/D9/pics/glowing_.png)
And the glowing version with the mask used to limit the effect
Glow mask (http://www.stud.uni-goettingen.de/~s304280/D9/pics/glow_mask.png)
The effect is deliberately overdone ;)
E-Male
18th January 2005, 20:53
thx, very nice examples
but what would the gradient thing do in this context? (sorry, but i'm a bit slow today)
the glow thing, well, i knew it with text, plan to use a variation of it on titles
but in how far has this to do with film look? couldn't get that much info from the extrem picture (but nice messiah-look)
i'm also not sure how to do it in avisynth, i mean finding the edges is done, but i think the glow should only go to the outside of teh object, which cannot easily be found outomatically
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.