Superimposing audio waves on video bottom

Steam recording with RTMPDump or FFmpeg.
Post Reply
Posts: 1
Joined: Mon Apr 02, 2018 7:40 am

Superimposing audio waves on video bottom

Post by knzoltan » Mon Apr 02, 2018 7:45 am


I'd like to overlay the audio as a waveform coming from an axis camera's stream.
I've started to read the documentation, but It's quiet complex. For testing I use a test stream. So far I managed to pad a bottom:

Code: Select all



# 1 enlarging the video
#ffmpeg -i "$stream" -vf "pad=width=240:height=160+$padbottom:x=0:y=0:color=A9F5A9" videoPart.mp4

# 2 creating a waveform out of the video
ffmpeg -i $stream -filter_complex "[0:a]showwaves=s=240x$padbottom:mode=line" audioPart.mp4
I'd like to merge the 2 ffmpeg commands into one single comman producing a videofile with its audio superimposed on the bottom,
similar to this one:

As far as I understand the filter_complex documentation, this could be achieved by these steps:

1. split the incoming stream into 2 streams. (which I don't know how to do)
2. padding the 1st stream, (enlarging it by 40 pixels)
3. apply the waveform or showvolume on the second stream, creating a 240 x 40 pixel video out of it
4. merging the 2 stream together. (but how? According to the documentation 'split' is for cutting a media file, at least to my understaning) :roll:

Could you please help me?



Posts: 74
Joined: Mon Feb 24, 2014 1:46 pm

Re: Superimposing audio waves on video bottom

Post by pandy » Fri Apr 20, 2018 3:14 pm

At first:

Perhaps this will work (sorry had no time to test).

Code: Select all

-filter_complex "[0:v]pad=width=240:height=160+$padbottom:x=0:y=0:color=A9F5A9[vout];[0:a]showwaves=s=240x$padbottom:mode=line[aout];[vout][out]overlay=format=auto:w=0:h=0"

Post Reply