Reputation: 33
I am trying to adjust the position of waveform in a video using ffmpeg, the position by default is in th center, but i will like to shift it to the bottom. I know i need to use overlay filter, but how to call it is my problem. I tried this but doesn't work.
ffmpeg -i security3.mp3 -filter_complex "[0:a]showwaves=s=1280x202:mode=line[sw]; [sw]overlay=0:H-h,drawtext=fontcolor=white:x=10:y=10:text='\"Song Title\" by Artist'[out]" -map "[out]" -map 0:a -c:v libx264 -preset fast -crf 18 -c:a copy output.mp4
I am getting this error:
Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_overlay_1
Can someone help me here please?
Upvotes: 2
Views: 1218
Reputation: 133973
overlay requires 2 inputs: a background and a foreground. You only have 1 input: the waveform from showwaves. Add a video to use as the background:
ffmpeg -i video.mp4 -i security3.mp3 -filter_complex "[1:a]showwaves=s=1280x202:mode=line[sw];[0:v][sw]overlay=0:H-h,drawtext=fontcolor=white:x=10:y=10:text='\"Song Title\" by Artist'[out]" -map "[out]" -map 1:a -c:v libx264 -preset fast -crf 18 -c:a aac output.mp4
Upvotes: 2