Add 2 seconds of blank/black video with ffmpeg -


let’s have 2 videos want play simultaneously. moviea.mp4 38.6 seconds duration, , movieb.mp4 31.14 seconds duration. using ffmpeg there easy way fill end of movieb.mp4 black silence 38.6 seconds (matching moviea.mp4). there’s niche technical reason want this, don’t ask haha!!

also if possible, less important, way remove afterwards.

been searching 2 days sort of easy way around without luck!!!

thanks in advance!

you can via command this:

ffmpeg -i moviea.mp4 -i movieb.mp4 -filter_complex "color=black:wxh[c]; \        [0][c]overlay=shortest=1[base];[base][1]overlay=eof_action=pass[v]" \        -map "[v]" -map 1:a bextended.mp4 

this assumes resolution of 2 videos same. should scale them, otherwise, make so.

wxh should replaced resolution of moviea e.g. color=black:1280x720


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -