VideoHelp Forum
+ Reply to Thread
Results 1 to 29 of 29
Thread
  1. I'm trying to make this capture better in avisynth by stabilizing the video, denoising and make any corrections as needed before upscaling to 720p. I think the video is too jumpy. How do I stabilize it?

    This is what I've researched so far but I'm missing a bit of cleanup before resize.

    Code
    # 720x480, 4:3 source
    FFMPEGSource2("GV-USB2Capture2.avi")
    ConvertToYV12()
    #deinterlace
    AssumeTFF()
    QTGMC("Slower",edithreads=3)
    #crop
    crop(10,2,-6,-6)
    addborders(8,4,8,4)
    #Upscale
    nnedi3_rpow2(2,cshift="spline36resize", fwidth=960,fheight=720)
    aWarpSharp2(depth=2)
    Sharpen(0.5)
    Prefetch(10)
    Image Attached Files
    Quote Quote  
  2. The camera movement is too fast.

    What have you tried so far? Deshaker ? DepanStabilize ? etc...

    Beware that the more you stabilize, the more black borders result, the more you have to crop and /or zoom in, the lower the quality


    If you use ConvertToYV12(), it should be ConvertToYV12(interlaced=true) if you apply it before QTGMC. Otherwise you get chroma artfacts

    Consider adjusting the levels, because you have lots in the Y 235-255 range . You generally want it in the Y 16-235 range
    Quote Quote  
  3. I think it looks pretty good. Nothing to stabilize here. The videographer should have taken some classes. Too late for this now
    Quote Quote  
  4. I don't see anything in your script that will stabilize a video. As poisondeathray says, Depanstabilize (AVISynth plugin) or Deshaker (VirtualDub filter) are two free motion stabilizers. Both have primitive forms of border reconstruction, but there is a limit to what they can do.

    I just looked at your video and you would actually NOT want to stabilize the moments when the camera rapidly pans because, while the movement is too fast, it is "natural." Put another way, what can you do to make it look better? You might want to consider using slow motion to slow down the speed of the pan. I've done that on many occasions and if you use good slow motion software, the result can be quite pleasing.

    The short portion where the video looks across the field through the chain link fence could easily be stabilized and could look as good as if it had been done on a tripod.

    In general, there are two situations where stabilization is useful: hand-held static shot where you want to simulate a "locked-down" (i.e., tripod) shot; and where the camera is in motion (not panning), such as shooting from a car or walking. In this case you want to simulate a SteadiCam.

    Years ago I wrote extensively about how to use Deshaker. Here is my long guide:

    Deshaker Guide

    I think Gunther Thalin updated the program a few times after I wrote that, but I'm sure most of it still applies.

    I also wrote extensively in the old Sony Vegas forums about using Deshaker inside of Vegas, and I wrote interlocking VirtualDub and Vegas scripts that let you apply Deshaker individually to each event. The nifty thing about that approach is that you could stabilize videos in segments and, because Deshaker always leaves the first and last frames untouched, you could seemlessly go from stabilized to unstabilized footage, something you'd want to do with your video.

    There are also some really nifty commercial stabilization programs. Some, like Mercalli (which is probably the best), are absolutely amazing. I think After Effects and other post production programs also have stabilization built in.

    If you want to do everything inside of AVISynth, then you should start with Depanstabilize.

    BTW, if you don't know this, when you stabilize video of the type you uploaded, since the shutter speed is 1/30 or 1/25 of a second (NTSC or PAL), when the camera moves, the frame becomes blurred. You don't notice the blur when the camera is moving but when you then stabilize the video, the now-stable video seems to pop in and out of focus (like auto-focus hunting for a lock). This is often as unsettling as the original motion.
    Quote Quote  
  5. Originally Posted by johnmeyer View Post
    since the shutter speed is 1/30 or 1/25 of a second (NTSC or PAL), when the camera moves, the frame becomes blurred.
    All consumer camcorders I know of that are made in the last 30 years do not slow down beyond the field rate in normal shooting modes, that is, 1/60 for NTSC and 1/50 for PAL. Slow shutter mode drops to 1/30 and 1/25 respectively, effectively making it 30p or 25p.
    Quote Quote  
  6. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    The title is the killer.

    Some, like Mercalli (which is probably the best), are absolutely amazing.
    Mercalli 6 attached.
    Image Attached Files
    Quote Quote  
  7. Originally Posted by Alwyn View Post
    The title is the killer.

    Some, like Mercalli (which is probably the best), are absolutely amazing.
    Mercalli 6 attached.
    Smooth! But the burn in date messed it up. How do you do Mercalli? perhaps I can use this in other parts of the video when it’s shaky caused by the zoom but the camera is not panning.
    Quote Quote  
  8. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    How do you do Mercalli?
    I used the standalone version; I just dropped your clip in it and told it to "fix it". Unless you're doing it in an editor as a plug in, you have to create a separate file for each bit you want to stabilise. I haven't really tried it on a whole video, just small portions that need it.

    It can be very good, but isn't infallible and occasionally I have had to do a manual stabilise, correcting each frame. Sometimes it "jumps" so I smooth out the jump manually.

    Yes, those burned-in titles ruin it for sure. Gives a great idea of what any of these stabilisers are actually do though.
    Quote Quote  
  9. Originally Posted by johnmeyer View Post
    I don't see anything in your script that will stabilize a video. As poisondeathray says, Depanstabilize (AVISynth plugin) or Deshaker (VirtualDub filter) are two free motion stabilizers. Both have primitive forms of border reconstruction, but there is a limit to what they can do.

    I just looked at your video and you would actually NOT want to stabilize the moments when the camera rapidly pans because, while the movement is too fast, it is "natural." Put another way, what can you do to make it look better? You might want to consider using slow motion to slow down the speed of the pan. I've done that on many occasions and if you use good slow motion software, the result can be quite pleasing.

    The short portion where the video looks across the field through the chain link fence could easily be stabilized and could look as good as if it had been done on a tripod.

    In general, there are two situations where stabilization is useful: hand-held static shot where you want to simulate a "locked-down" (i.e., tripod) shot; and where the camera is in motion (not panning), such as shooting from a car or walking. In this case you want to simulate a SteadiCam.

    Years ago I wrote extensively about how to use Deshaker. Here is my long guide:

    Deshaker Guide

    I think Gunther Thalin updated the program a few times after I wrote that, but I'm sure most of it still applies.

    I also wrote extensively in the old Sony Vegas forums about using Deshaker inside of Vegas, and I wrote interlocking VirtualDub and Vegas scripts that let you apply Deshaker individually to each event. The nifty thing about that approach is that you could stabilize videos in segments and, because Deshaker always leaves the first and last frames untouched, you could seemlessly go from stabilized to unstabilized footage, something you'd want to do with your video.

    There are also some really nifty commercial stabilization programs. Some, like Mercalli (which is probably the best), are absolutely amazing. I think After Effects and other post production programs also have stabilization built in.

    If you want to do everything inside of AVISynth, then you should start with Depanstabilize.

    BTW, if you don't know this, when you stabilize video of the type you uploaded, since the shutter speed is 1/30 or 1/25 of a second (NTSC or PAL), when the camera moves, the frame becomes blurred. You don't notice the blur when the camera is moving but when you then stabilize the video, the now-stable video seems to pop in and out of focus (like auto-focus hunting for a lock). This is often as unsettling as the original motion.
    Let me start by saying that the wealth of knowledge that you and others share in this forum is very much appreciated. These fundamental concepts of video restoration combined with digital modification is fascinating and much needed in the industry, so thank you. As for my video, I didn’t want to go crazy but perhaps I thought there was one size fit all stabilizing script to help a bit. These are my own precious home videos that my father shot many years ago and I recently got into this world of transfer and restoration as a hobby and present this gift to my family. I was one to throw away (perfectly good) VCR just because the formats changed without realizing how stupid that was. Thankfully I preserved the masters.

    Now what can I do to my script in terms of improving picture quality and playback? I don’t necessarily think it’s too bad but perhaps I’m missing some usual suspects that can make my project go from ok to very good or excellent. I do see a little bit of white shadows on the edges. I’m not sure if that’s halo, or ghosting, I don’t know what the term is. I also didn’t pay attention to the levels during my capture so I don’t know if it’s necessary to recapture and adjust the levels (which is something I need to do research on as well because I don’t understand how to load histograms and do what needs to be done).
    Last edited by lovethisnation; 25th Jul 2023 at 08:24.
    Quote Quote  
  10. Here’s a new clip.

    No post adjustments were done to the picture, no denoising, no stabilization, no sharpening, it is essentially a GV-USB2 lossless LAGS codec capture using default picture levels, a 720x480 resolution QTGMC deinterlaced video in Avisynth and Vdub2 to decompress to H.264 8 bit 4:2:0. Since I thought the video quality came out good I thought this may be a good candidate for an upscale solution to 720p. Now before attempting to do that, I thought perhaps I need to smooth things out and clean/sharpen the image. Am I on the right track?
    Image Attached Files
    Last edited by lovethisnation; 25th Jul 2023 at 09:20.
    Quote Quote  
  11. Originally Posted by Alwyn View Post
    How do you do Mercalli?
    I used the standalone version; I just dropped your clip in it and told it to "fix it". Unless you're doing it in an editor as a plug in, you have to create a separate file for each bit you want to stabilise. I haven't really tried it on a whole video, just small portions that need it.

    It can be very good, but isn't infallible and occasionally I have had to do a manual stabilise, correcting each frame. Sometimes it "jumps" so I smooth out the jump manually.

    Yes, those burned-in titles ruin it for sure. Gives a great idea of what any of these stabilisers are actually do though.
    Is this paid software? I’m going the free route for now
    Quote Quote  
  12. Originally Posted by Bwaak View Post
    Originally Posted by johnmeyer View Post
    since the shutter speed is 1/30 or 1/25 of a second (NTSC or PAL), when the camera moves, the frame becomes blurred.
    All consumer camcorders I know of that are made in the last 30 years do not slow down beyond the field rate in normal shooting modes, that is, 1/60 for NTSC and 1/50 for PAL. Slow shutter mode drops to 1/30 and 1/25 respectively, effectively making it 30p or 25p.
    Yes, you are correct. However, the effect is exactly as I described.
    Quote Quote  
  13. Mercalli is expensive, but the results are amazing:

    proDAD Mercalli V6 Trailer english
    Quote Quote  
  14. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by lovethisnation View Post
    Here’s a new clip.

    No post adjustments were done to the picture, no denoising, no stabilization, no sharpening
    Not really, with QTGMC you deinterlace, and denoise, and apply other processing.

    If you wish to upscale you should not compress and change colorspace, but rather feed the upscaler with the output of QTGMC, or any other additional filter.

    Sharpening before of after the upscale depends on the source, experiment both.

    Your capture may suffer of having no lineTBC correction and oversharpening halos.

    Click image for larger version

