FFMPEG:如何在不拉伸的情况下移动视频? [英] FFMPEG: How to move the video without stretching it?

查看:186
本文介绍了FFMPEG:如何在不拉伸的情况下移动视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请,我需要以下帮助...

Please, I need help with the following ...

我想移动视频(人像类型),但不拉伸它...
要创建具有FFMPEG的16:9视频,...
我有以下示例...

I want to move a video (portrait type), but without stretching it ... To create a 16: 9 video, with FFMPEG ... I have the following example ...

ffmpeg -i video.mpg -filter:v crop = in_w-100:in_h-100:0:(in_h-out_h)/ 2 +((in_h-out_h)/ 2)* sin(t) -y out.mp4

/ p>

推荐答案

哇,我不知道我在想什么...
答案很简单,表明输出视频...

Wow, I do not know what I was thinking ... The answer was simple, indicate the HxW of the output video ...

ffmpeg -i video.mpg -filter:v crop = 1280:720 :0:((in_h-out_h)/ 2 +((in_h-out_h)/ 2)* sin(t) -y out.mp4

ffmpeg -i video.mpg -filter:v "crop=1280:720:0:(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t)" -y out.mp4

但是:如果要创建640x360视频,如何调整背景视频的大小?

我尝试添加缩放并进行一些测试,但我仍然无法制作背景视频,也可以缩放到640 x360。
ffmpeg -i test.mp4 -filter:v crop = 640:360:0:(in_h-out_h)/ 2 +((in_h-out_h)/ 2)* sin(t ),scale = 640:360 out.mp4

I tried to include "scale" and do some tests, but I still can NOT make the background video, also scale to 640x360. ffmpeg -i test.mp4 -filter:v "crop=640:360:0:(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t),scale=640:360" out.mp4.

视频输出: https://youtu.be/TCOLbbereQU

这篇关于FFMPEG:如何在不拉伸的情况下移动视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