VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 42
Thread
  1. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    well, two, actually.

    I have been working with John Meyers 8mm restoration script, and it is truly amazing. On the vast majority of my transfers, which were good already, it has taken them to another level.

    But there are a very few, that because of the way they were shot, (probably high grain, but "fast", film) do have what I feel is excessive grain. Johns script is so nuanced, that when it runs into something like that, it can't be run at the default settings and must be adjsted. What I see happening is the already visible grain is being exaggerated by the script, and then sharpened. What I see is more grain than what was there originally, and I think it is the sharpening maybe, that puts a sort of halo around it. Or maybe the halo effect is what makes me think the grain is larger.

    But don't get me wrong, the script is amazing. The issue is I am not fluent enough with it to know what to adjust to deal with a sub standard source. It's me.

    And yes, this is the same section of film that I first approached you with, many months ago, about just a degraining script to treat it with.

    I'm sure John has run across things like it a time or two before, and he probably knows just exactly what values to tweak where, by how much, etc., to deal with it. I dug around in his script some last night trying to see if I could smooth it out some. The closest I came was a reduction of it by putting 0.0 ias the sharpening factor instead of the given 0.1. But to my eye, it still seemed to increase the graininess just a smidge.

    I also tried adjusting the denoising strength, as well as the bvec and fvec settings. But to be honest, I was shooting in the dark. I'm just not there yet, or even close, with avisynth.

    But I do absolutely love what his script does for my files, 90, 95, 99 percent of the time.

    John, (or anybody else who knows the involved functions) could you possibly tell me which variable(s) I should be tweaking, and which way, up or down?

    __________________________________________________ ____

    My second question is how to handle this, workflow wise. The few sections where I do have excessive grain, which needs special attention are very randomly placed. I really don't want to take them out of their place, as the films are chronological. But I can't just leave them where they are and let them get the default script treatment. Well, I could, but the quality takes a real hit.

    So I tried to think of workarounds. I'm concentrating on a Blu Ray as the delivery format at this time. I'll figure out DVD later.

    The thorny part is, if you remember, I just went through a long learning sequence in trying to minimize colorspace conversions by getting my workflow down to just Vegas and then into Avisynth, and out with a 264 file for authoring. Vegas will stay the same, so that leaves me with running avisynth two times, at different settings. Giving me two (or three, or whatever) 264 files.

    My solutions, in theory at least:

    I'm going to need to author them at some point, I haven't selected that program yet. Can I just make the part that was run through with script tweaks a seperate chapter? So for example I would have: a 264 file from the default script, a small 264 section with tweaked values due to my source being troublesome, then finish it up with the rest being another 264 file with the default settings? But each section being a "chapter"? Would the available authoring tools have that ability? That would work, if possible, I would think.

    My other thought:

    A year or so ago I did pick up VideoRedo H.264. I tried to see if I could use it's joiner, but it doesn't support elementary streams, "yet" as it says. It offered to mux it, and I have a variety of 264 outputs available (ts, mp4, mkv, etc) to me, but I would need to add some audio, or a dummy audio file or something to get it to mux. (Presently my files are video only) My question is, would going that route add in an extra instance of encoding, which I am trying to avoid?

    Those are what I thought of, but they may be bad ideas. Are there other options to deal with this new twist that I just found?

    Here is a Youtube upload showing the original and the (default) script processed. On a side note, I was chacking to see the resolution options, and it went all the way up to 2160P 4K. That was the first time I have seen that at youtube. It was simply a 264 upload, it's not 4K obviously, but that selection did give the most detail in my eyes.

    https://youtu.be/9FYoVyFwgOU

    John, I didn't do any color correction on the original yet, and I went with option 1, auto levels and auto white. I really like those results so far. I might switch to manual later.

    Thank you in advance for any suggestions anyone might have.
    Last edited by Bruce/Fl; 20th Apr 2016 at 10:15. Reason: edited to add notation about previously having looked at this particular section of film
    Quote Quote  
  2. John would be better suited to answer questions about his script, but I can say in general, for most mvtools2 denoising scripts, the "thsad" is the parameter you want to adjust for "strength". Higher numbers are stronger, remove more noise and details

    And if it's not working to your tastes, or can't make it work despite tweaking the settings, you can explore other approaches. Sometimes a different filter , or multiple filters, or different approach might work better for a certain section

    You can join scripts in avisynth, or apply different filters to different sections right in your script. What I'm trying to say is don't let the avisynth settings dictate where you divide up a "chapter" or "title" on BD. Let the content or narrative decide that. You can do all that in your script and output one video. There is no need to "join" them with something like videoredo or export multiple separate videos . If there is a natural break for a different title, like maybe you're in a different location for the shoot now, then fine, but don't divide it up on the account of different filter settings. Another reason you should do it that way is a technical reason - it's difficult to join VBV compliant BD streams, and ensure the compliance is kept. Just "joining" them with a regular joining software doesn't necessarily work. You might break compliance or have buffer overruns or underruns. The only "safe" way to do that is during a single encoding session for each title
    Last edited by poisondeathray; 20th Apr 2016 at 10:26.
    Quote Quote  
  3. One reason I made my own versions of VideoFred's script was that his was designed for pristine film that just came back from the lab, whereas my work is with really old film. If you read my original post in his first film restoration thread, you will see that I posted stills that showed exactly the same oversharpening and grain enhancement that you are getting. Pretty awful stuff. Here is that post:

    My Initial Post in VideoFred's Long Film Restoration Thread

    Therefore, I am very surprised at your results and wonder if you are really using my version of the script and, if you are, whether you have made significant changes to the default settings.

    I retained all of Fred's original "sections" in the variable setting of my script, so I think it is pretty easy to see which variables to tweak to avoid the problems you are having. For sharpening, which is the thing probably causing your problems, I usually start with:

    PRE_sharp_ness=85
    PRE_radi_us= 3
    Sharp_Strength = 0.1

    Also, you can try to fiddle with the Denoising Parameters. My starting point is:

    denoising_strength=300 #denoising level of first denoiser: MVDegrain()
    block_size= 16 #block size of MVDegrain
    block_size_v= 16
    block_over= 8 #block overlapping of MVDegrainMulti()

    These denoising parameters are from the version of my script that uses MRecalculate in the degraining section.

    I wasn't able to follow some of what you were asking in the second section of your post. I couldn't quite understand your workflow. However, for joining, ffmpeg can join just about anything. Also, VideoRedo can do a credible job of joining. If it can't join elementary streams, then why not render to something that it will join? Like I said, I couldn't follow the logic of your workflow, so I may be missing something.

    One other thing on your YouTube example: the results look way over-saturated. The colors are almost cartoonish. I don't think my script is capable of doing that, but if it did, then turn off the auto color and also the auto levels adjustments. I carried those over from VideoFred's original script (he has changed his script to have newer and better functions for these things) but I never use them because I have not found any auto tools that reliably change levels or colors, and they all screw up badly more often than they help.

    If you have some sections of the film that require different script settings, one solution is to render the entire film using one set of settings, and then do the entire film again, but with different settings. Render to a high-quality intermediate, put both back on your NLE timeline, and then cut between them as needed. I do that all the time.
    Last edited by johnmeyer; 20th Apr 2016 at 15:55. Reason: Fixed bad sentences in first paragraph
    Quote Quote  
  4. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by johnmeyer View Post
    One reason I made my own versions of VideoFred's script was that his was designed for pristine film that just came back from the lab, whereas my work is with really old film. If you read my original post in his first film restoration thread, you will see that I posted stills that showed exactly the same oversharpening and grain enhancement that you are getting. Pretty awful stuff. Here is that post:

    My Initial Post in VideoFred's Long Film Restoration Thread

    Therefore, I am very surprised at your results and wonder if you are really using my version of the script and, if you are, whether you have made significant changes to the default settings.
    I'll post the meat of the script (everything but the top third, the description of changes and stuff) in the next post or two so you can see what I am using presently. I did notice one time that I had two different versions of your script, there were subtle differences. (I copied at least one other version at some point straight off of an old post at Doom9 I believe. That probably explains why I had two slightly different scripts. It evolved.) I *believe* I am using the one you sent me via dropbox which you described as the "current" version of your script..

    I retained all of Fred's original "sections" in the variable setting of my script, so I think it is pretty easy to see which variables to tweak to avoid the problems you are having. For sharpening, which is the thing probably causing your problems, I usually start with:

    PRE_sharp_ness=85
    PRE_radi_us= 3
    Sharp_Strength = 0.1

    Also, you can try to fiddle with the Denoising Parameters. My starting point is:

    denoising_strength=300 #denoising level of first denoiser: MVDegrain()
    block_size= 16 #block size of MVDegrain
    block_size_v= 16
    block_over= 8 #block overlapping of MVDegrainMulti()

    These denoising parameters are from the version of my script that uses MRecalculate in the degraining section.
    OK, I do see some differences there. In the script you sent me, and which I just downloaded again to make sure, it has the presharp as 120, the 85 is commented out.

    Also, the denoising is different:

    denoising_strength= 600 #denoising level of first denoiser: MDegrain()
    block_size= 8 #block size of MVDegrain
    block_size_v= 8
    block_over= 4 #block overlapping of MVDegrainMulti()

    Would those two deviations cause what we are seeing? I won't be able to test them myself for about 6 hours, when I can get back on my personal machine. (I'll be at work on Gov't computers till then)

    Here is the script you sent me, as most current

    I wasn't able to follow some of what you were asking in the second section of your post. I couldn't quite understand your workflow. However, for joining, ffmpeg can join just about anything. Also, VideoRedo can do a credible job of joining. If it can't join elementary streams, then why not render to something that it will join? Like I said, I couldn't follow the logic of your workflow, so I may be missing something.
    Briefly, I was planning on doing Vegas (corrections) -> Avisynth (script) -> Vegas (rendering) I mentioned this in a post over at Doom9, and the suggestion to clean up my workflow. The discussion started here in this post. You may or may not remember it. http://forum.doom9.org/showthread.php?p=1759705#post1759705

    I (maybe unrealistically, or naively even) think the idea of doing minimal colorspace changes and reencoding is a good one. So my initial inclination is to try to keep it just Vegas -> Avisynth -> 264 file.

    One other thing on your YouTube example: the results look way over-saturated. The colors are almost cartoonish. I don't think my script is capable of doing that, but if it did, then turn off the auto color and also the auto levels adjustments. I carried those over from VideoFred's original script (he has changed his script to have newer and better functions for these things) but I never use them because I have not found any auto tools that reliably change levels or colors, and they all screw up badly more often than they help.
    Here is another version, this has manual levels and color. Again, the original is just that, straight from the cinepost scans. I haven't tweaked in Vegas on it yet.

    https://youtu.be/t-ZCyjQ2lVQ

    If you have some sections of the film that require different script settings, one solution is to render the entire film using one set of settings, and then do the entire film again, but with different settings. Render to a high-quality intermediate, put both back on your NLE timeline, and then cut between them as needed. I do that all the time.
    This is an option, and fairly easy, but that brings me back to where I started, going back in once again to the NLE for more encoding.

    And for all I know, an additional trip into Vegas might not have any effect that my or anybody elses eyes can see, due to the quality of the source material. So PDR's suggestion of doing it in the script does intrigue me. Now, I of course have no idea on how to do that, but maybe I will get educated some more soon?

    I'll post the script that I have been using. Maybe you'll see something else in that version I was sent that looks "off". The only corrections I made was changing the size to 1920x1080, and I also adjusted the temp crop values to 240 to eliminate the pillarboxes.

    Oops, I also changed the initial fps with *assumefps(15000,1001)* and ended the script with *ChangeFPS(30000,1001)* to get it back to 29.97. I did those two tweaks because I am feeding the script 14.985 out of Vegas, because my source is pure 2:2 pulldown. I decimated half the frames in Vegas, instead of in the script. That helped ensure I didn't make any slightly off cuts in Vegas.

    But other than those size and cropping adjustments, the rest of the script is as you sent it to me.
    Quote Quote  
  5. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Code:
    #VIDEO FILE
    #----------------------------------------------------------------------------------------------------------------------------
    #Change the following line to point to your video file
    source=AVISource("C:\Users\Bruce\Desktop\fs.avi")
    
    
    #GENERAL PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    result="resultS4"                                  #specify the wanted output here 
    play_speed=16                                     #play speed (8mm=16; Super8=18; 16mm sound=24)
    
    
    #COLOR AND LEVELS PARAMATERS
    #----------------------------------------------------------------------------------------------------------------------------
    saturation=1.0                                                  #for all outputs
    gamma=1.0                                                       #for all outputs 
    blue= -0  red=-0                                                #manual color adjustment, when returning result3 & result4. Values can be positive or negative
    black_level=0  white_level=255 output_black=0  output_white=255 #manual levels, when returning result2 & result4
     
    
    #SIZE, CROP AND BORDERS PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    CLeft=16  CTop=16  CRight=16  CBottom=16                           #crop values after Depan and before final resizing 
    W=1920  H=1080                                                     #final size after cropping 
    bord_left=0        bord_top=0     bord_right=0     bord_bot=0      #720p= borders 150
    in_bord_left=240  in_bord_top=0  in_bord_right=240  in_bord_bot=0  #Borders around input that must be removed
    
    
    #STABILISING PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    maxstabH=20                                                      #maximum values for the stabiliser (in pixels) 20 is a good start value 
    maxstabV=20
    est_left=40  est_top=40  est_right=40  est_bottom=40             #crop and contast values for special Estimate clip
    est_cont=1.6
    
    #DENOISING PARAMETERS
    #----------------------------------------------------------------------------------------------------------------------------
    #denoising_strength=600                     #denoising level of first denoiser: MVDegrain() 
    #denoising_strength=300                     #denoising level of first denoiser: MVDegrain() 
    #block_size=   16                           #block size of MVDegrain
    #block_size_v= 16
    #block_over=    8                           #block overlapping of MVDegrainMulti()
    
    denoising_strength= 600                    #denoising level of first denoiser: MDegrain() 
    block_size=   8                            #block size of MVDegrain
    block_size_v= 8
    block_over=   4                            #block overlapping of MVDegrainMulti()
    
    #denoising_strength= 600                     #denoising level of first denoiser: MDegrain() 
    #block_size=   4                             #block size of MVDegrain
    #block_size_v= 4
    #block_over=   2                             #block overlapping of MVDegrainMulti()
    
    dirt_strength=23                            #sets amount of dirt removal (big spots)
    
    
    #FOUR STEP SHARPENING PARAMETERS
    #--------------------------------------------------------------------------------------------------------------------------------
    PRE_sharp_ness= 120   PRE_radi_us= 3              #presharpening (UnsharpMask) just after first denoising
    #PRE_sharp_ness= 85   PRE_radi_us= 3              #presharpening (UnsharpMask) just after first denoising
    
    LSF_sharp_ness=160 LSF_radi_us=2  LSF_sub=1.5     #second sharpening parameters (LimitedSharpenFaster) sub=subsampling
    
    #Sharp_Strength = 0.4
    Sharp_Strength = 0.1
    
    
    #AUTO LEVELS PARAMETER
    #--------------------------------------------------------------------------------------------------------------------------------
    X=4   #X is a special parameter for reducing the autolevels effect on the whites
    X2=4  #X2 is a special parameter for reducing the autolevels effect on the blacks 
    
    
    #NUMBER OF THREADS
    #--------------------------------------------------------------------------------------------------------------------------------
    threads=6
    
    
    # END VARIABLES, BEGIN SCRIPT
    #=================================================================================================================================
    
    
    SetMemoryMax(1000)
    
    #LoadPlugin ("mvtools2.dll")        #Version 2.5.11.9    2/24/2012
    #LoadPlugin("autolevels.dll")       #Version 0.6.0.0     1/09/2011
    #LoadPlugin("Deflicker.dll")        #Version 0.4.0.0     8/16/2004
    #Loadplugin("Depan.dll")            #Version 1.10.0.0    4/09/2007
    #LoadPlugin("DepanEstimate.dll")    #Version 1.9.2.0     3/25/2007
    #LoadPlugin("fft3dfilter.dll")      #Version 2.1.1.0     2/20/2007
    #Loadplugin("mt_masktools.dll")     #Version 2.0.23.0    3/14/2008
    #loadplugin("RemoveDirtSSE2.dll")   #Version 0.9         5/05/2005    
    #Loadplugin("RemoveGrainSSE2.dll")  #Version 0.9         5/01/2005
    #Loadplugin("removegrain.dll")      #Version 0.9         5/01/2005
    #Loadplugin("warpsharp.dll")        #                    4/05/2010
    
    
    #Use the following for alternative frame interpolation
    #loadplugin("svpflow1.dll")        #Version 1.2.1.0     5/29/2012
    #loadplugin("svpflow2.dll")        #Version 1.3.1.0     6/02/2012 
    #Import("InterFrame2.avsi")        #Version 2.1.0       6/27/2012
    
    #Import("LimitedSharpenFaster.avs")         #Not used in this script, but available if someone wants to experiment
    #LoadPlugIn("LimitedSupport_09Jan06B.dll")  #Used with LimitedSharpenFaster
    
    #Remove all setmtmode statements (there are three in this script) if not using multi-threaded (MT) AVISynth
    #setmtmode(5,threads)
    source1=AVISource("C:\Users\Bruce\Desktop\fs.avi").assumefps(15000,1001).ConverttoYV12(matrix="rec709").killaudio
    #source1= Avisource(film).assumefps(play_speed).converttoYV12()
    cropped_source=source1.crop(in_bord_left,in_bord_top,-in_bord_right,-in_bord_bot)               #remove any black borders on input video
    #setmtmode(2)
    
    #cropped_source=filldrops(cropped_source)     #Use this when removing bad frames that have been removed by duplicating previous frame
    
    
    #STABILIZING
    #....................................................................................................................................................................
    stab_reference= cropped_source.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).MT_binarize(threshold=80).greyscale().invert()
    mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=maxstabH,dymax=maxstabV)
    #stab=DePanStabilize(cropped_source,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=1,mirror=15).deflicker()
    stab=DePanStabilize(cropped_source,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=1,mirror=15)
    
    
    #DENOISING
    #...................................................................................................................................................................
    input_to_removedirt=stab.crop(CLeft,CTop,-CRight,-CBottom)
    stabcrop=RemoveDirtMC(input_to_removedirt,dirt_strength,false)
    
      prefiltered = RemoveGrain(stabcrop,2)
      superfilt =   MSuper(prefiltered, hpad=32, vpad=32,pel=2)
      super=        MSuper(stabcrop, hpad=32, vpad=32,pel=2)
    
      halfblksize= (block_size>4)   ? block_size/2 : 4
      halfoverlap= (block_over>2)   ? block_over/2 : 2
    
      bvec1 =  MAnalyse(superfilt, isb = true,  delta = 1, blksize=block_size, overlap=block_over,dct=0)
      bvec1 =  MRecalculate(super, bvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100) 
    
      fvec1 =  MAnalyse(super, isb = false, delta = 1, blksize=block_size, overlap=block_over,dct=0)
      fvec1 =  MRecalculate(super, fvec1, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
      bvec2 =  MAnalyse(super, isb = true,  delta = 2, blksize=block_size, overlap=block_over,dct=0)
      bvec2 =  MRecalculate(super, bvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
      fvec2 =  MAnalyse(super, isb = false, delta = 2, blksize=block_size, overlap=block_over,dct=0)
      fvec2 =  MRecalculate(super, fvec2, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
    #  bvec3 =  MAnalyse(super, isb = true,  delta = 2, blksize=block_size, overlap=block_over,dct=0)
    #  bvec3 =  MRecalculate(super, bvec3, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
    #  fvec3 =  MAnalyse(super, isb = false, delta = 2, blksize=block_size, overlap=block_over,dct=0)
    #  fvec3 =  MRecalculate(super, fvec3, blksize=halfblksize, overlap=halfoverlap,thSAD=100)
    
    
    #super =  stabcrop.MSuper(pel=2)
    #bvec1 =  MAnalyse(super, isb = true,  delta = 1, blksize=block_size, overlap=block_over,dct=0)
    #fvec1 =  MAnalyse(super, isb = false, delta = 1, blksize=block_size, overlap=block_over,dct=0)
    #bvec2 =  MAnalyse(super, isb = true,  delta = 2, blksize=block_size, overlap=block_over,dct=0)
    #fvec2 =  MAnalyse(super, isb = false, delta = 2, blksize=block_size, overlap=block_over,dct=0)
    #bvec3 =  MAnalyse(super, isb = true,  delta = 3, blksize=block_size, overlap=block_over,dct=0)
    #fvec3 =  MAnalyse(super, isb = false, delta = 3, blksize=block_size, overlap=block_over,dct=0)
    Quote Quote  
  6. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    and the rest

    Code:
    #Use the second line below, and un-comment two lines above if you want to average more frames. Doesn't seem necessary for most work IMHO.
    denoised=stabcrop.MDegrain2(super, bvec1,fvec1,bvec2,fvec2,thSAD=denoising_strength).levels(0,gamma,255,0,255).tweak(sat=saturation).unsharpmask(PRE_sharp_ness,PRE_radi_us,0)
    #denoised=stabcrop.MDegrain3(super, bvec1,fvec1,bvec2,fvec2,bvec3,fvec3,thSAD=denoising_strength).tweak(sat=saturation).unsharpmask(PRE_sharp_ness,PRE_radi_us,0)
    
    
    #SHARPENING
    #...................................................................................................................................................................
    sharp1=denoised.sharpen(Sharp_Strength)	
    #sharp1=limitedSharpenFaster(denoised,smode=1,strength=LSF_sharp_ness,overshoot=50,radius=LSF_radi_us, ss_X=LSF_sub, SS_Y=LSF_sub, dest_x=W - bord_left - in_bord_left - bord_right - in_bord_right,dest_y=H - bord_top - in_bord_top - bord_bot - in_bord_bot)
    
    PreBorderFrame = sharp1.Lanczos4Resize(W - bord_left - in_bord_left - bord_right - in_bord_right, H - bord_top - in_bord_top - bord_bot - in_bord_bot)
    
    #FRAME INTERPOLATION (optional)
    #...................................................................................................................................................................
    
    #superfps= MSuper(PreBorderFrame,pel=2)
    #backward_vec2  = MAnalyse(superfps, isb = true,blksize=16)
    #forward_vec2   = MAnalyse(superfps, isb = false,blksize=16)
    #PreBorderFrame = MFlowFps(PreBorderFrame,superfps, backward_vec2, forward_vec2, num=60000, den=1001, ml=200).SeparateFields().SelectEvery(4, 0, 3).Weave()
    
    #The following alternative can provide synthesized frames for hi-def material that causes MSuper to choke
    #////// Begin alternative to MFlowFPS ////
    #super_params="{pel:2,gpu:1}"
    #analyse_params="""{block:{w:32,h:32}, 
    #	main:{search:{coarse:{distance:-10}}},
    #	refine:[{thsad:200}]
    #        }"""
    
    #smoothfps_params="{rate:{num:60,den:16,abs:false},scene:{mode:0,limits:{scene:8500}},algo:21,cubic:1}"
    
    #The following provides smooth output
    #super = SVSuper(PreBorderFrame,super_params)
    #vectors = SVAnalyse(super, analyse_params)
    #PreBorderFrame = SVSmoothFps(PreBorderFrame,super, vectors, smoothfps_params, url="www.svp-team.com", mt=threads).SeparateFields().SelectEvery(4, 0, 3).Weave().assumefps(29.97)
    #////// End alternative to MFlowFPS ////
    
    
    #The following is another alternative that can provide synthesized frames for hi-def material that causes MSuper to choke. Probably better than the one above.
    #////// Begin alternative to MFlowFPS ////
    #PreBorderFrame=InterFrame(NewNum=30000,NewDen=1001,PreBorderFrame,GPU=true,Cores=threads)
    #////// End alternative to MFlowFPS ////
    
    #Change SetMTMode for Autolevels
    
    #SetMTMode(5,threads)
    
    #RESULT1: AUTOLEVELS,AUTOWHITE
    #......................................................................................................................................................................
    result1= PreBorderFrame.coloryuv(autowhite=true).addborders(X,0,0,0,$FFFFFF).addborders(0,0,X2,0,$000000).autolevels(filterRadius=2).crop(X,0,-X2,-0).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
    #RESULT3: AUTOLEVELS, MANUAL COLOR CORRECTIONS
    #.....................................................................................................................................................................
    result3= PreBorderFrame.coloryuv(off_U=blue,off_V=red).addborders(X,0,0,0,$FFFFFF).addborders(0,0,X2,0,$000000).autolevels(filterRadius=2).crop(X,0,-X2,-0).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
    
    #SetMTMode(2)
    
    
    #RESULT2: MANUAL LEVELS, AUTOWHITE
    #......................................................................................................................................................................
    result2= PreBorderFrame.levels(black_level,gamma,white_level,0,255).coloryuv(autowhite=true).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
    
    #RESULT4: MANUAL LEVELS, MANUAL COLOR CORRECTIONS
    #.....................................................................................................................................................................
    result4= PreBorderFrame.coloryuv(off_U=blue,off_V=red).levels(black_level,gamma,white_level,0,255).addborders(bord_left+in_bord_left, bord_top+in_bord_top, bord_right+in_bord_right, bord_bot+in_bord_bot)
    
    #PARAMETERS FOR THE COMPARISONS
    #.....................................................................................................................................................................
    W2= W+bord_left+bord_right
    H2= H+bord_top+bord_bot
    source4=Lanczos4Resize(source1,W2,H2)
    
    #COMPARISONS: ORIGINAL VS RESULTS
    #......................................................................................................................................................................
    resultS1= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result1,"autolevels, autowhite",size=28,align=2))
    resultS2= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result2,"autowhite, manual levels correction",size=28,align=2))
    resultS3= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result3,"autolevels, manual color correction",size=28,align=2))
    resultS4= stackhorizontal(subtitle(source4,"original",size=28,align=2),subtitle(result4,"manual colors and levels correction",size=28,align=2)).ChangeFPS(30000,1001)
    
    Eval(result)
    
    # END SCRIPT, BEGIN FUNCTIONS
    #=================================================================================================================================
    
    
    #REMOVE DIRT FUNCTION
    #......................................................................................................................................................................
    function RemoveDirt(clip input, int "limit", bool "_grey")
    {
      clensed=input.Clense(grey=_grey, cache=4)
      alt=input.RemoveGrain(2)
      return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)
    
      # Alternative settings
      # return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=true)
      # return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=false)
    }
    
    function RemoveDirtMC(clip,int "limit", bool "_grey")
    {
      _grey=default(_grey, false)
      limit = default(limit,6)
    
    #  prefiltered = fft3dfilter(clip,sigma=1,sigma2=2,sigma3=3,sigma4=5,bw=64,bh=64)
      
      prefiltered = RemoveGrain(clip,2)
      superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)
      super=MSuper(clip, hpad=32, vpad=32,pel=2)
    
      bvec = MAnalyse(superfilt,isb=true,  blksize=16, overlap=2,delta=1, truemotion=true)
      fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)
    
      bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=100)
      fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=100)
    
      backw = MFlow(clip,super,bvec_re)
      forw  = MFlow(clip,super,fvec_re)
    
      clp=interleave(forw,clip,backw)
      clp=clp.RemoveDirt(limit,_grey)
      clp=clp.SelectEvery(3,1)
      return clp
    }
    
    #This function is the previous way to do motion estimation. It is slower and not as accurate.
    function RemoveDirtMC_old(clip,int "limit", bool "_grey")
    {
      _grey=default(_grey, false)
      limit = default(limit,6)
      i=MSuper(clip,pel=2)
      fvec = MAnalyse(i,isb=false, blksize=16, delta=1, truemotion=true)
      bvec = MAnalyse(i,isb=true,  blksize=16, delta=1, truemotion=true)
      backw = MFlow(clip,i,bvec)
      forw  = MFlow(clip,i,fvec)
      clp=interleave(forw,clip,backw)
      clp=clp.RemoveDirt(limit,_grey)
      clp=clp.SelectEvery(3,1)
      return clp
    }
    
    # This function will remove near duplicates ("0.1") or exact duplicates (change to "0.0"). It replaces these
    # duplicates with a motion estimated frame. 
    # Use: In your video editor, replace any single bad frame (burned frame, jump, missing frame from splice, etc.) with a duplicate of the 
    # previous frame. Then, include a call to this function
    function filldrops (clip c)
    {
      super=MSuper(c,pel=2)
      vfe=manalyse(super,truemotion=true,isb=false,delta=1)
      vbe=manalyse(super,truemotion=true,isb=true,delta=1)
      filldrops = mflowinter(c,super,vbe,vfe,time=50)
      fixed = ConditionalFilter(c, filldrops, c, "YDifferenceFromPrevious()", "lessthan", "0.1")
      return fixed
    }
    Quote Quote  
  7. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    I was able to plug those other numbers in and run it through again before I had to leave. Here it is

    https://youtu.be/RsQu8fUx6Us
    Quote Quote  
  8. Originally Posted by Bruce/Fl View Post
    So PDR's suggestion of doing it in the script does intrigue me. Now, I of course have no idea on how to do that, but maybe I will get educated some more soon?
    RE: applying different filters to different sections in avisynth



    There are several ways to apply different filter settings to different sections in avisynth. It a topic comes up quite often . If you search there are probably a dozen slightly different ways

    The easiest is probably Trim() and Aligned Splice() . You just mix & match segments with ++. Other pretty common ways are ReplaceFrames, ReplaceFramesSimple, StainlessS has a few helper functions like ClipClop()

    If it's just a few different sections, I would probably use the 1st technique. It's the easiest and uses internal avisynth functions, no extra scripts or plugins. You can think of it as having multiple filtered versions but just joining the frame range that you want. But if you have many more sections, one of the other methods probably becomes easier to manage

    e.g. Lets say you have FilterA, FilterB, and FilterC. They might be different filter stack, different settings, it doesn't matter. It's just a simple example and it can become as complex as you need. Lets say you want to apply in the frame range

    Code:
    0-1000 unfiltered (original)
    1001-1500 FilterB
    1501-2000 FilterA
    2001-2500 FilterC
    2501-3000 unfiltered
    It would look something like this
    Code:
    original=AVISource()
    
    A=original.FilterA
    B=original.FilterB
    C=original.FilterC
    
    original.Trim(0,1000) ++ B.Trim(1001,1500) ++ A.Trim(1501,2000) ++ C.Trim(2001,2500) ++ original.Trim(2501,3000)

    If you have a lengthy script, you can just assign a named variable as "last". For example A=last. Or you can use a more descriptive name, like heavyfiltered=last , or lightlyfiltered=last

    For example

    Code:
    AVISource()
    .
    .
    .
    .
    .
    .
    .
    .a gazillion filters later
    .
    .
    
    A=last


    So this means everything from AVISource, plus all those gazillion filters is now called "A" . If you had another variation you could do the same thing and call it "B"

    Code:
    AVISource()
    .
    .
    .
    .
    slightly different filters, or strengths
    .
    .
    .
    B=last
    So all that is called "B" now

    And then you can use the Trim() to mix & match A or B filtered versions
    Quote Quote  
  9. Post the initial clip and I'll play with it.

    What is the resolution of the original capture? I generally avoid going much beyond SD resolution for 8mm or Super 8 because it doesn't look any better. 1920x1080 is a lot more than you need. Also, you end up with those huge black bars on the side that have to be cropped out. I find it a lot easier to feed the script a version of the film that has the exact aspect ratio of the film, even if it means using an oddball resolution. Then, when it is time to render, I pad out the sides with black bars to get to whatever format I'm rendering to (usually DVD for film projects).

    I'm focusing on the resolution you are using because there are some latent bugs in MVTools2 that only show up at HD resolution. I think those are fixed with a version that someone compiled for dither tools, and I may not have put that one in the DLL package. The easiest way for me to figure out if that is causing the denoising to malfunction is to try your video clip in my script, with my installed DLLs and see if I end up with the grain being emphasized. The MDegrain steps should reduce the grain enough so that when sharpening is applied it doesn't sharpen the original grain. If MDegrain isn't doing its job, the sharpening may make everything look bad.
    Quote Quote  
  10. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Thanks John, I'll load up my test clip first thing in the morning, I'm away from a computer with non regulated internet access at the moment.

    Your script makes the majority of my clips really shine, it is just those few with really heavy grain that give it problems it seems.
    Quote Quote  
  11. It shouldn't fail like that. There is something else going on.
    Quote Quote  
  12. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Here is the file. ProRes422

    https://www.dropbox.com/s/dyaidj5bq5t1bs8/Reel%207%20sample.mov?dl=0

    Curious to see if you get the same results. And if so, what the fix is.

    Thank you John.
    Quote Quote  
  13. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by poisondeathray View Post
    The easiest is probably Trim() and Aligned Splice() . You just mix & match segments with ++. Other pretty common ways are ReplaceFrames, ReplaceFramesSimple, StainlessS has a few helper functions like ClipClop()

    If it's just a few different sections, I would probably use the 1st technique. It's the easiest and uses internal avisynth functions, no extra scripts or plugins. You can think of it as having multiple filtered versions but just joining the frame range that you want. But if you have many more sections, one of the other methods probably becomes easier to manage
    I think I see the basic framework. I assume I would get the "break points", by looking at the frame count in Vegas?

    If it turns out I need to go that route, (and it looks like I might not) I'm sure I'll have a few syntax errors or something before all is done. So if that does happen, i'll be looking for an assist, no doubt.

    Thank you again.
    Last edited by Bruce/Fl; 21st Apr 2016 at 15:17. Reason: Fixed nested quote
    Quote Quote  
  14. I just killed half an hour trying to open your file. I don't have Quicktime installed. I tried converting it to uncompressed with ffmpeg, which usually works, but that didn't work this time. The problem is mine, not yours, but someone else will have to help you with this.
    Quote Quote  
  15. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by johnmeyer View Post
    I just killed half an hour trying to open your file. I don't have Quicktime installed. I tried converting it to uncompressed with ffmpeg, which usually works, but that didn't work this time. The problem is mine, not yours, but someone else will have to help you with this.
    Well shoot John, I'm sorry that you wasted all that time with no reward. And I figured if anybody could get to the bottom of it it would be you.

    So now I'm trying to figure out what to do next, in the thought that it is something that'll make the script work like normal, and not have to go the route of running different variations of the script for different segments.

    A few thoughts that came to mind, just brainstorming here.

    1. I am feeding your script an avi, coming out of Vegas via the DMFS. (Obviously I have QT and Vegas handles the .mov files for me) So, I am feeding it an avi. Is there a codec/output for all intents and purposes that is similar to the output of the DMFS, but that gives a complete file, and not a stream, like the frameserver? I could render it out of Vegas to that format, if there is one and upload it. That way you could then feed your script an avi. Quicktime issue now avoided on your end.

    2. Is there someone else you have interacted with in the past that is also running your script? Would they be open to taking a look at it, if they can accept .mov files? Yes, a long shot, and kind of presumptive on my part, but hey, you never know if you don't ask.

    3. You mentioned this earlier:

    I'm focusing on the resolution you are using because there are some latent bugs in MVTools2 that only show up at HD resolution. I think those are fixed with a version that someone compiled for dither tools, and I may not have put that one in the DLL package.
    Do you happen to have that info, or know where to find it? I threw those search terms in google, dither, hd, mvtools2, but haven't hit anything yet about some modified version yet.

    Just some quick thoughts.....

    Thank you
    Quote Quote  
  16. I had a few minutes to kill while waiting for my project to upload to YouTube. I got the source copied to a HuffYUV format.

    With big grain in that clip you have to increase the denoising parameter. I already suggested this in my previous post. Also, you have to make sure you have decimated your clip so that the duplicates are removed before you feed it to the script. I think you are already doing that. Once you increase the denoising to the maximum (there only so much that MDegrain can do), you have to eliminate all the sharpening.

    I color and gamma corrected in Vegas, and did the decimation there. I also cropped it to 1440x1080, to eliminated the black bars. I fed the result into the script. These are the parameters that I changed:

    W=1440 H=1080
    maxstabH=10
    maxstabV=10
    denoising_strength=3000
    block_size= 8
    block_size_v= 8
    block_over= 4
    dirt_strength=9
    PRE_sharp_ness= 10 PRE_radi_us= 3
    Sharp_Strength = 0.01

    I was going to upload the result, but when I played it in real time, even though the grain had been reduced, it looked like heck. The grain reduction simply isn't doing the job.

    I have no idea what to suggest. You'll have to look around for something else to deal with the grain.
    Quote Quote  
  17. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by johnmeyer View Post
    I had a few minutes to kill while waiting for my project to upload to YouTube. I got the source copied to a HuffYUV format.

    With big grain in that clip you have to increase the denoising parameter. I already suggested this in my previous post. Also, you have to make sure you have decimated your clip so that the duplicates are removed before you feed it to the script. I think you are already doing that. Once you increase the denoising to the maximum (there only so much that MDegrain can do), you have to eliminate all the sharpening.

    I color and gamma corrected in Vegas, and did the decimation there. I also cropped it to 1440x1080, to eliminated the black bars. I fed the result into the script. These are the parameters that I changed:

    W=1440 H=1080
    maxstabH=10
    maxstabV=10
    denoising_strength=3000
    block_size= 8
    block_size_v= 8
    block_over= 4
    dirt_strength=9
    PRE_sharp_ness= 10 PRE_radi_us= 3
    Sharp_Strength = 0.01

    I was going to upload the result, but when I played it in real time, even though the grain had been reduced, it looked like heck. The grain reduction simply isn't doing the job.

    I have no idea what to suggest. You'll have to look around for something else to deal with the grain.
    Thank you for your perseverance John, I truly do appreciate it.

    Would it be bad form to start a post over at Doom9 explaining what we are trying to do? There is tons of knowledge over there, just like yourself, but some concentrate on certain aspects, like you do as well. Maybe one or more are "grain" guys, heh.

    I don't want to step on any toes though.

    And thank you again.
    Quote Quote  
  18. I would definitely post again. Make it a very short, very focused post, something along the lines: "Here is a 15 fps film clip with too much grain. MDegrain2 fails to reduce the grain by much. Can anyone suggest a better approach?"
    Quote Quote  
  19. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by johnmeyer View Post
    I would definitely post again. Make it a very short, very focused post, something along the lines: "Here is a 15 fps film clip with too much grain. MDegrain2 fails to reduce the grain by much. Can anyone suggest a better approach?"
    I just put a post up over there while I was running the clip again using these new settings.

    It did seem to reduce the grain some, which is progress. I was contemplating just letting those really bad sections go through with no adjustments whatsoever. So, hey, progress!!

    Thank you
    Quote Quote  
  20. Member
    Join Date
    Feb 2011
    Location
    Gent, Flanders, Belgium, Europe, Earth, Universe
    Search PM
    This MOV clip can be loaded in Avisynth with FFVideoSource()

    I think the original capturing was already sharpened by the operator (at the source) and this is causing all your problems. So we must use some blur() before anything else. And crop the black borders of cource and remove the duplicate frames. Like this:

    Code:
    Loadplugin("ffms2.dll")
    source=FFVideoSource("E:\Test Doom MOV\Sample8mm_1.mov").selecteven().crop(240,0,-240,0).blur(1.0).blur(1.0)
    First, we must increase gamma because it's a very dark capturing. Then, tweaking the RGB levels.

    Then we can degrain/denoise and very careful adding some sharpness again.

    This is the best I could make from it:

    https://www.dropbox.com/s/kket1hy81okpuxr/228_Bruce000002.bmp?dl=0

    Used settings: RemoveDirtSMC: strength= 24
    Mdegrain3: thSAD = 1200 (MvTools2)
    UnsharpMask radius: 3 strength: 100

    And then several steps sharpen/blur/sharpen etc...

    PS: I will post the same answer on the other Forum hehe

    Fred.
    Quote Quote  
  21. VideoFred,

    Your "before" looks far better than the original I downloaded (less grain). Did you already do something to it before putting it into your script?
    Quote Quote  
  22. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by videofred View Post
    I think the original capturing was already sharpened by the operator (at the source) and this is causing all your problems.
    Thank you for looking into this Fred.

    Just some info, nothing was done extra to the original, as far as I know. The frame accurate scans came from Cinepost, having been scanned on their Rank Cintel Turbo. From their site: "CinePost uses a Rank Cintel Turbo in conjunction with a DaVinci color correction system."

    Maybe the Davinci system did something?

    All I did was cut out a good example of the problem area with XMedia Recode.
    Quote Quote  
  23. Member
    Join Date
    Feb 2011
    Location
    Gent, Flanders, Belgium, Europe, Earth, Universe
    Search PM
    Originally Posted by johnmeyer View Post
    VideoFred,

    Your "before" looks far better than the original I downloaded (less grain). Did you already do something to it before putting it into your script?
    Hi John,

    Like I explained, I have added blur(1.0) twice to the original. But my version from the original is the clip Bruce has posted a few months ago. Also, FFVideoSource() is very good for loading MOV files into Avisynth .

    While I'm here:
    https://www.youtube.com/watch?v=W4QBsWXKuV8

    many greetings,
    Fred.
    Quote Quote  
  24. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by videofred View Post
    But my version from the original is the clip Bruce has posted a few months ago.
    Same source file, probably different edit points. JFYI
    Quote Quote  
  25. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    OK, it looks like I'm going to use the method of running multiple variations of the script in one script. I'm guessing most likely only 2 variations, but you never know.

    I made a clumsy attempt at doing it using the general instructions above, but of course it didn't work. I think the problem is most likely where to insert the "A=last" type commands, and how much of the script to repeat (with the new variables in it) after that.

    Also, I may have the
    Code:
    original=source.original
    modified=source.modified
    
    
    original.Trim(0,120) ++ modified.Trim(121,240) ++ original.Trim(241,348)
    #original.Trim(0,240) ++ modified.Trim(241,480) ++ original.Trim(481,696)
    in the wrong place, or identified incorrectly in some way.

    I have it presently directly under the first "source=AVISource("C:\Users\Bruce\Desktop\fs.avi") " from the script. ("#GENERAL PARAMETERS" is directly below it)

    I have the "original=last" directly below "source4=Lanczos4Resize(source1,W2,H2)", which is under the "#PARAMETERS FOR THE COMPARISONS" section.

    The script is posted above in it's native state, in posts 5 & 6 above. Could someone lend a hand with some guidance, like "the "A=last" (or "original=last") line goes below xxxxxx line, and above yyyyyy line", your trim commands go here, etc?

    I know I'm probably way off, it was just a stab at it to see what would happen.

    Thank you
    Quote Quote  
  26. To make it easy, just give a variable name after the eval(result) line . You don't have to copy the functions after that line over and over again (everything below the # END SCRIPT, BEGIN FUNCTIONS line are just functions) . So if you have one version of the script, after the eval(result) line, write version1=last. Then you might have a different version, with different settings, and again after the eval(result) line, write version2=last, and so forth. Or give more descriptive names if you want. Then you can apply the trim() numbers to each variable name that represents

    You can call directly, any of the existing "names" already in the script. For example , "source" is already defined as AVISource("C:\Users\Bruce\Desktop\fs.avi"). So if you used source.trim(100,200) , that would return frames 100 to 200 from fs.avi in the original condition. That script is broken out into sections, so you can call any part of it you want. If you wanted result4, just call result4.
    Quote Quote  
  27. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Originally Posted by poisondeathray View Post
    To make it easy, just give a variable name after the eval(result) line . You don't have to copy the functions after that line over and over again (everything below the # END SCRIPT, BEGIN FUNCTIONS line are just functions) . So if you have one version of the script, after the eval(result) line, write version1=last. Then you might have a different version, with different settings, and again after the eval(result) line, write version2=last, and so forth. Or give more descriptive names if you want. Then you can apply the trim() numbers to each variable name that represents

    You can call directly, any of the existing "names" already in the script. For example , "source" is already defined as AVISource("C:\Users\Bruce\Desktop\fs.avi"). So if you used source.trim(100,200) , that would return frames 100 to 200 from fs.avi in the original condition. That script is broken out into sections, so you can call any part of it you want. If you wanted result4, just call result4.

    I'm still not there yet, I'm sure this is almost automatic to you, but it's still mostly greek to me.

    I'll number my questions, to make it easier to see where I need some guidance, and for you to reply to.

    So, say I have two versions. the first just as it is, in posts 5 & 6 above, and then the other with some settings similar to those John and Fred have suggested.

    Say the first 2000 frames are the original script, and the next 1000 are the adjusted script.

    So, after the eval(result) line I write (we'll just use your suggestion, but I realize I can change it) "version1=last"

    1. Now, a question, do I need to include the functions at the bottom? Everything after "# END SCRIPT, BEGIN FUNCTIONS"? I assume I do, at least once.

    Now, I need to copy the script again, with the different variables selected in it.

    2. I start copying at "#VIDEO FILE", then all the way down to the "eval(result) line again, except this time I write: "version2=last"? (but I can stop there, and not include the functions)

    Now I need to apply the trim numbers.

    3. Where do I insert this text? Up top, below where I define "source", below the "# VIDEO FILE" line? If not there, where? At the bottom somewhere?

    4. Does that command look similar to your example, like this? (using the names we selected)

    Code:
    A=source.version1
    B=source.version2
    
    A.Trim(0,2000) ++ B.Trim(2001,3000)
    Or is it referenced somewhat differently?

    I apologize for the questions, but as you know, everything has to be "just so" to work properly.

    Thak you for the assist.
    Quote Quote  
  28. Originally Posted by Bruce/Fl View Post

    1. Now, a question, do I need to include the functions at the bottom? Everything after "# END SCRIPT, BEGIN FUNCTIONS"? I assume I do, at least once.

    Now, I need to copy the script again, with the different variables selected in it.
    Yes, you need to include the functions once. Most people put it at the very, very bottom, but it doesn't really matter

    2. I start copying at "#VIDEO FILE", then all the way down to the "eval(result) line again, except this time I write: "version2=last"? (but I can stop there, and not include the functions)
    Yes, but this time, you change the values of the filters


    Now I need to apply the trim numbers.

    3. Where do I insert this text? Up top, below where I define "source", below the "# VIDEO FILE" line? If not there, where? At the bottom somewhere?
    At the bottom. So it would come after version2=last, but before the function definitons


    4. Does that command look similar to your example, like this? (using the names we selected)

    Code:
    A=source.version1
    B=source.version2
    
    A.Trim(0,2000) ++ B.Trim(2001,3000)
    Or is it referenced somewhat differently?

    It would just be

    Code:
    Version1.Trim(0,2000) ++ Version2.Trim(2001,3000)
    Because you already defined version1 as the 1st filtered version. That included everything in the 1st version. So you are just taking frames 0 to 2000 inclusive from that version1
    Quote Quote  
  29. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Thank you, I'll plug those lines in on my script in a few hours when I'm at my computer, and I'll probably have a report on my progress in the morning.

    One other question, say I want the modified version in the middle, all I have to do is put version one first then version two, and then refer back to version one again in the trim statement, I assume I don't need to put the whole version one script in again underneath the version two script, correct? Once I define them I should be able to refer back-and-forth in the trim statement as much as I need to, correct?
    Quote Quote  
  30. Member
    Join Date
    Jan 2013
    Location
    Florida
    Search Comp PM
    Alright, I plugged in those lines, and ..... it worked! I looked at it frame by frame at the points where I had the script switch over, and you could clearly see that it did. I also did a test where I went from version1 to version2, then back to version1, and it worked. So i figured out the answer to that part already. Thank you again!
    Quote Quote  



Similar Threads