ffmpeg 不匹配过滤图描述中的流流说明符 ''
ffmpeg matches no streams Stream specifier '' in filtergraph description
ffmpeg -y -i a.mp4 -i b.mp3 -filter_complex '[0]volume=1,atrim=start=0:end=5,adelay=0|0[aud0];[1]volume=1,atrim=start=0:end=5.796,adelay=0|0[aud1];[aud0][aud1]amix=2' mergeAudio.mp3
a.mp4 仅视频流!
如何修复代码
enter image description here
在这种特殊情况下,使用 anullsrc
过滤器生成静默流并在 amix
中使用它。
ffmpeg -y -i a.mp4 -i b.mp3 -f lavfi -i anullsrc -filter_complex '[2]volume=1,atrim=start=0:end=5,adelay=0|0[aud0];[1]volume=1,atrim=start=0:end=5.796,adelay=0|0[aud1];[aud0][aud1]amix=2' mergeAudio.mp3
ffmpeg -y -i a.mp4 -i b.mp3 -filter_complex '[0]volume=1,atrim=start=0:end=5,adelay=0|0[aud0];[1]volume=1,atrim=start=0:end=5.796,adelay=0|0[aud1];[aud0][aud1]amix=2' mergeAudio.mp3
a.mp4 仅视频流!
如何修复代码
enter image description here
在这种特殊情况下,使用 anullsrc
过滤器生成静默流并在 amix
中使用它。
ffmpeg -y -i a.mp4 -i b.mp3 -f lavfi -i anullsrc -filter_complex '[2]volume=1,atrim=start=0:end=5,adelay=0|0[aud0];[1]volume=1,atrim=start=0:end=5.796,adelay=0|0[aud1];[aud0][aud1]amix=2' mergeAudio.mp3