VideoHelp Forum




+ Reply to Thread
Page 2 of 7
FirstFirst 1 2 3 4 ... LastLast
Results 31 to 60 of 182
  1. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by sanlyn View Post
    I think you were trying to use the histogram from the title-card caps to make the scene of Cher match the title card scene. The script did this:

    1. Scene A posters (the master histogram you want to emulate) = write histogram as A_hist.txt
    2. Scene B posters (histogram of the scene that will be modded) = save as B_Hist.txt
    3. Scene C Cher (modify B posters to look like A posters, then change C's colors/levels to look like modified B poster colors/levels)

    The effect would be to make Cher's face look like the colors in the poster shots.
    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).
    Quote Quote  
  2. Originally Posted by sanlyn View Post
    you can't use one histogram to correct every minute of that video. So, not only does that avi have more than one scene (or more than one "shot", if you prefer the term), but it has multiple shots
    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.
    Quote Quote  
  3. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Gavino View Post
    Originally Posted by sanlyn View Post
    I think you were trying to use the histogram from the title-card caps to make the scene of Cher match the title card scene. The script did this:

    1. Scene A posters (the master histogram you want to emulate) = write histogram as A_hist.txt
    2. Scene B posters (histogram of the scene that will be modded) = save as B_Hist.txt
    3. Scene C Cher (modify B posters to look like A posters, then change C's colors/levels to look like modified B poster colors/levels)

    The effect would be to make Cher's face look like the colors in the poster shots.
    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).
    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.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by jagabo View Post
    Originally Posted by sanlyn View Post
    you can't use one histogram to correct every minute of that video. So, not only does that avi have more than one scene (or more than one "shot", if you prefer the term), but it has multiple shots
    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.
    The point I was trying to make, more clearly stated. Thanks again.
    Last edited by sanlyn; 23rd Oct 2011 at 08:53.
    Quote Quote  
  5. Originally Posted by Cherbette View Post
    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)


    That's the script I am working on for using video clips for the histograms instead...but for some reason I keep getting an error. Hmph...gonna keep toying with it. For one thing I don't think the youtube clip is interlaced...and it's 25fps...my raw capture is 29.97fps and interlaced.
    I still can't figure out what's wrong with my script...it looks right to me but I keep getting an error. Hmph
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Cherbette View Post
    I still can't figure out what's wrong with my script...it looks right to me but I keep getting an error.
    Do you get an error message?
    What is it?
    Quote Quote  
  7. Invalid arguments to function "ConvertToYV12" (Line 3)
    Quote Quote  
  8. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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.
    Quote Quote  
  9. 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
    Quote Quote  
  10. 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
    Quote Quote  
  11. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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)
    The '\' at the start (or end) of a line is taken as a line continuation by Avisynth.
    Quote Quote  
  12. 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
    Quote Quote  
  13. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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?
    Quote Quote  
  14. 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
    Quote Quote  
  15. I've seen many programs barf up on names with square brackets in them.
    Quote Quote  
  16. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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).
    Quote Quote  
  17. I took the square brackets out and split the script in two and it's still crashing on me. I'm puzzled lol
    Quote Quote  
  18. 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)
    Quote Quote  
  19. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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).
    Quote Quote  
  20. Yes sir
    Quote Quote  
  21. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    I'm not sure if you saw my DirectShowSource question as I edited my post during your last reply.
    Quote Quote  
  22. 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()
    Quote Quote  
  23. Eliminate everything and then add back commands one by one until you find what's causing the problem.

    p1=AviSource("Cher Rosie.avi")
    return p1
    p1=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)
    etc.
    Quote Quote  
  24. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    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.
    Quote Quote  
  25. ok the crash lies here:
    p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true)
    return (p1)

    but there again that looks right to me?
    Quote Quote  
  26. Originally Posted by Cherbette View Post
    ok the crash lies here:
    p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true)
    return (p1)
    Try:
    AviSource("Cher Rosie.avi")
    Info()
    Quote Quote  
  27. 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.
    Quote Quote  
  28. I assume this means I should trim/crop the P1 and P2 video sources prior to running my ColourLike script.
    Quote Quote  
  29. Originally Posted by jagabo View Post
    Originally Posted by Cherbette View Post
    ok the crash lies here:
    p1=AviSource("Cher Rosie.avi").ConvertToYV12(interlaced=true)
    return (p1)
    Try:
    AviSource("Cher Rosie.avi")
    Info()
    Cher Rosie.avi
    Click image for larger version

Name:	info.png
Views:	165
Size:	69.5 KB
ID:	9280


    Cher - Rosie ODonnell Interview 1996.flv
    Click image for larger version

Name:	info2.png
Views:	136
Size:	511.2 KB
ID:	9281
    Quote Quote  
  30. Crop leaving a mod4 frame size.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!