VideoHelp Forum

+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 57 of 57
Thread
  1. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Well that's...very weird, and I don't know enough about AviSynth to figure out why that might be happening.

    Looking at them both side to side, I like that the curves on Retrograde() are smoother, VHS_blur() is a bit too sharp. VHS_blur() is more the brightness I want. In terms of blurriness, the lines on the ball in the Cannons logo really shouldn't be as clear as they are in VHS_blur() but Retrograde() makes it look like a really obvious horizontal blur rather than a lack of detail.
    Quote Quote  
  2. Originally Posted by koberulz View Post
    the lines on the ball in the Cannons logo really shouldn't be as clear as they are in VHS_blur()
    Since I thought you only wanted the luma I didn't further blur the chroma. Here's a version that blurs the colors much like VHS (which only has about 40 lines of chroma resolution across the full width of the frame) and Retrograde():

    Code:
    function VHS_blur(clip v)
    {
        luma  = v.LanczosResize(300,v.height).Sharpen(0.2, 0.0).LanczosResize(v.width,v.height) # really RGB but we wil use the luma and alpha later
        chroma = v.ConvertToYV12().BilinearResize(120,v.height).AddGrainC(0.0, 30.0).BilinearResize(v.width,v.height) # convert to YUV, blur a lot
        MergeChroma(luma.ConvertToYV12(), chroma) # merge the lightly blurred luma and the heavily blurred chroma
        AddGrainC(3.0, 3.0) # a little more noise at the native resolution
        ConvertToRGB32() # convert back to ARGB
        MergeARGB(luma.ShowAlpha(), ShowRed(), ShowGreen(), ShowBlue()) # merge in the lightly blurred alpha channel from luma above
    }
    
    ImageSource("Untitled-1.jpg", start=0, end=23, fps=23.976, pixel_type="RGB32") 
    RGBAdjust(r=0.85, g=0.85, b=0.85) # darken a bit so bright halos can be seen
    VHS_blur()
    If you don't like the noise just remove the two calls to AddGrainC(). These are provided as scripts so you can modify them to your liking.

    Image
    [Attachment 67661 - Click to enlarge]
    Last edited by jagabo; 15th Nov 2022 at 20:41.
    Quote Quote  
  3. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Is there an issue with the color space conversions in that? It looks desaturated compared to the original.

    I've attached the original PNG frame, so you can test on that rather than my frame grabs.
    Image Attached Thumbnails Click image for larger version

