Not exactly, it's more subtle than that.
What ColourLike does is analyse the two histograms and construct a curve (actually 3 separate curves, for Y, U and V) that changes histogram1 into histogram2. It then applies those curves to the input video to produce the result. Thus, it is not trying to make Scene C look like A or B, but instead change Scene C in a similar way to the change from B to A.
So it's not necessary for Scene C to be the same as Scene B, although obviously it works best when the two contain a broadly similar distribution of colours (and best of all when C and B really are the same).
+ Reply to Thread
Results 31 to 60 of 182
-
-
I disagree. As a professionally shot video the cameras and production were likely very consistent and accurate. If it was recorded by one VCR the recording errors are likely to be similar for all shots. But I would use representative video clips rather than a single frame to generate the histograms. Especially not a frame with a highly artificial graphic covering most of it.
-
Italics/underline in the above quote are mine. I believe you stated more correctly the same thing I was getting at. That's a good summary of the what I think ColourLike attempts to do. I've used it on occasion to adjust some bad VHS (typical) variations in scenes whose levels and overall color balance should look as if they were shot at the same time under the same conditions. This is done with movies all the time, but of course studio gear is far more sophisticated. It works more often than not. The more similar the shots are, the better. But I've had it produce unintended disasters with too-dissimilar scenes that should have been corrected using other means. Basically, the histogram of a specific image wouldn't be appropriate for adjusting everything in an entire video, especially with the off-the-wall variations you find in VHS or in sloppy mastering. It isn't an auto-gain or auto-white-level filter -- and some of those can often go haywire, too.
Last edited by sanlyn; 23rd Oct 2011 at 08:02.
-
Last edited by sanlyn; 23rd Oct 2011 at 08:53.
-
-
That line seems to be a bit messed up with the forum formatting, so it's hard to tell what you really have.
It should be all on one line, including the ".Trim..." part following ConvertToYV12. -
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFms2.dll")
p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true).Trim(35 96,3727).Crop(10,4,-8,0)
p2=FFVideoSource("C:\Documents and Settings\Administrator\My Documents\Downloads\Cher - Rosie ODonnell Interview [1996].flv").AssumeTFF().ConvertToYV12(interlaced=false) .Trim(2942,3051).Crop(32,6,-32,-8)
p1.WriteHistogram("Cher Rosie.hist.txt", 10)
p2.WriteHistogram("Cher - Rosie ODonnell Interview [1996].hist.txt", 10)
AviSource("Cher Rosie clip.avi")
ConvertToYV12(interlaced=true)
ColourLike("Cher Rosie.hist.txt", "Cher - Rosie ODonnell Interview [1996].hist.txt")
AssumeTFF()
MergeChroma(last,McTemporalDenoise(last, settings="very high", edgeclean=true, ecrad=3, stabilize=true, maxr=2, interlaced=true))
ConvertToRGB32(matrix="Rec601",interlaced=true).Cr op(11,4,-13,0)
AddBorders(12,4,12,0)
LanczosResize(704,480)
and this time VirtualDub crashed saying: An exception occurred in module 'kernel32'.
crashinfo.txt:
VirtualDub crash report -- build 32842 (release)
--------------------------------------
Disassembly:
Built on Aegis on Fri Dec 24 13:18:44 2010 using compiler version 1400
Windows 5.1 (Windows XP x86 build 2600) [Service Pack 3]
EAX = 0006efa8
EBX = 00000002
ECX = 00000000
EDX = 00000170
EBP = 0006eff8
ESI = 0006f038
EDI = 0006f038
ESP = 0006efa4
EIP = 7c812afb
EFLAGS = 00000206
FPUCW = ffff027f
FPUTW = ffffffff
Crash reason: Unhandled Microsoft C++ Exception
Crash context:
An exception occurred in module 'kernel32'.
Pointer dumps:
EAX 0006efa8: e06d7363 00000001 00000000 7c812afb 00000003 19930520 00000000 00000000
ESI 0006f038: 000000ee 0121fa13 00000000 00000000 00b675bc 0006f06c 014c9830 00000000
EDI 0006f038: 000000ee 0121fa13 00000000 00000000 00b675bc 0006f06c 014c9830 00000000
ESP 0006efa0: 00000000 01234864 e06d7363 00000001 00000000 7c812afb 00000003 19930520
0006efc0: 00000000 00000000 014c9878 00000000 00000000 0006efc0 ffffffff 0006f054
0006efe0: 77c35c94 77c12088 ffffffff 77c2c3ce 77c2c3e7 00000038 0006f038 01222b1f
0006f000: e06d7363 00000001 00000003 0006f02c 000af1dc 00b675bc e06d7363 00000001
EBP 0006eff8: 0006f038 01222b1f e06d7363 00000001 00000003 0006f02c 000af1dc 00b675bc
0006f018: e06d7363 00000001 00000000 00000000 00000003 19930520 00000000 00000000
0006f038: 000000ee 0121fa13 00000000 00000000 00b675bc 0006f06c 014c9830 00000000
0006f058: 000af1dc 0012f204 012330b8 00000000 01214d0d 00b675bc 00000170 00000003
Thread call stack:
Could not open debug resource file (VirtualDub.vdi).
-- End of report -
And here's what AvsPmod says when I open that script:
Traceback (most recent call last):
File "AvsP.pyo", line 7380, in OnMenuVideoRefresh
File "AvsP.pyo", line 10970, in ShowVideoFrame
File "AvsP.pyo", line 11437, in UpdateScriptAVI
File "pyavs.pyo", line 167, in __init__
File "avisynth.pyo", line 117, in Invoke
WindowsError: [Error -529697949] Windows Error 0xE06D7363 -
I can't understand why VDub should crash, but anyway, try splitting the line over two lines like this:
Code:p2=FFVideoSource("C:\Documents and Settings\Administrator\My Documents\Downloads\Cher - Rosie ODonnell Interview [1996].flv") \ .AssumeTFF().ConvertToYV12(interlaced=false).Trim(2942,3051).Crop(32,6,-32,-8)
-
Still not taking it
...I don't get it either. Never worked with ColourLike using videos for my histograms before but I'm trying to figure it out -
Something very strange going on.
Is it still saying "invalid arguments to ConvertToYV12"?
It's a long shot, but perhaps the very long file name is causing some sort of memory corruption in FFVideoSource - try renaming the file to something shorter (without '[' and ']' characters).
Also, I assume the space between 35 and 96 on the preceding Trim line is just an artefact of the forum formatting? -
Yeah that's just the forum formatting. Whenever I open the script like this it does just fine:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFms2.dll")
FFVideoSource("C:\Documents and Settings\Administrator\My Documents\Downloads\Cher - Rosie ODonnell Interview [1996].flv")
...so I doubt it has anything to do with the file name? It's not giving me the "invalid arguments" line any longer it's simply crashing now and giving that "kernel" error -
You could try splitting the script in two - write the histograms in one script and do the processing in the other.
That also has the advantage that later you can experiment with adding/changing filters without having to regenerate the histograms (which takes time and memory). -
I took the square brackets out and split the script in two and it's still crashing on me. I'm puzzled lol
-
Script one:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFms2.dll")
p1=AviSource("Cher Rosie.avi")
\.ConvertToYV12(interlaced=true).Trim(3596,3727).C rop(10,4,-8,0)
p2=FFVideoSource("C:\Documents and Settings\Administrator\My Documents\Downloads\Cher - Rosie ODonnell Interview 1996.flv")
\.AssumeTFF().ConvertToYV12(interlaced=false).Trim (2942,3051).Crop(32,6,-32,-8)
p1.WriteHistogram("Cher Rosie.hist.txt", 10)
p2.WriteHistogram("Cher - Rosie ODonnell Interview 1996.hist.txt", 10)
Script two:
AviSource("Cher Rosie clip.avi")
ConvertToYV12(interlaced=true)
ColourLike("Cher Rosie.hist.txt", "Cher - Rosie ODonnell Interview 1996.hist.txt")
AssumeTFF()
MergeChroma(last,McTemporalDenoise(last, settings="very high", edgeclean=true, ecrad=3, stabilize=true, maxr=2, interlaced=true))
ConvertToRGB32(matrix="Rec601",interlaced=true).Cr op(11,4,-13,0)
AddBorders(12,4,12,0)
LanczosResize(704,480) -
Is it "script 1" that crashes?
To eliminate FFVideoSource from suspicion, can you use DirectShowSource instead?
(That requires you to have an appropriate DirectShow splitter and codec for the file). -
I'm not sure if you saw my DirectShowSource question as I edited my post during your last reply.
-
Is still crashing with:
p1=AviSource("Cher Rosie.avi")
\.ConvertToYV12(interlaced=true).Trim(3596,3727).C rop(10,4,-8,0)
p2=DirectShowSource("Cher - Rosie ODonnell Interview 1996.flv")
\.AssumeTFF().ConvertToYV12(interlaced=false).Trim (2942,3051).Crop(32,6,-32,-8)
p1.WriteHistogram("Cher Rosie.hist.txt", 10)
p2.WriteHistogram("Cher - Rosie ODonnell Interview 1996.hist.txt", 10)
and just to make sure I opened this and it worked just fine:
DirectShowSource("Cher - Rosie ODonnell Interview 1996.flv")
Info() -
Eliminate everything and then add back commands one by one until you find what's causing the problem.
p1=AviSource("Cher Rosie.avi")
return p1p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true)
return (p1)p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true).Trim(35 96,3727)
return(p1)p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true).Trim(35 96,3727).C rop(10,4,-8,0)
return(p1) -
That seems to suggest the crash is caused by WriteHistogram().
As an experiment, try removing both calls to Crop and see if it makes a difference.
The reasoning is that Crop alters the internal structure of the video (technically, it changes the pitch), and some (badly written) filters cannot cope with that - perhaps (just perhaps) WriteHistogram is like that. -
ok the crash lies here:
p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true)
return (p1)
but there again that looks right to me? -
I tried:
p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true).Trim(35 96,3727)
p2=DirectShowSource("Cher - Rosie ODonnell Interview 1996.flv").AssumeTFF().ConvertToYV12(interlaced=fa lse).Trim(2942,3051)
p1.WriteHistogram("Cher Rosie.hist.txt", 10)
p2.WriteHistogram("Cher - Rosie ODonnell Interview 1996.hist.txt", 10)
with the Crop functions removed as Gavino suggested and that did work...however I remember Jagabo saying that I needed to not have the borders in the video image when building the histograms for Colourlike. That's not a direct quote but it was something along those lines several posts back when I inquired about using Video sources for ColourLike rather than stills. -
I assume this means I should trim/crop the P1 and P2 video sources prior to running my ColourLike script.
-
Similar Threads
-
DVD playback problem, possibly a file structure problem?
By snuhmcsnort in forum Newbie / General discussionsReplies: 8Last Post: 17th Aug 2010, 04:23 -
problem after problem - dvd architect, not enough room in temp files
By jgeck90 in forum Newbie / General discussionsReplies: 7Last Post: 1st Dec 2008, 03:35 -
HDD problem, gigabyte's easy tune major problem and etc....
By MidnightMike in forum ComputerReplies: 4Last Post: 28th Jul 2008, 21:57 -
video card problem causing watching movies problem?
By vipertongn in forum ComputerReplies: 3Last Post: 11th Jun 2008, 11:39 -
WinTV PVR 150 problem and Geforce 7600 GS problem
By deck in forum Capturing and VCRReplies: 5Last Post: 16th Jun 2007, 03:03