命令将视频水平或垂直切成两半,然后再重新加入

编程入门 行业动态 更新时间:2024-10-27 18:18:18
本文介绍了命令将视频水平或垂直切成两半,然后再重新加入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何使用ffmpeg将视频按分辨率垂直或水平切成两半;因此,对于640 x 480的视频,我想将其分成分辨率为320 x 480的两半,或者将其水平分成640 x 240的两半;之后,我需要能够再次加入分开的视频,以制作具有原始分辨率的单个视频.该怎么办?

How can I use ffmpeg to cut video in half, vertically or horizontally by resolution; so for a 640 x 480 video, I want to separate that into two halves with a resolution of 320 x 480, or to separate it into two halves horizontally with a resolution of 640 x 240; and afterward, I need to be able to join the separated videos again to make a single video with the original resolution. How can this be done?

推荐答案

分成两半

使用作物过滤器:

ffmpeg -i input -filter_complex "[0]crop=iw:ih/2:0:0[top];[0]crop=iw:ih/2:0:oh[bottom]" -map "[top]" top.mp4 -map "[bottom]" bottom.mp4

垂直

ffmpeg -i input -filter_complex "[0]crop=iw/2:ih:0:0[left];[0]crop=iw/2:ih:ow:0[right]" -map "[left]" left.mp4 -map "[right]" right.mp4

加入分开的视频

使用使用ffmpeg垂直或水平堆叠多个视频的vstack/hstack过滤器?

更多推荐

命令将视频水平或垂直切成两半,然后再重新加入

本文发布于:2023-07-06 20:36:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1054518.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:切成   再重新   命令   水平   视频

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!