Name:	AStarters_00000.png
Views:	10
Size:	140.8 KB
ID:	67662  

    Quote Quote  
  4. Yes, the colors are desaturated. That's what happens to small colored objects when recorded on VHS. The colors in the text bleed out into the white background and the white background bleeds into the colored text.

    <edit>
    Change the two instances of ConvertToYV12() to ConvertToYV24(). That will reduce the chroma blur a bit.
    </edit>
    Last edited by jagabo; 15th Nov 2022 at 23:30.
    Quote Quote  
  5. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Originally Posted by jagabo View Post
    I don't think you can automatically continue from five digit names into six digit names. Just do it as two sequences and join them together.

    Code:
    part1 = ImageSource("ovr%05d.png", start=0, end=99999, pixel_type="RGB32") 
    part2 = ImageSource("ovr%06d.png", start=100000, end=whatever, pixel_type="RGB32") 
    part1+part2

    Code:
    ---------------------------
    VirtualDub Error
    ---------------------------
    Avisynth open failure:
    Splice: Maximum number of frames exceeded.
    (script.avs, line 3)
    ---------------------------
    OK   
    ---------------------------
    Trying to open this:
    Code:
    A = ImageSource("Retro Board\Retro Board_%05d.png",pixel_type="rgb32")
    B = ImageSource("Retro Board\Retro Board_%06d.png",start=100000,pixel_type="rgb32")
    X = A + B
    
    X
    Retrograde()
    ImageWriter("Premiere\Retro Board\RetroBoard_%06d.png",type="png")
    ("Retrograde()" in this case is actually VHS_blur(), I just changed what was in the AVSI file.)

    If I add "end=99999" to the ImageSource() for A, it opens but the whole thing is only 1001 frames long.
    Quote Quote  
  6. Use a batch renamer to add a padding zero to the 1st set of pngs e.g. bulk rename utility . So everything is now %06d.png
    Quote Quote  
  7. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Use a batch renamer to add a padding zero to the 1st set of pngs e.g. bulk rename utility . So everything is now %06d.png
    There are so many files BRU chokes on the folder.

    For future reference you can set the minimum number of digits with AE's output manually, so I can make use of that going forward, but as I say I have maybe a dozen of these already output. Blegh.

    EDIT: Finally got it to load in BRU but it's loaded them alphabetically (100779, 10078, 100780), so I can't just select the entire five-digit lot and add a leading zero to those, I need to figure out how to use BRU to specifically add an additional leading zero to only the five-digit ones...no idea how to do that.
    Last edited by koberulz; 16th Nov 2022 at 02:02.
    Quote Quote  
  8. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Okay so it takes some super finicky regex:

    Match: (Retro Board)_(?=(\d{5})\.)
    Replace with: \1_0\2

    But it only renames 308 of them and then craps out.

    EDIT: Scratch that, I alt-tabbed over here and ALT is the "cancel process" key.
    Last edited by koberulz; 16th Nov 2022 at 03:18.
    Quote Quote  
  9. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    And that still only loads the first 1000 frames. So obviously I need to put "end" in the script, which means knowing what it goes up to each time. That's a pain.
    Quote Quote  
  10. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You can "run" the script by running analysis pass in vdub to write the files, or avsr64 script.avs, or ffmpeg -i script.avs -an -f null NUL . avsr64 is probably the fastest by a small amount
    avsr64 isn't a recognised command.

    The other two methods both run at around 2.5fps, which means the whole thing is going to take several days. Good fun.
    Quote Quote  
  11. Originally Posted by koberulz View Post
    2.5fps
    Using VirtualDub's File -> Export -> Image Sequence (jpeg) I get over 220 frames per second. That's with 64 bit VirtualDub2, 64 bit AviSynth+, VHS_blur() with chroma blur and noise, and prefetch(8). 77000 source images on one hard drive, output on another hard drive.

    Exporting PNG images instead reduced the rate to about 30 fps.
    Quote Quote  
  12. Originally Posted by koberulz View Post

    The other two methods both run at around 2.5fps, which means the whole thing is going to take several days. Good fun.


    You have a bottleneck in writing png's, probably slow IO (e.g. slow hard drive) or slow CPU. If you comment out the ImageWriter line, and run vdub analysis pass how fast do you get? (ie. how fast does the script process on your system, without writing anything)

    PNG sequences typically don't export very fast, and are much slower than JPG. A video format like UT typically would write 4-5x faster than a PNG sequence in the absence of some other bottleneck

    avsr64 is a command line application from Groucho, it's not going to be much faster if you have other bottlenecks

    https://www.mediafire.com/folder/x6f7yqjufdg7c/Groucho%27s_Avisynth_Stuff
    https://forum.doom9.org/showthread.php?t=173259
    Quote Quote  
  13. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Well JPG is obviously useless, because transparency.

    I'm writing to a network drive, so I'm capped at whatever the network speed is, but I think that's still 1Gbps so it's not exactly awful.
    Quote Quote  
  14. The other options are to blur, sharpen in AE with the built in filters, dynamic link to PP so you don't have to write anything. AE has more scaling options and filters

    Or use avfs to mount a virtual avi from the script, so you don't have to write anything.
    Quote Quote  
  15. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Network is reporting 1.2-1.4MiB/s in, 100-120KiB/s out.
    Quote Quote  
  16. Did you test with a short sequence? You will lose a lot of the blur and halos when you use the PNG images as overlays.
    Quote Quote  
  17. Originally Posted by koberulz View Post
    Well JPG is obviously useless, because transparency.
    Not necessarily; some people write a separate alpha sequence (e.g used as track matte in PP). Some people like to work on, and keep the alpha separate

    Writing 2 JPG sequences RGB+A will typically be faster than 1 RGBA PNG sequence in the absence of other bottlenecks. But it's lossy
    Quote Quote  
  18. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    A huge chunk of this is going back and redoing videos I'd already otherwise finished, so adding things like track mattes is massively over complicating it.

    Clearly there's some sort of bottleneck somewhere, too. Those transfer speeds seem very low?
    Quote Quote  
  19. Originally Posted by koberulz View Post
    Network is reporting 1.2-1.4MiB/s in, 100-120KiB/s out.
    Originally Posted by koberulz View Post
    Clearly there's some sort of bottleneck somewhere, too. Those transfer speeds seem very low?
    Yes, the out speed would be <1 fps for a typical 720x576 PNG . I/O issue somewhere

    Check the local script speed as suggested earlier, to get an idea of how fast the script speed alone is, before the network write
    Quote Quote  
  20. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by koberulz View Post
    Network is reporting 1.2-1.4MiB/s in, 100-120KiB/s out.
    Originally Posted by koberulz View Post
    Clearly there's some sort of bottleneck somewhere, too. Those transfer speeds seem very low?
    Yes, the out speed would be <1 fps for a typical 720x576 PNG . I/O issue somewhere
    And yet it's doing 2.4? That makes no sense.

    I'mma just let it finish, it's been running for long enough now that it feels like a waste to quit. Plus I have COVID and honestly CBF doing much of anything. I'll look into it later.
    Quote Quote  
  21. Once again, did you verify that the final overlay is what you want? The internal blurring works well but around the edges the mask isn't expanded and blurred enough to blur the edges and keep the halos. And you text is all edges. So the final overlay looks nothing like the image.

    raw overly image:
    Image
    [Attachment 67674 - Click to enlarge]


    overlaid onto a background image (with alpha)
    Image
    [Attachment 67675 - Click to enlarge]
    Quote Quote  
  22. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    I'm confused, you wrote the script and now you're saying it doesn't do what it's supposed to?

    It does still look a bit tacked-on, but it definitely looks more degraded than it did before. The exception is the game clock, which is white text on a black background in a digital-clock style font, and gets through basically untouched.

    Without ImageWriter() it processes at around 9fps.
    Quote Quote  
  23. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    So I tried with a local drive. Rendering time out of AE was 6 hours, down from 24 hours. Script without ImageWriter() processes at 35fps, up from 9. With ImageWriter() on, though, it crashes back down to 2.9fps, only barely more than the 2.5fps I got on my network drive.

    Well I'm confused.
    Quote Quote  
  24. Did you test ffmpeg or vdub for the write step on local drive ?
    Quote Quote  
  25. Reading/writing many small files is much slower via Ethernet or Wifi than when working with local hard drives. Try using VirtualDub's image export, File -> Export Image Sequence...
    Quote Quote  
  26. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Did you test ffmpeg or vdub for the write step on local drive ?
    VDub.

    Originally Posted by jagabo View Post
    Reading/writing many small files is much slower via Ethernet or Wifi than when working with local hard drives. Try using VirtualDub's image export, File -> Export Image Sequence...
    Except it isn't, because it goes from being 3x faster to being basically the same speed as soon as I throw ImageWriter() in. That's what confuses me.
    Quote Quote  
  27. Originally Posted by koberulz View Post
    Originally Posted by poisondeathray View Post
    Did you test ffmpeg or vdub for the write step on local drive ?
    VDub.

    Originally Posted by jagabo View Post
    Reading/writing many small files is much slower via Ethernet or Wifi than when working with local hard drives. Try using VirtualDub's image export, File -> Export Image Sequence...
    Except it isn't, because it goes from being 3x faster to being basically the same speed as soon as I throw ImageWriter() in. That's what confuses me.
    Why would you use ImageWriter() when using VirtualDub's image export?
    Quote Quote  



Similar Threads