Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

参数没加引号导致部分参数被shell解析成命令 #25

Open
NyPhile opened this issue Feb 26, 2024 · 0 comments
Open

参数没加引号导致部分参数被shell解析成命令 #25

NyPhile opened this issue Feb 26, 2024 · 0 comments

Comments

@NyPhile
Copy link

NyPhile commented Feb 26, 2024

生成带音频的视频时,debug显示有一步的命令ffmpeg -i {path}/tmp/synthesizer/video_404m4w1tedlt2d3h15.mp4 -i {path}/tmp/preprocessor/x/public/voice/swr4evwebn8.mp3 -y -filter_complex [1]atrim=start=0:end=13.062,adelay=0|0,volume=1[a0];[a0]amix=inputs=1:normalize=0 -acodec aac -vcodec copy -t 13 -movflags +faststart -f mp4 {path_output}/video-1708917063155.mp4
执行的时候报错:
Error: ffmpeg exited with code 1: Error initializing complex filters. Option not found

单独执行的话,会报错:bash: 0,volume=1[a0]: command not found

尝试把命令修改成:ffmpeg -i {path}/tmp/synthesizer/video_404m4w1tedlt2d3h15.mp4 -i {path}/tmp/preprocessor/x/public/voice/swr4evwebn8.mp3 -y -filter_complex "[1]atrim=start=0:end=13.062,adelay=0|0,volume=1[a0];[a0]amix=inputs=1:normalize=0" -acodec aac -vcodec copy -t 13 -movflags +faststart -f mp4 {path_output}/video-1708917063155.mp4就成功了。
是否考虑在参数部分添加引号?

ffmpeg版本:
ffmpeg version 3.4.1

另外,又测试了一下,使用ffmpeg 6.1版本时,audio部分不加引号也能正常,但video部分的参数缺失Error: ffmpeg exited with code 218: frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=N/A bitrate=N/A speed=N/A,是否在Readme指明能跑通的ffmpeg版本?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant