Hello there!
So, I was looking for a forum with editing experts who could maybe help me out with a (probably) fairly simple question, and this place does look promising.
I'm editing/upscaling videos every now and then as a hobby, and so I'm far from being an expert myself. My question now is if it's possible to stretch only certain parts of a video, or better said if anyone knows about video editing software or tools able to do exactly that. I've been trying out several different programs, but it seems that not one was able to do what I'm looking for. Here's two images to better showcase as to what exactly I'm trying to achieve;
Let's pretend this is a video and I'm trying to stretch only a certain part to fill in the black bar without ruining the resolution by stretching the entire thing;
[Attachment 72155 - Click to enlarge]
This is basically what I want to do;
[Attachment 72156 - Click to enlarge]
I've had multiple tools able to mirror parts of a video, but none of which could simply stretch it out. Or maybe I'm just blind, who knows.
If anyone has a simple method they could tell me about or a tool/program (preferably free or cheap as I don't plan on spending hundreds of bucks for that little feature alone) which is able to achieve that, I'd be a really happy fella.
Cheers, and thanks in advance!![]()
+ Reply to Thread
Results 1 to 8 of 8
-
-
The process would be the same in any editor or tool - crop to the region of interest (the yellow rectangle in your image) , scale the width, add the stretched "strip" back to the same position
[Attachment 72159 - Click to enlarge] -
I think you might find the answer with Adobe Premier Elements. What I would do is first of all cut and seperate the section you want to alter in the video, and then move the unwanted bit out of frame , and then put the video back together. there are guide lines showing what would be out of frame but may be hard to see on here
https://youtu.be/gasoIYx9ChA
this is only a quick clip to give some idea. yours would have to be the same size within the original guide line first before moving the video clip to remove the part you don't want. that should remove it from every frame within that clip
poisondearthray.
that may well apply with a still photo and what I would do, but the OP is wanting to do it in a video so it is a question of removing from several possible hundreds of frames within that video..
it is the only way I can think of at the moment by using a video editing tool. then there is the possibility of "stretching" one frame the same way so all the frams get stretched, but I have not explored that deeply yet
Flight attendant
what may seem a simple question, but when put into practice to carry out what is wanted may not be so simple. There is a lot more to doing editing in a video than editing a still. it could involve coutinuity - colour change between clips if not careful and a lot more not even getting onto the audio side of video and sound overlay etc
however it is great fun exploring what one can do with a video but it takes time and I am still learningLast edited by realspeed; 30th Jun 2023 at 15:39.
-
That's also how you do it in a video editor (for video). You apply the same transform to the video on a track, and it's applied to all the frames in a video on that track
You could do it in a script, such as avisynth (this is what I used for that example, it's free and works on video too) . But most people like GUI's -
Everyone has preferences in how to "do" things. If you prefer scripting
The comments "#" explain what each step is doing. To apply to a video, change the source filter to reference the video path and filename
Code:ImageSource("pngtree-pier-on-a-pier-and-the-water-picture-image_2507410.png") crop(0,0,-102,0) #crop right black border cropped=last #1200 x 672 , give this a "name" the cropped image without black border, let's call it "cropped" ROI = cropped.crop(1080,0,0,0) #crop left side of the "cropped" image, this leave the " region of interest strip" 120 x 672, the yellow box #take the region of interest "strip", and resize the width to the original width + 102 pixels (102 because that was the width fo rthe black border cropped earlier) stretch = ROI.spline36resize(ROI.width+102,ROI.height) #put side by side, # on the left side, put the black cropped image, but crop 120 more more from the right to account for the ROI strip # on the right side, put the ROI stretched image stackhorizontal (cropped.crop(0,0,-120,0), stretch)
-
Reading the above, I'm wondering if you're misunderstanding some basic concepts.
It is a simple task to crop the black bar and then stretch the remainder of the image to retain the resolution. Some stretching will occur of course, but not as much as is required for the smaller selection.
You could also crop a small amount from the top and/or bottom to retain the true original aspect ratio.
Your suggested method may be workable on this example, but on different video's that are not just water the effect may stand out like a sore thumb. -
Heya! Yeah, my fear was that this is how it's done. Was hoping that some editor/tool may have a simple feature that allows to select a certain area in the video and drag it out without having to go through the "cropping, scaling and adding back" method. Oh, and thanks so much for the script. I'll definitely look into the avisynth link you provided aswell!
Appreciate your answer and the video link! I'll check Adobe out, but yeah it seems that the method you described is basically the same poisondeathray mentioned. And yes, the scaling is applied to the entire video, so luckily I don't have to do it frame by frame, haha.
Hey! Sorry, I should have probably mentioned that this doesn't work for just any video. It's like you said, for most videos the method you described would certainly be the better solution. But yeah, I believe it does look better in certain videos where it's possible to only "stretch" the edges out while the important parts of the video remain untouched.
Thank you all for the quick help! -
But yeah, I believe it does look better in certain videos where it's possible to only "stretch" the edges out while the important parts of the video remain untouched.
Is it always a 1 peripheral edge ? Or multiple edges? Not some area in the middle of a frame ? That example was assymetric (right side only), 1 peripheral edge, and upscaling (not downscaling, where you might use a content aware scaler, or "seam carving" plugin)
There are non linear warped scalers, that differentially adjust the central portion of the image vs peripheral with an adjustable adjustment factor (horizontal, vertical) - but they are symmetrical . eg. A typical use might be 4:3 content to fill 16:9 screen (horizontal stretch to fill the pillarbars), minimizing the distortion to the central portion (instead of making central portion look "fat") . It won't be as accurate as you specifying exactly where to resize or not to resize , there will usually be a falloff region where some middle pixels will be slightly warped
Another method are warping and morphing plugins that can distort based on source and destination, splines,masks and/or grids/meshes. e.g. Adobe has a mesh warp. Think of it as dividing image into grid, and moving the vertices from source to destination. More complex would be plugins that use custom splines /masks, but you can specify any type of shape that you can draw, or location. The problem with these types of plugins is they tend to have a falloff and can be finicky - they generally don't snap to pixel locations, won't be pixel perfect as you specifying exactly where to resize or not to resize , there will usually be a falloff region, like the warped scalers. The way to make it "perfect" is to composite - use multiple layers with masks. But this is getting more complicated and time consuming than "simple" crop/scale/add
Another way a do it in a 3d application. You can project 2d textures (e.g. a video) onto 3d geometry. You can manipulate the geometry, and the 2d texture will be manipulated with it. This also an enormous amount of control, but probably the steepest learning curve
Similar Threads
-
Crop only a part of a video possible?
By Platos in forum Newbie / General discussionsReplies: 1Last Post: 19th May 2023, 17:56 -
batch that test if the video part or audio part exist
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 20th Jul 2022, 08:06 -
How To Stretch A Squashed Mobile Video Image Horizontally?
By TheShortStraw in forum EditingReplies: 5Last Post: 10th Sep 2021, 01:04 -
Splitting only a part of a Video.
By Indy84 in forum EditingReplies: 2Last Post: 25th Mar 2020, 13:13 -
downloading subtitles that are not part of video and are overlayed on video
By 3dsmaxed in forum Newbie / General discussionsReplies: 1Last Post: 7th May 2019, 02:41