Hi I have a 400*800 resolution video , I need a 800*400 video , So all i need to do is scale the video's with to 400 and change the y position so that I can see the scaled central part of the video. I have checked online but position is available only for overlays , I need for a single video
Asked
Active
Viewed 1,670 times
1 Answers
1
I think if you consider this the other way around, you'll be able to do it.
If you crop the central part of the video, you'll get something that is the right aspect ratio, at 400x200:
ffmpeg -i in.mp4 -vf "crop=400:200:0:300" out.mp4
So this will crop from x=0,y=300 to x=400,y=500. You can adjust the y starting point if you don't need it exactly central.
Adding in the scaling:
ffmpeg -i in.mp4 -vf "crop=400:200:0:300, scale=w=800:h=400" out.mp4
I am not sure how valuable scaling the result will be - I guess it depends why you need it 800px wide.
I didn't test this, I think the syntax is right.
Paul
- 61,193