VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. I want to stabilize a video source I have and stabilizing adds a black border all they way around it by taking 2 rows of pixels out of the original picture on all 4 sides.

    Can I add black borders to the original 1920x1080 and make it 1924x1084, then afterwards let the stabilizer work on the video to leave the original picture in tact? I am hoping with this idea, that the stabilizer will simply remove or cover up the black borders I added instead of the original image. Would this work like I am thinking or would that throw the stabilizer off and make it not work properly?
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Why don't you try it and let us know ?
    Quote Quote  
  3. Originally Posted by davexnet View Post
    Why don't you try it and let us know ?
    Don't know how to add black border that doesn't cover the original image.
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    You can do this but your borders will dance around as the image is shifted. Kind of defeats the goal of getting rid of distracting movement.
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by killerteengohan View Post
    Originally Posted by davexnet View Post
    Why don't you try it and let us know ?
    Don't know how to add black border that doesn't cover the original image.

    Right in Virtualdub 2 using the resize filter
    letterbox/crop to size

    But see JVRaines point, out of the frying pan into the fire

    Let us know what you find out
    Quote Quote  
  6. What stabilizer are you using? Mercalli has a border fix option which will do all the heavy lifting for you. Just enable it. Deshaker has a border fix option which also handles this problem. Depanstabilize has an option for fixing borders.

    You definitely do not want to do any cropping before you stabilize. The usual method, if you aren't going to use the border fix options is to stabilize and then crop to remove the black borders. If you have an NLE that does compositing, you can put the original video on another track and add its edges to the stabilized video, along with some feathering. It isn't as good as the built-in border fixing in a really good stabilizer like Mercalli, but it may be better than losing resolution, which is what you'll do if you crop and re-size after stabilizing.
    Quote Quote  
  7. Originally Posted by JVRaines View Post
    You can do this but your borders will dance around as the image is shifted. Kind of defeats the goal of getting rid of distracting movement.
    Why would they dance around? I don't think you get what it is I am wanting to do. That or I am missing something that you could perhaps explain please.

    I want to add a black border all the way around the original image that's 2 pixels wide. It will make the overall video 1924x1084 after the black is added around the original image. Then I want to use a stabilizer which will instead of putting black borders on the original image, it will simply put them in the space I made black earlier. Then I can just crop the black borders I added earlier to get back to the original resolution and leave the entire original image in tact.

    In theory, this should stabilize the video and I wont have to lose any of the original image when I take the black back off. What would make the borders dance around? I will be taking those black borders back off after stabilization.

    Problem is, I do not know how to add a 2 pixel wide black border all the way around the outside of the original image in avisynth. I know how to add them over the original image or inside the picture, but not to the outside of it while leaving the original alone. Which is pretty much what I am asking how to do in here so I can give this a try.

    I've stabilized plenty of things before and with great results. I am just looking for help on how to add the outside border, so I can try something out to see if I won't have to crop the black off the original image then resize back up.
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That's not how stabilization works!

    You start with a canvas full of content, hopefully with MUCH more rez than you really need.
    Then you counter-actively, dynamically adjust the cropping window so that the result is that the final region of interest is stabilized.
    If you don't have a surplus of resolution in your source content, you must either:
    1. live with black bars (or other similar placeholder background content) dynamically peeking in and dipping out in the final video, or
    2. live with cropping down to a smaller resulting window (for example starting w 1920x1080 and ending with 1280x720 crop), or -nearly same-...
    3. live with scaling up (like "zooming in") and then doing the crop window, with the result being somewhat more blurry

    To make it clear: you can never "increase resolution" for any purpose, without a whole lot of other compromises.

    Scott
    Quote Quote  
  9. +1 Cornucopia. The OP needs to think through how stabilization works. Once you move the current frame to match the spatial location of the previous frame by moving it in the X.Y,Z and rotated axes, that is going to create gaps around the image on the opposite sides to where the video has moved. Something has to fill in those spaces. You either synthesize some new video, using adjacent frames, as I briefly described earlier, or you zoom in to hide the borders.

    The worst thing you could possibly do is to add borders prior to stabilizing because then those borders will be added to the borders created by the stabilization! I deal with this all the time with my film captures because 8mm film is perfectly square and even when captured using SD 4:3 video, I end up with pillars on either side of the video. Before I feed this to my film restoration script, which includes stabilization, I crop off those pillars so the stabilization doesn't start moving those all over the place. Then, at the end, I add back those pillars so I have a standard 720x480 4:3 video that can be put on a DVD (the usual delivery vehicle for 8mm amateur film which doesn't benefit at all from HD).
    Quote Quote  
  10. Originally Posted by killerteengohan View Post
    Why would they dance around?
    Because you run a stabilizer on them, of course. Then they will dance around, because they were stable to begin with.

    All stabilizers I've used can handle the resulting black borders. Deshaker, Adobe Warp Stabilizer, MS hyperlapse.

    If you add borders first, they will be considered part of the picture by the software and ruin any chance of fix.
    Quote Quote  
  11. Unless you summon the energy from every living creature on Earth, then anything is possible...
    Or watch the video on a laptop computer held by someone with Parkinson's disease seating on a washing machine, that way you don't even have to process it.

    More seriously, what kind of instability does the video in question have, which is minor enough to make you think that it could be fixed by stabilizing parameters affecting only two rows of pixels on each side, yet disturbing enough to make you want to go through such hassle in the first place ?
    Quote Quote  
  12. Originally Posted by killerteengohan View Post
    I want to add a black border all the way around the original image that's 2 pixels wide. It will make the overall video 1924x1084 after the black is added around the original image. Then I want to use a stabilizer which will instead of putting black borders on the original image, it will simply put them in the space I made black earlier. Then I can just crop the black borders I added earlier to get back to the original resolution and leave the entire original image in tact.

    In theory, this should stabilize the video and I wont have to lose any of the original image when I take the black back off. What would make the borders dance around? I will be taking those black borders back off after stabilization.

    Another way of explaining this is the stabilizer does not put on black bars on the original image . Those "black borders" consist of areas where there is no image data in the first place in your source

    If you add black borders before, you will still get black borders there after. Because you added them. The black border is where the missing information was in the original source . If you replaced it with a black border, you will get a black border. If you added white border instead, you will get a white border



    In the process of stabilizing, it translates the image( moves it x,y), rotates the image, zooms the image.

    eg. If I move the original image 2 pixels to the right, the left border will have 2 a pixel width black column. Because there was no image data there. If you added white border before stabilization, that left 2 pixel width column border will be white.

    If you "take the black off" , as in take the 2 pixel left border off you will have a 1918 width image, because the image was shifted 2 to the right. If you include the 2 pixel width out of the field of view to the right, it becomes 1920 width, but the same original image without stabilization. In other words, you just did nothing.
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    Originally Posted by killerteengohan View Post
    I want to add a black border all the way around the original image that's 2 pixels wide. It will make the overall video 1924x1084 after the black is added around the original image. Then I want to use a stabilizer which will instead of putting black borders on the original image, it will simply put them in the space I made black earlier. Then I can just crop the black borders I added earlier to get back to the original resolution and leave the entire original image in tact.

    In theory, this should stabilize the video and I wont have to lose any of the original image when I take the black back off. What would make the borders dance around? I will be taking those black borders back off after stabilization.

    Another way of explaining this is the stabilizer does not put on black bars on the original image . Those "black borders" consist of areas where there is no image data in the first place in your source

    If you add black borders before, you will still get black borders there after. Because you added them. The black border is where the missing information was in the original source . If you replaced it with a black border, you will get a black border. If you added white border instead, you will get a white border



    In the process of stabilizing, it translates the image( moves it x,y), rotates the image, zooms the image.

    eg. If I move the original image 2 pixels to the right, the left border will have 2 a pixel width black column. Because there was no image data there. If you added white border before stabilization, that left 2 pixel width column border will be white.

    If you "take the black off" , as in take the 2 pixel left border off you will have a 1918 width image, because the image was shifted 2 to the right. If you include the 2 pixel width out of the field of view to the right, it becomes 1920 width, but the same original image without stabilization. In other words, you just did nothing.
    That explanation makes WAY more sense. Makes my idea seem a bit pointless to me then if that's how it's working. Thanks for that info.
    Quote Quote  



Similar Threads

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