吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1006|回复: 30
收起左侧

[学习记录] 分享一下整理的常用ffmpeg命令

  [复制链接]
kidyan0000 发表于 2024-3-31 20:46
分享一下整理的常用ffmpeg命令

!! Transform videos to picture
.\ffmpeg.exe -i input.mp4 -vf fps=1 output%d.png

!! Change size of videos or images
.\ffmpeg.exe -i input.mp4 -vf scale=320:240 output.mp4

!! Combine/stack two videos or images
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -filter_complex vstack=inputs=2 output.mp4
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -filter_complex hstack=inputs=2 output.mp4

!! Combine images to videos
.\ffmpeg.exe -r 100 -f image2 -s 500x500 -i pic%00d.png -vcodec libx264 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -crf 25  -pix_fmt yuv420p output.mp4

!! Combine/stack two videos or images and change size
.\ffmpeg.exe -i part1.mp4 -i part1.mp4 -filter_complex "[0:v]pad=iw*2:ih*1[a];[a][1:v]overlay=w" output.mp4

!! Crop videos or images
!! out_w is the width of the output rectangle
!! out_h is the height of the output rectangle
!! x and y specify the top left corner of the output rectangle
!! .\ffmpeg.exe -i input.mp4 -strict -2 -vf crop=600:796:200:0 output.mp4 !! ctspecimen
!! .\ffmpeg.exe -i input.mp4 -strict -2 -vf crop=1612:300:0:300 output.mp4 !! ASTM_E606
.\ffmpeg.exe -i a.mov -strict -2 -vf crop=out_w:out_h:x:y output.mp4

!! Combine/stack three videos or images
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -i out3.mp4 -filter_complex "[0:v]pad=iw*3:ih*1[a];[a][1:v]overlay=w[b];[b][2:v]overlay=2.0*w" output.mp4

!! Speed up videos
.\ffmpeg.exe -i input.mp4 -filter:v "setpts=PTS/60" output.mp4

!! Cut videos
.\ffmpeg.exe -i input.mp4 -ss 00:00:00 -t 00:00:10 -async 1 output.mp4

!! remove voice
.\ffmpeg.exe -i input.mp4 -c copy -an output.mp4

!! compress video
.\ffmpeg.exe -i input.mp4 -vcodec libx265 -crf 28 output.mp4

!! concat video
.\ffmpeg.exe -f concat -safe 0 -i join.txt -c copy output.mp4
!! join.txt
!! file part1.mp4
!! file part2.mp4
!! file part3.mp4
!! file part4.mp4

!! Merging video and audio, with audio re-encoding
.\ffmpeg.exe -i input.mp4 -i audio.wav -c:v copy -c:a aac output.mp4

!! Speed up videos
.\ffmpeg.exe -i input.mp4 -filter:v "setpts=0.5*PTS" output.mp4

!! change videos format
.\ffmpeg.exe -i input.mp4 -c:v libx264 -ar 22050 -crf 28 output.flv

!! change videos size
.\ffmpeg.exe -i input.mp4 -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy output.mp4

免费评分

参与人数 2吾爱币 +2 热心值 +1 收起 理由
shuiangao + 1 热心回复!
qq63 + 1 + 1 谢谢@Thanks!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

xm65R 发表于 2024-3-31 23:42
最近在研究,刚刚用上了
xiaoye123 发表于 2024-3-31 23:51
吖力锅 发表于 2024-4-1 01:01
52PJ070 发表于 2024-4-1 05:35
整理的不错,都是常用的,辛苦了
moneyjin 发表于 2024-4-1 07:14
谢谢!发个中文注解的啊
印斩 发表于 2024-4-1 08:06
感谢分享整理教程
700529yrf 发表于 2024-4-1 08:12
学习研究一下
zsj118106 发表于 2024-4-1 08:17
先收藏了,后期应该能用的上,谢谢分享
addseason 发表于 2024-4-1 08:28
标记一下,感谢分享
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-5 23:39

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表