Name:	1.png
Views:	2175
Size:	275.7 KB
ID:	72666

    The levels are ok, but you can reduce a little bit the whites. Also convert to limited 16-235 range if further processing concerning RGB conversion is involved.

    Click image for larger version

Name:	2.png
Views:	610
Size:	253.9 KB
ID:	72667

    But again, your sample is not the raw capture, better to analyze on it for final statements.
    Quote Quote  
  15. For Clip1.MOV - You did not use ConvertToYV12(interlaced=true) before deinterlacing. Do you see the flickering chroma artifacts ? Look at the red lights on top of the bus. The color moves "outside the lines" every 2nd frame.

    QTGMC can work with YUY2, you actually don't need YV12 until the final delivery format

    If you were going to RGB to apply some filters (some stabilizers like deshaker work in RGB) , it would make more sense to go from YUY2 to RGB directly, because the YV12 step is downscaling the chroma - going down, then up is avoidable loss
    Quote Quote  
  16. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    QTGMC can work with YUY2, you actually don't need YV12 until the final delivery format
    and if planar format is required for other filtering (i.e TemporalDegrain2), use ConvertToYV16()
    Quote Quote  
  17. Originally Posted by lollo View Post
    QTGMC can work with YUY2, you actually don't need YV12 until the final delivery format
    and if planar format is required for other filtering (i.e TemporalDegrain2), use ConvertToYV16()
    And planar format equivalents are actually faster for processing in avs+ for QTGMC and most filters by a small %, even with the penalty with converting to the planar format - ie. it's worth it in most cases
    Quote Quote  
  18. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Mercalli v6 on Clip 1.
    Image Attached Files
    Quote Quote  
  19. Not a fan of the wobbling/floating date timestamp. It's far more distracting than the original camera movement. Personally I wouldn't stabilize it because of that
    Quote Quote  
  20. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Only a demo of what Mercalli can do, I said above "title kills it".
    Quote Quote  
  21. Originally Posted by lollo View Post
    I thought that was a bad paint job
    Quote Quote  
  22. Originally Posted by poisondeathray View Post
    Not a fan of the wobbling/floating date timestamp. It's far more distracting than the original camera movement. Personally I wouldn't stabilize it because of that
    My jaw dropped, the title wobble is distracting yes, but oh my, it makes a world of a difference.
    Quote Quote  
  23. Originally Posted by lollo View Post
    Your capture may suffer of having no lineTBC correction and oversharpening halos.
    My equipment included a DMR-ES15 between the capture card . No wait, this specific capture did not. Straight from the JVC camcorder with a built in TBC.
    Quote Quote  
  24. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by lovethisnation View Post
    Originally Posted by lollo View Post
    Your capture may suffer of having no lineTBC correction and oversharpening halos.
    My equipment included a DMR-ES15 between the capture card . No wait, this specific capture did not. Straight from the JVC camcorder with a built in TBC.
    Maybe is just my wrong impression. Search for other vertical lines, if they are straigth it's ok
    Quote Quote  
  25. Originally Posted by poisondeathray View Post
    For Clip1.MOV - You did not use ConvertToYV12(interlaced=true) before deinterlacing. Do you see the flickering chroma artifacts ? Look at the red lights on top of the bus. The color moves "outside the lines" every 2nd frame.
    .
    Done, i do see the issue.

    QTGMC can work with YUY2, you actually don't need YV12 until the final delivery format
    So is this all I need?
    FFMPEGSource2("GV-USB2Capture2.avi")
    AssumeTFF()
    QTGMC("Slower",edithreads=3)
    nnedi3_rpow2(2,cshift="spline36resize", fwidth=960,fheight=720)
    aWarpSharp2(depth=2)
    Sharpen(0.5)

    Then before encoding in virtualdub2 convert to YV12 (for distribution online) or keep it YUY2 for HD media?


    If you were going to RGB to apply some filters (some stabilizers like deshaker work in RGB) , it would make more sense to go from YUY2 to RGB directly, because the YV12 step is downscaling the chroma - going down, then up is avoidable loss
    I was not aware that I needed to go to RGB to be able to apply some filters.
    Last edited by lovethisnation; 25th Jul 2023 at 13:00.
    Quote Quote  
  26. If you're upscaling, you'd normally shift 601=>709 using a colormatrix or similar filter , because HD uses rec709 by default . Otherwise will get a color shift in many playback scenarios

    Code:
    Colormatrix(mode="rec.601->rec.709", clamp=0)
    Once it's progressive (ie. after QTGMC) , you don't need ConvertToYV12(interlaced=true) at the end for distribution; it would use just the regular ConvertToYV12()

    If youi're not using vdub2 filters, it should be ok . But there are other potential issues with some filters in vdub that work in RGB. It does the RGB conversion using Rec601 by default - wrong colors for "HD"
    Quote Quote  
  27. Originally Posted by lollo View Post
    Originally Posted by lovethisnation View Post
    Here’s a new clip.

    No post adjustments were done to the picture, no denoising, no stabilization, no sharpening
    Not really, with QTGMC you deinterlace, and denoise, and apply other processing.

    If you wish to upscale you should not compress and change colorspace, but rather feed the upscaler with the output of QTGMC, or any other additional filter.

    Sharpening before of after the upscale depends on the source, experiment both.

    Your capture may suffer of having no lineTBC correction and oversharpening halos.

    Image
    [Attachment 72666 - Click to enlarge]


    The levels are ok, but you can reduce a little bit the whites. Also convert to limited 16-235 range if further processing concerning RGB conversion is involved.

    Image
    [Attachment 72667 - Click to enlarge]


    But again, your sample is not the raw capture, better to analyze on it for final statements.

    Here is the raw capture. I need help with adjusting the white?. If I adjust the white in the VirtualDub2 filter slider i feel that it becomes a bit darker and pale when i play the file on my TV and it doesn't have the same pop. I guess i don't really understand this picture level stuff too well and I need help in adjusting the levels. I used the avisynth histogram code but I don't see any numbers that corelates to the spikes, I don't know what I'm looking at.
    Image Attached Files
    Quote Quote  
  28. This is what I did on the latest encoding but I'm not sure if the levels are correct.


    Code:
    FFmpegSource2("Clip1.avi")
    ColorYUV(gain_y=-24, off_y=4)
    ConvertToYV12(interlaced=true)
    McTemporalDenoise(last, settings="medium", interlaced=true)
    #TurnRight().Histogram().Turnleft()
    AssumeTFF()
    QTGMC("faster",EZDenoise=2)
    crop(10,2,-6,-6)
    addborders(8,4,8,4)
    Sharpen(0.3)
    Colormatrix(mode="rec.601->rec.709", clamp=0)
    nnedi3_rpow2(2,cshift="spline36resize", fwidth=960,fheight=720)
    aWarpSharp2(depth=2)
    Sharpen(0.1)
    Quote Quote  
  29. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by lovethisnation View Post
    I'm trying to make this capture better in avisynth by stabilizing the video, denoising and make any corrections as needed before upscaling to 720p. I think the video is too jumpy. How do I stabilize it?
    Deshaker.

    Applied wrong aspect ratio
    Image Attached Files
    Quote Quote  



Similar Threads

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