View Full Version : SWORD OF JUSTICE DVD - Colour Correction request
mantis2k
19th October 2005, 14:51
I'm writing this post, regarding the possible colourisation of a very worn out widescreen print of the subject film, using a better quality fullscreen print for colour reference. If anyone is familiar with this technique, could you please download and take a look at the following clips:
Download widescreen clip... (http://www.rarekungfumovies.com/new/widescreen.m2v)
Download fullscreen clip... (http://www.rarekungfumovies.com/new/fullscreen.m2v)
If the print is not damaged beyond repair, perhaps it would be possible to devise a colour correction scheme to be used on the entire movie, based on the one scene above? I would prefer a solution using AviSynth, although willing to try any method you might suggest, and would be appreciative of any help!
Sword Of Justice is scheduled for a UK DVD release in January 2006 on the Rarescope label, owned by DVD.COM Ltd.
Mug Funky
21st October 2005, 06:15
which sword of justice is this? is this one of the Hanzo the Razor series (with shintaro katsu, the guy who plays Zatoichi)? if so there's a very good US DVD of it, and a very good R4 PAL DVD coming out soon. they're both off a freshly resotred film transfer.
[edit]
nm, i saw your source and it's clearly not the same movie... lucky for you, cause the hanzo movies are basically violent '70's porn :)
Bester
21st October 2005, 11:57
Do you think of sth. like this?
http://img488.imageshack.us/img488/4043/colorizationtest0hk.jpg
(The colors are not the native colors)
mantis2k
21st October 2005, 12:09
is this one of the Hanzo the Razor series (with shintaro katsu, the guy who plays Zatoichi)?
That's a Japanese film, but this Sword of Justice is a rare Taiwan film from 1980.
http://www.rarekungfumovies.com/new/SwordofJustice.jpg
Do you think of sth. like this?
It's hard to tell from that frame; could you please post a pic with the green and red sheets in the background? Is your solution easily applicable for the whole scene/movie? Cheers.
Bester
22nd October 2005, 17:12
I used this tool:
http://akvis.com/en/coloriage/index.php
Every pic has to be colorized, I think this is not what you are looking for...
Another try is to layer the two versions. results are not that bad:
http://img434.imageshack.us/img434/5457/overlaytest24dz.jpg
But problems arrise with keeping the movies in sync and the missing information on the sides (widescreen is wider :))
So there is no easy way.
I've read somewhere that the recolorization of the old star wars movies was done frame by frame,
50-60 specialists worked at least one month each film.
mantis2k
22nd October 2005, 18:03
Okay, thanks! How do you layer the 2 versions? Which software?
Bester
22nd October 2005, 18:37
For equal framerates use the avisynth fps stuff.
The fullscreen movie seems to be interlaced, should perhaps be deinterlaced.
For layering you could use:
a = widescreensource #perhaps with greyscale()
b = fullscreensource
overlay(a, b, x = 0, y = 0, mode = "chroma", opacity = 1)
#or
#overlay(a, b, x = 0, y = 0, mode = "blend", opacity = 0.5)
#with values of your preferrence
I also applied a gradation curve plugin in Vdub.
mantis2k
22nd October 2005, 19:36
Interesting concept, but how would you synchronise the 2 prints together? Even if I converted the fullscreen version to PAL, they would still run at slightly different speeds, and there is constant cuts throughout the fullscreen version.
How could I change the X offset at a given key frame/time?
What's the difference between blend and chroma?
Is there any guides for this?
Bester
23rd October 2005, 13:22
Even if I converted the fullscreen version to PAL, they would still run at slightly different speeds, and there is constant cuts throughout the fullscreen version.I haven't dealed with NTSC to PAL conversions yet. Perhaps you have to adjust the movies every scenechange.
What's the difference between blend and chroma?The modes are described in the avisynth doc.
What would you do with the sides, they don't get any color?
Even if you could match them, you will have to postwork every frame.
So in the end it may be a waste of time :(
But of course image quality could be improved in the widescreen version with noise reduction and scratch removal...
mantis2k
23rd October 2005, 13:26
Perhaps you have to adjust the movies every scenechange.
Please can you tell me how to do this? And how do I change the X/Y offsets at a given frame/time?
What would you do with the sides, they don't get any color?
Increase the saturation!
Bester
23rd October 2005, 14:59
With Avisynth:a=avisource("C:\...\full.avi").changefps(25).addborders(0,48,0,48) # brute force
b=avisource("C:\...\wide.avi")
# cutting from scenechange to scenechange, also look up deleteframe() in docs
c = a.trim(121,417) ++ a.trim(421,0) # ...
d = b.trim(119,417) ++ b.trim(418,0) # ...
stackvertical(d,c).reduceby2()You could also run 2 instances of VdubMod with the 2 movies to trim one by deleting frames.
For adjusting the x,y params there is animate(). But animating will blow up your script.
It would be easier to use a gui video editor like premiere or afx or even an image editor...
Bester
23rd October 2005, 15:20
Or if you give me one or two days, I could write you a gui application for setting the trim points which outputs an avs script. This could be done easily.
Mug Funky
23rd October 2005, 17:44
if both versions are the same cut, then you'll only have to adjust the framerate (and use changefps and perhaps a deblender if it's interlaced) on 1 version.
if the movies are cut differently, then you'll have to use an NLE program with a decent timeline to lay the videos over each other and line them up scene-for-scene. this isn't toooo hard, but it takes getting used to (depends how heavily edited the 2 cuts are). if you're doing this, you MUST match the speeds up first, or you'll be wasting lots of time cutting every few frames. if matching speeds is too hard because there's too many edits, try using the audio (you can get lucky if there's a TV pilot tone present in both audio tracks - just find the frequency and match it to the other one, then with a simple bit of maths you can find exactly what the speed difference is. it's way less painful than cutting and dropping/adding frames every few seconds).
most good PC based NLE programs support avisynth exporting where you can do the actual overlaying of the chroma from one film onto the other.
as for the sides, i've no idea of a practical solution (there's some exotic colourisation techniques out there that use artificial intelligence to guess the colours off a reference, but none of that's available in free tools).
you could of course wait for a better DVD release. unfortunately some movies just don't generate enough interest to make it worth anyone's while to release it. and stuff that does get licensed/released often comes from the same crappy master (weatherwoman and weatherwoman returns are good examples - all sourced from what looks to be one-inch analog tapes with composite crawlies all over it, plus blended fields even in the NTSC sources. the cost of a decent new digital transfer of such films isn't justifiable by the amount of people that will actually buy them on DVD). let's hope people care enough about this particular movie to give it what it deserves.
mg262
23rd October 2005, 19:40
Matching up the versions:
http://forum.doom9.org/showthread.php?t=95115&highlight=LineUpScenes
This requires short sections of the two clips to be synchronised if they were run at the same frame rate -- i.e. 100 frames of one must be 100 frames on the other. (This wasn't actually the case in the source as I created this for, but restore24 solves that nicely :).) If you can detect the cuts with it, you can use Trim or I have a (unreleased) plug-in that makes it a little more convenient.
You might (or might not) also get some joy with this:
http://forum.doom9.org/showthread.php?t=96308&highlight=ColourLike
It will work from that one scene's worth of data. It will increase the saturation, etc appropriately... but unlike chroma-dubbing, chroma noise will be preserved...
mantis2k
23rd October 2005, 22:44
c = a.trim(121,417) ++ a.trim(421,0) # ...
d = b.trim(119,417) ++ b.trim(418,0) # ...
If my understanding is correct, a particular scene starting at frame 121 and 119 in the fullscreen and widescreen versions respectively ends exactly at frames 417 in both versions? 4 frames are then cut from the fullscreen version to bring the start of the next scenes in line with the widescreen version?
stackvertical(d,c).reduceby2()
I just looked up this function... Very clever! I didn't know you could this...
Unfortunately, I don't think this would work for the most part because the fullscreen version is cut, and the widescreen version contains more footage. Therefore I would need to somehow add some invisible frames to space out the fullscreen video beside the widescreen video if that makes sense? In other words, when synchronising audio, you either delete part of a silent pause or add silence. In this context, you seem to be deleting frames, but not adding any silent frames.
Or if you give me one or two days, I could write you a gui application for setting the trim points which outputs an avs script. This could be done easily.
Thanks for the offer, but what about VirtualDub? I think I would have to write the script one adjustment at a time, and keep re-loading it?
mantis2k
23rd October 2005, 23:13
if the movies are cut differently, then you'll have to use an NLE program with a decent timeline to lay the videos over each other and line them up scene-for-scene. this isn't toooo hard, but it takes getting used to (depends how heavily edited the 2 cuts are). if you're doing this, you MUST match the speeds up first, or you'll be wasting lots of time cutting every few frames. if matching speeds is too hard because there's too many edits, try using the audio (you can get lucky if there's a TV pilot tone present in both audio tracks - just find the frequency and match it to the other one, then with a simple bit of maths you can find exactly what the speed difference is. it's way less painful than cutting and dropping/adding frames every few seconds).
Both prints already run at a similar speed because I managed to audio dub it with only 25 - 30 adjustments. The main problem is the cuts in the fullscreen version (atleast 20!). Which software do you recommend for this? Will I have to re-encode and potentially downgrade the video after the editing has been done? Can the edits be outputted from a project to an AVS script?
most good PC based NLE programs support avisynth exporting where you can do the actual overlaying of the chroma from one film onto the other.
I think that answers my previous question, but would it keep a log of all the edits? Once I get started, hopefully it will all make sense to me then...
as for the sides, i've no idea of a practical solution (there's some exotic colourisation techniques out there that use artificial intelligence to guess the colours off a reference, but none of that's available in free tools).
Rather than colourising each frame or overlaying videos, this is the method I was expecting somebody to come up with, like a sort of colour map? However, I'm not sure if it would be very accurate or efficient...
you could of course wait for a better DVD release. unfortunately some movies just don't generate enough interest to make it worth anyone's while to release it. and stuff that does get licensed/released often comes from the same crappy master (weatherwoman and weatherwoman returns are good examples - all sourced from what looks to be one-inch analog tapes with composite crawlies all over it, plus blended fields even in the NTSC sources. the cost of a decent new digital transfer of such films isn't justifiable by the amount of people that will actually buy them on DVD). let's hope people care enough about this particular movie to give it what it deserves.
That is probably the last surviving print in the world! It was recently transferred from some reels, which were very worn out as you can see. I doubt the original film negative still exists. In Taiwan, they never preserved many Kung Fu movies, as they were made to be shown once at the theater then destroyed! Nobody cares about these movies... The fullscreen version came from Korea, and the film has never had a VHS release anywhere in the West. This will be the first DVD release in the world, and possible the last. I only know how to author DVDs, but it would be nice if I could learn the art of colourisation. I would like to do the best I can before they release Sword of Justice in the shops.
Aside from this overlay technique, can anyone please devise a simple colour correction scheme to be used on the sides (including increased saturation), as well as removal of noise and other defects throughout the whole picture? Could something like this be exported to an AVS script?
mantis2k
23rd October 2005, 23:54
http://forum.doom9.org/showthread.p...ight=ColourLike
It will work from that one scene's worth of data. It will increase the saturation, etc appropriately... but unlike chroma-dubbing, chroma noise will be preserved...
I would be very interested to give this a try, and would appreciate it if you could provide a suitable script to be used on my 2 clips above? Otherwise, it seems a bit too technical for me.
Many thanks to both of you for your help so far!
mantis2k
24th October 2005, 04:04
Got it to work with this script...
loadplugin("c:\program files\AviSynth 2.5\plugins\ColourLike_25Aug05.dll")
loadplugin("c:\program files\AviSynth 2.5\plugins\dgdecode.dll")
VHS=MPEG2Source("fullscreen.d2v",cpu=6)
DVD=MPEG2Source("widescreen.d2v",cpu=6)
WriteHistogram(VHS, "good.txt",100)
WriteHistogram(DVD, "widescreen.d2v.txt", 100)
colourlike("widescreen.d2v.txt", "good.txt", true, true,true)
It works exceptionally well at getting the fullscreen print to look like the widescreen print, but vice versa there's some horrible red hue(?) appearing everywhere. However, it was very interesting, and some parts did show improvement in colour. If the clips were longer, would the colour be more accurate?
mg262
24th October 2005, 20:26
Try the Polar versions (writepolarhistogram, polarcolourlike) which should be documented near the end of that thread (shout if you can't get them to work). They were developed specifically to prevent weird hues appearing... and I would myself use the polar versions for most things.
Also, you should specify what clip you're trying to recolour; something like
DVD.colourlike("widescreen.d2v.txt", "good.txt", true, true,true).
Although I think this may be the wrong way round...do you want
VHS.colourlike("good.txt", "widescreen.d2v.txt", true, true,true).
(The first text file used should be a profile of the source you're trying to recolour, or some part of it; the second text file should be a profile of the thing you're trying to make it look like.)
freeman34
25th October 2005, 13:45
my script
loadplugin("c:\program files\AviSynth 2.5\plugins\ColourLike_25Aug05.dll")
loadplugin("c:\program files\AviSynth 2.5\plugins\DGDecode.dll")
VHS=MPEG2Source("g:\vhs.d2v",cpu=6)
DVD=MPEG2Source("g:\dvd.d2v",cpu=6)
WriteHistogram(VHS, "good.txt",100)
WriteHistogram(DVD, "widescreen.d2v.txt", 100)
colourlike("widescreen.d2v.txt", "good.txt", true, true,true)
but in avisynth preview i have the error message
Evalute:system exception -stack overflow
(c:\program files\avsedit\avseditpreview.avs, line 15)
Evalute:system exception -stack overflow
(c:\program files\avsedit\avseditpreview.avs, line 15)
need help plz
mgh
28th October 2005, 15:42
Make sure neither clip has any black borders while using the colourlike function. If needed the letterboxing can be put back afterwards.
mg262
28th October 2005, 16:13
... passing it a clip to recolour as an argument wouldn't hurt either! See my last post.
freeman34
29th October 2005, 01:17
thanks i see now it work
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.