問題描述
我想合并 2 個視頻,假設它們之間是相互編輯的
I want to combine 2 videos assume even they are edited among themselves
我們平時是怎么做的
視頻 1:
ffmpeg -i 1.mp4 -filter:a "volume=0.0" test1.mp4
視頻 2:
ffmpeg -i 2.mp4 -filter:a "volume=10.0" test2.mp4
現在我可以將它們組合使用
now I can combine them using
ffmpeg -i test1.mp4 -i test2.mp4 -filter_complex [0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa] -map [outv] -map [outa] out.put.mp4
所以我的問題是,有沒有辦法將這 3 步流程變成 1 步,并且不保存第 1 步和第 2 步的文件
So my question is, Is there a way to make this 3 steps process into 1 step and without saving files of step 1 and step 2
我知道我們可以使用 &&但我的主要查詢是有一種方法可以不保存編輯文件的 video1 和 video2 文件
I do know that we can combine into one using && but my main query is there a way to do without saving the files of video1 and video2 that edited files
希望我的查詢有點清楚
問題已編輯/添加:
ffmpeg -i test.mp4 -filter:a "volume=8.0,atempo=4.0" -vf "transpose=2,transpose=2,setpts=1/4*PTS" -s 640x480 test.mkv
我們能否在合并命令中也執行所有這些選項(更改視頻速度、分辨率、旋轉、幀率和修剪等操作)?
can we do all these options also in the merge command(operations like change video Speed, resolution, rotation, framerate, and trim)?
推薦答案
在將音頻流饋送到 concat 之前應用音量過濾器.
Apply the volume filters before feeding the audio streams to concat.
ffmpeg -i test1.mp4 -i test2.mp4 -filter_complex "[0:a:0]volume=0.0[a0];[1:a:0]volume=10.0[a1];[0:v:0][a0][1:v:0][a1]concat=n=2:v=1:a=1[outv][outa]"-map [outv] -map [outa] output.mp4
這篇關于合并 2 個編輯視頻而不使用 ffmpeg 保存它們的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!