gpt4 book ai didi

scroll - FFMPEG:如何在不拉伸(stretch)的情况下移动视频?

转载 作者:行者123 更新时间:2023-12-04 22:50:21 25 4
gpt4 key购买 nike

拜托,我需要以下帮助...

我想移动视频(肖像类型),但不拉伸(stretch)它......
使用 FFMPEG 创建 16:9 视频...
我有以下示例...
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
Example conceptual image

最佳答案

哇,我不知道我在想什么……
答案很简单,指出输出视频的 HxW ...
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 视频,如何调整背景视频的大小?

我尝试包含“缩放”并进行一些测试,但我仍然无法制作背景视频,也无法缩放到 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

关于scroll - FFMPEG:如何在不拉伸(stretch)的情况下移动视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54526345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com