VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 39 of 39
  1. If you want just the final "stacked" image (not the animation), there is a function FrameBlendX by riffraff42 that works significantly faster

    https://forum.doom9.org/showthread.php?p=1829133#post1829133

    Code:
    ImageSource(...)
    FrameBlendX(0, "lighten", 1.0)
    
    
    #######################################
    ### Blend a number of frames together, up to all frames in the clip
    ##  Output framerate and duration are same as the source.
    ##
    ## @ blendfactor   - blend 'n' frames; if 1, do nothing; if <=0, blend all frames
    ## @ blend_mode    - see Overlay
    ## @ blend_opacity - see Overlay
    ## 
    ## Examples
    ## | ## average of all frames
    ## | FrameBlendX(0, "blend", 0.5)
    ## | ## streak effect (with the right source)
    ## | FrameBlendX(0, "lighten", 1.0)
    ##
    function FrameBlendX(clip C, int blendfactor, string blend_mode, float blend_opacity)
    {
        C
        limit = (blendfactor<=0) ? 1 : Max(1, FrameCount/blendfactor)
    
        while (FrameCount>limit) {
            Overlay(SelectEven, SelectOdd, mode=blend_mode, opacity=blend_opacity)
        }
        ConvertFPS(C)
        return (blendfactor==1) ? C : Last
    }
    Quote Quote  
  2. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    That's interesting. You're the king of my day for sure.

    But i'll keep the animation to "study" where planes fly and doesn't fly by often.

    Well, Now I have another problem but it's not related to avisynth at all...

    when capturing flightradar24.com, the thing expire every 30 minutes and there's some ad and a layer of shade for the night that I all disable via the element inspector, but since the thing expire after 30 imutes, I have to refresh and re-hide unwanted elements.

    I know that's something you can script in GreaseMonkey... but I have no clue of how this works...

    I have to see if there is some forums for that niche application... I know a lot of people use such script to modifiy the apparence of the website they often look at...

    Well.
    Thanks again for everything!
    Tommy
    Quote Quote  
  3. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    A friend helped me with the webpage tweaking with a script but I have another concern with our avs stuff...

    For some reason, after I tweaked the stuff to make the planes smaller on the map, the script doesn't want to stretch lines and nothing moves. If I set the function to 1,0,0
    the planes moves like a movie with no stretching. Is there a difference threshold somewhere so since the places are smaller it doesn't' detect them??

    Here's a few jpeg that cause me a problem.
    Image Attached Files
    Quote Quote  
  4. Originally Posted by zikmen View Post
    A friend helped me with the webpage tweaking with a script but I have another concern with our avs stuff...

    For some reason, after I tweaked the stuff to make the planes smaller on the map, the script doesn't want to stretch lines and nothing moves. If I set the function to 1,0,0
    the planes moves like a movie with no stretching. Is there a difference threshold somewhere so since the places are smaller it doesn't' detect them??

    Here's a few jpeg that cause me a problem.


    "lighten" for this overlay blend mode scenario works when the overlaid image is lighter than the base image. Since the BG is brighter than the planes on those recent images, the planes disappear as expected

    Originally Posted by poisondeathray View Post

    If the planes are bright, then using "lighten" mode should accumulate them, leaving the BG intact




    loop(1,0,0) does nothing. It means loop frame zero to zero once . Which does nothing : 0,1,2,3...

    Loop(2,0,0) means show frame zero twice, so it would go 0,0,1,2,3...

    The reason for the offset is you're overlaying the previous frame with current frame. The offset is required to see something. If you overlay the same frame, it looks like the original sequence

    http://avisynth.nl/index.php/Loop
    Quote Quote  
  5. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    So if I simply lower the map brightness with my css script a bit so the planes are brighter than the BG it will work again!

    I'll try that right away!
    Quote Quote  
  6. Member
    Join Date
    Apr 2018
    Location
    Croatia
    Search Comp PM
    I would use lagfun filter with ffmpeg.
    Quote Quote  
  7. Originally Posted by zikmen View Post
    So if I simply lower the map brightness with my css script a bit so the planes are brighter than the BG it will work again!
    Or use darken rather than lighten.

    Code:
    imagesource("%05d.jpg", 1, 20, fps=30)
    
    main=last
    
    b=blankclip(main, color=color_white)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="darken")
      return b
    """)
    Last edited by jagabo; 18th Dec 2021 at 06:28.
    Quote Quote  
  8. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Ok thanks jagabo, i'll give that a try in the next round raising up again the brightnes. That might in deed define better the planes because they have a outline of 1 black px that obbiously disapear with lighten... but I'm not sure then if the map will fill with black stuff i won't want...

    To try!

    For now I have lowered the brightness of the map to 80% with css and that works great, I adjust the thing up a bit later on with a simple level filter and that suits my needs quite good.

    I'm at 1700 frames captured this morning, 2 frames a minute real time, I've never been that far yet. I'm curious to assemble that over a whole week and see if there will stay some pieces of air where no planes fly by!

    Thanks again!
    I'll drop the final result over here for sure!
    Quote Quote  
  9. Originally Posted by zikmen View Post
    but I'm not sure then if the map will fill with black stuff i won't want...
    Where is that black stuff going to come from?
    Image Attached Files
    Quote Quote  



Similar Threads

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