VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 39
Thread
  1. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Hi folks. Here's the project.
    I configured an auto screenshot program to capture planes position in the sky at flightradar24.com and I want to import the image sequence in virtualdub to make a timelapse of the position of the planes BUT I want the screen to get filled with planes colors everywhere a plane ever passed thru since the beginning, leaving unaffected areas where no plane ever passed.

    I first though I could use something like temporal smoother and crank it to the max but it doesn't work.

    Got any idea which plugin could be use to "add the difference" to the next image and keep adding it until the screen is filled with what has moved?

    Thanks!
    Quote Quote  
  2. clipblend in avisynth by StainlessS
    Quote Quote  
  3. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Thanks. Will give it a try. Not related but I used to work with avisyhtn 2.5 in the past and when there was an error somewhere in the script the thing would output the actual error in the video player. I'm trying avisynth+ and if there is any error, the only thing I get is no output or an error from the player itself??

    Am I missing something?
    Quote Quote  
  4. It should be the same with with avs+ ; the player should display the error message same as avs classic 2.5 or 2.6 . It might be the player is incompatible, or your setup is configured differently

    You can try vdub2 or mpchc or avspmod to preview scripts
    Quote Quote  
  5. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Okay, I managed to fix my avisyhth, I didn't installed the right one and some dependencies were missing.

    I did tried ClipBlend but unfortunatley, it doesn't do what i'm trying to achieve...

    The planes make some blurred tails but the tails quicky fade out and nothing appear on the image anymore but the background map...

    I want the map to get all yellow where plane previously passed and stay yellow forever...Image
    [Attachment 62384 - Click to enlarge]


    The goal is to figure out areas where little or no planes fly above...
    Quote Quote  
  6. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    If that would be an easier approach, I can capture the planes on a white background only (disabling the map layer on the webpage via inspector) and convert white background to transparency and "add" or sum each frames together... and then put the map behind at the end.

    Not sure if I can automate photoshop to add all those images as layers above layers...

    perhaps there is a filter for that in virtualdub or avisynth
    Quote Quote  
  7. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    It works with overlay in photoshop... but I would need a transparent background around the planes... and it's pain in the ass to do it manually, did 10 frames, i want to import thousand of em...Image
    [Attachment 62385 - Click to enlarge]
    Quote Quote  
  8. Can you upload a few images for testing in a zip file ?

    What blend mode did you use in photoshop ?

    There is a way in avisynth with overlay for frame accumulation, but you will probably run into memory problem with 1000 images

    If the planes are bright, then using "lighten" mode should accumulate them, leaving the BG intact
    Code:
    main=last
    
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    Quote Quote  
  9. This is what clipblend (default settings) looks like on 5 frames
    Image
    [Attachment 62386 - Click to enlarge]


    and scriptclip with overlay in lighten mode on the same frames
    Image
    [Attachment 62387 - Click to enlarge]
    Quote Quote  
  10. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    That is exactly what i'm trying to get. What script did you use?
    I'm a little lost on that long page ... http://avisynth.nl/index.php/ConditionalFilter if i'm at the right place...
    Quote Quote  
  11. The same script in post #8

    Code:
    main=ImageSource(...)
    
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    Quote Quote  
  12. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Sorry I Missed it! I'll give that a try. Also missed where you asked me a sample frames...
    Quote Quote  
  13. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Sorry, I'm missing something... doesn't work...
    I'm not a pro yet with that scripting...

    LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins+\ffms2.dll")
    DirectShowSource("1.avi")
    main=ImageSource(...)

    b=blankclip(main)
    ScriptClip("""
    b = b.Loop(2,0,0).Overlay(last, mode="lighten")
    return b
    """)
    Quote Quote  
  14. What is 1.avi ?

    Load your image sequence with ImageSource

    For example, if it was

    0000.png
    0001.png
    0002.png

    ImageSource("%04d.png")

    %04 is the number of padding or placeholder digits

    Code:
    main=ImageSource("%04d.png")
    
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    Quote Quote  
  15. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    1.avi is the video i made from the pictures with virtualdub... importing png's as a sequence. I'll give your thing a try tomorrow, going to bed soon. Thanks for all your help!
    Quote Quote  
  16. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Good morning. Renamed my jpg with 5 digit structure and made the mod in the script you gave me but I get no output even from the frameserver.

    Do anything need to be loaded above the script?

    It seems that
    ScriptClip
    blankClip
    ImageSource are all functions integrated within avisynth natively?
    Image
    [Attachment 62393 - Click to enlarge]
    Quote Quote  
  17. Is there any error message? You can load the .avs into vdub2 or mpchc to preview script . Save the script changes first before previewing

    Make sure your paths are correct

    e.g. if image sequence was located in c:\folder

    You can add start, end arguments, fps

    main=ImageSource("c:\folder\%05d.jpg", start=1891, end=1957, fps=24)

    Yes, scriptclip, blankclip are internal avs functions

    scriptclip requires linear sequential access . If you wanted to make an animation, you could (just encode the script); but if you only wanted the final image, you cannot "skip" or "jump" to the end. You have to "play" the script or frame advance to go to the end, so each frame is sequentially "overlaid" .
    Last edited by poisondeathray; 16th Dec 2021 at 11:44.
    Quote Quote  
  18. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Fixed the path, I never do because I always put avs file aside source file but well, tried not specifying path and specifying and in mpchc, it simply says Cannot Render The File at bottom.

    Tried another know good avs script and it works, made an error in the syntax and again, mpchc is displaying cannot render... instead of the frameserver describing the error.

    I'm now at

    Code:
    main=ImageSource("C:\Users\tboucher\AppData\Roaming\THeUDS\AutoScreenShot\Images\Round3\5digit\%05d.jpg", start=00001, end=01957, fps=30)
    
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    and still doesn't work.

    I did tried that alone and now it show up

    Code:
    ImageSource("C:\Users\tboucher\AppData\Roaming\THeUDS\AutoScreenShot\Images\Round3\5digit\%05d.jpg", start=00001, end=01957, fps=30)
    Quote Quote  
  19. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Well, virtualdub returns the proper error. not sure why mpchc doesn't
    Image
    [Attachment 62394 - Click to enlarge]
    Quote Quote  
  20. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    This works as well returning a black image

    main=ImageSource("C:\Users\tboucher\AppData\Roamin g\THeUDS\AutoScreenShot\Images\Round3\5digit\%05d. jpg", start=00001, end=01957, fps=30)
    Code:
    b=blankclip(main)
    #ScriptClip("""
    #  b = b.Loop(2,0,0).Overlay(last, mode="lighten")
    #  return b
    #""")
    #
    b
    Quote Quote  
  21. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Not sure how scripting what's black (b) can give something other than black...

    also, since b is already defined, wouldn't it make more sense to say

    c = b.Loop(2...
    return c

    ??
    Quote Quote  
  22. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Got it to work with this code but when rendering it it's fast at begining and then VERY slow . i'm at frame 140 and it will take the night to get to the end of the job...
    Code:
    ImageSource("C:\Users\tboucher\AppData\Roaming\THeUDS\AutoScreenShot\Images\Round3\5digit\%05d.jpg", start=00001, end=01957, fps=30)
    main=last
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    Quote Quote  
  23. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    We're getting somewhere!!!
    Have a look
    http://censoredarchive.xyz/wp-content/uploads/manual/FirstTry.mp4

    Problem tho is that the end of the tails eventually gets deleted and doesn't stay forever. Is that a matter of messing with the number of the loop?
    Quote Quote  
  24. The "slowness" later might be a memory issue . Open up taskmanager and examine memory consumption. If you use avs x64, it should be better than x86 if you have enough system memory

    The tails should not be deleted, not sure what's going on there. It's not a loop issue.

    You can see this example with star trails here, it's 200 frames and they are not deleted
    https://forum.videohelp.com/threads/360085-Time-lapse-But-with-trailing-stars#post2279836
    Quote Quote  
  25. Sorry, you figured it out, but the reason it didn't work earlier was "last" had nothing to refer to for the Overlay argument

    main=ImageSource won't work for that reason, because there was no "last", either implied or explicit

    but this will work because
    Imagesource....
    main=last
    Quote Quote  
  26. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Found why the tails were deleted, I asked virtualdub to process every other frame and double the framerate to get the tails to build faster when vieweing... but that messed the frame order requested to the frameserver...

    So i'll do that later on, on the rendered video!

    I'll also probably re-capture the whole thing with a higher resolution so that the places are smaller on the map themselves.

    Thanks for all your help, very appreciated!
    Quote Quote  
  27. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    To faster things up, If I render the first 100 frames, then put that rendered final frame as the 101 th image and start again from there up to 200... I feel it would be faster. Isn't that possible to script such thing in avisynth?

    I'm at frame 372 and speed is at 0.3 fps and going down every new frame...
    Quote Quote  
  28. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    frame 620, 0.18 fps...

    virtualdub at 2.7 gb of ram... I guess it will crash at 4, I think i'm not using vdub 64...
    Quote Quote  
  29. "divide and conquer" - It should be possible

    For example,start= 0, end=99, save as an avi using lossless compression e.g. lagarith. Let's call it "0-99.avi"

    The 2st section script would be as follows: The trim(99,-1) means return frame 99 only

    a+b tacks that frame 99 onto "b" which is 100-199 in this example

    Code:
    a=AVISource("0-99.avi", pixel_type="RGB24").trim(99,-1)
    b=imagesource("%05d.png", 100,199, fps=30)
    a+b
    main=last
    
    b=blankclip(main)
    ScriptClip("""
      b = b.Loop(2,0,0).Overlay(last, mode="lighten")
      return b
    """)
    and so forth for each 100 frame section, each time exporting an avi

    To join them, there is a repeated frame (from where the animation ended previously) , so you have to trim those when joining the final

    a=AVISource("0-99.avi")
    b=AVISource("100-199.avi").trim(1,0)
    c=AVISource("200-201.avi").trim(1,0)
    .
    .
    .
    a+b+c+....
    Quote Quote  
  30. Member
    Join Date
    Apr 2020
    Location
    Canada
    Search Comp PM
    Okay. I'll give that a try. I also reduced the processing by taking one screenshot every 30 seconds using the larger resolution...
    Captured images are 2560 * 2048, cropped and resized to 1280*720 with IrfanView and then passed to avisynth. That helps a lot

    You should have an attachment available
    Image Attached Files
    • File Type: avi 1.avi (2.17 MB, 25 views)
    Quote Quote  



Similar Threads

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