gpt4 book ai didi

ffmpeg - 如何组合这些 FFMPEG 命令?

转载 作者:行者123 更新时间:2023-12-04 23:32:15 25 4
gpt4 key购买 nike

Add logo

ffmpeg -i mainVideo.mp4 -i logo.mov -filter_complex "[0:v]setpts=PTS-STARTPTS[v0];[1:v]setpts=PTS-STARTPTS+36/TB[v1];[v0][v1]overlay=eof_action=pass[out1]" -map [out1] -threads 5 -y main_with_logo.mp4

Remove voice

ffmpeg -i main_with_logo.mp4 -c:v copy -an main_with_logo_s.mp4 -y

Add Speaker Voice

ffmpeg -i main_with_logo_s.mp4 -i voice.mp3 -filter:a "volume=2.5" -vsync vfr -pix_fmt yuv420p -b:v 4400k -vf fps=25 -c:a aac -strict experimental main_with_logo_voice.mp4 -y -threads 5

Add BGM

ffmpeg -i main_with_logo_voice.mp4 -i bgm.mp3 -filter_complex amix=inputs=2:duration=first:dropout_transition=2 -y -threads 5 main_with_logo_voice_bgm.mp4

Add Subtitle

ffmpeg -i main_with_logo_voice_bgm.mp4 -vf "subtitles=main.srt:force_style='Fontname=jx,Fontsize=16'" -threads 5 -y main_with_logo_voice_bgm_srt.mp4
所有这些步骤都需要很长时间,我怎样才能将这些 cmd 组合成一两个?

最佳答案

组合命令:

ffmpeg -i mainVideo.mp4 -i logo.mov -i voice.mp3 -i bgm.mp3 -filter_complex "[0:v]setpts=PTS-STARTPTS[v0];[1:v]setpts=PTS-STARTPTS+36/TB[v1];[v0][v1]overlay=eof_action=pass,subtitles=main.srt:force_style='Fontname=jx,Fontsize=16',format=yuv420p;[2:a]volume=2.5[voice];[voice][3:a]amix=inputs=2:duration=first:dropout_transition=2" output.mp4

关于ffmpeg - 如何组合这些 FFMPEG 命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67782102/

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