VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Member
    Join Date
    Dec 2003
    Location
    north america
    Search Comp PM
    this post is in reference to this VideoFred stabilisation script posted at doom9 (i hope posting the link is acceptable here):
    Code:
    https://forum.doom9.org/showthread.php?t=175669
    i'm terrible with all of this so i'm sure i'm just doing something stupid.

    the clip i'm trying to test with is proreshq and i'm using this line try to load it:
    Code:
    source= FFMPEGSource2("TESTCLIP.mov", atrack=1).crop(CleftB,CtopB,-CrightB,-CbottomB,align=true)
    i can't seem to get past loading a file with the script. when i try to load it, i get an error that "ConvertToYV12: only 8 bit sources allowed." avspmod highlights this line:
    Code:
    source1= source.trim(trim_start,trim_stop).assumeFPS(play_speed).converttoYV12(matrix="rec709")
    i'm guessing that i have to do something to take the clip down to 8 bit from its native 10 bit directly after import but have no idea how to do that. have taken quite a few stabs in the dark but have had to give up and come and ask.

    i'm using avisynth+ v3.7.3 and have run many simple scripts of my own but this is the first time i'm trying to load a script of this complexity from someone else.

    thanks for any guidance in getting past this first hurdle.

    babag
    Last edited by BabaG; 17th Jan 2024 at 22:30.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    you can try this for simple bitdepth conversion:
    http://avisynth.nl/index.php/ConvertTo8bit
    Quote Quote  
  3. Member
    Join Date
    Dec 2003
    Location
    north america
    Search Comp PM
    thanks, davexnet. that was actually one of my stabs in the dark but i guess i couldn't figure out the correct syntax or something. kept getting the same error as described above.

    edit:
    just been trying to get it to work and, by poking around with each parameter, i did get avspmod to seemingly accept most of what i tried but then got the error that: "Script error: Invalid arguments to function 'ConvertBits'.

    this is the line as i've last tried it:
    Code:
    ConvertBits(source, 8, true, -1, "bits", "auto", "fulls")
    thanks again,
    babag
    Last edited by BabaG; 17th Jan 2024 at 23:09.
    Quote Quote  
  4. There is no prerequisite that prevents MDepan or DepanStabilize from working with 10bit or higher if using avs+, since mvtools in avs+ supports other pixel types . Only some of the helper histogram functions are hardcoded to work with 8bit

    If someone had time they could tidy it up better, but here is a quick + dirty workaround to keep 10bit422 for ProResHQ (or any mvtools supported pixel type) but a workaround keep (this requires avsresize for the simple conversions for the preview histograms, the actual stablization result uses the native pixel type)

    1) Change 216 add your source . For prores I would use LSMashVideoSource, since it doesn't require indexing

    Code:
    source= LSmashVideoSource("input.mov").Z_ConvertFormat(pixel_type="YV12").crop(CleftB,CtopB,-CrightB,-CbottomB,align=true)

    2) add sourceforstab2 on line 499 , which represents the full quality version

    Code:
    sourceforstab2 = LSmashVideoSource("input.mov")
    3) change lines 451 and 460 to say "sourceforstab2" , instead of "sourceforstab"

    To call the final result, comment out line 480 #Eval(result), and call "stabilo" (without the quotes) on line 481 or anywhere before the prefetch line
    Quote Quote  
  5. Member
    Join Date
    Dec 2003
    Location
    north america
    Search Comp PM
    wow. thanks, pdr! not that i understand much of this but i think i'm able to follow and execute most of the changes correctly.

    i do have one place where i'm uncertain as to what to do. when you say to add sourceforstab2 on line 499, i'm showing line 499 as the open curly bracket in this code:
    Code:
    function selectresult(int index)
    {
    return Select(index,"SourceOverFast4", "stab_comp_fast","stabilo")
    }
    i'm not sure how to interpret the instruction. should i insert before or after the curly bracket?

    Code:
    function selectresult(int index)
    sourceforstab2 = LSmashVideoSource("input.mov"){
    return Select(index,"SourceOverFast4", "stab_comp_fast","stabilo")
    }
    or
    Code:
    function selectresult(int index)
    {sourceforstab2 = LSmashVideoSource("input.mov")
    return Select(index,"SourceOverFast4", "stab_comp_fast","stabilo")
    }
    thanks and sorry for the obtuseness.
    babag
    Quote Quote  
  6. I'll upload this modified version , crap I didn't save it just a minute

    EDIT:
    It didn't save properly because he has markers/sliders in the script

    So it should be line 449 for sourceforstab2 , not 499 . The rest of the instructions look correct
    Last edited by poisondeathray; 18th Jan 2024 at 00:12.
    Quote Quote  
  7. Member
    Join Date
    Dec 2003
    Location
    north america
    Search Comp PM
    thanks again, pdr!

    i think i've correctly made the changes now. i'm now getting an error that there's no function named "histogramRGBLevels".

    I see reference to this in VideoFred's original thread. he refers to "histogramRGB.avsi" and says he forgot to include it in the folders with the script. i've looked for this but have not found it. another user said he copied the function from another thread into VF's script but, assuming i even found it, i think that's probably beyond my skill level.

    anyone have a link to histogramRGB.avsi?

    edit:
    found it. it was called histogramRGBParade.avsi and was here:
    Code:
    https://forum.doom9.org/showthread.php?p=1570968#post1570968
    it was actually listed as link #5 in VF's original thread but not included in his download. my file now does load. thanks again!

    thanks again,
    babag
    Last edited by BabaG; 18th Jan 2024 at 00:54.
    Quote Quote  



Similar Threads

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