0

I have some video that have different streams (audio/video) lenght. All, have audio greater than video.

With this situation, I can't upoad theses videos to Youtube.

If I cut the video, to the sortest lenght (NOT using the flag -shortest), the video is uploaded with success.

But, I can't cut the audio stream. The audio need to be full lenght (these videos is a physic class), and I can't loop the video.

Is there a way to pad(?) and image at the end of stream video? I already see some examples with "apad" to add silence song (what? rs) to make both stream same lenght.

3
  • Seems to work fine to me. YouTube accepts the videos I uploaded that have varying video and audio stream lengths, and they play to competition despite some user interface inconsistencies.
    – llogan
    Sep 13, 2016 at 22:00
  • One older, roundabout method that may work for you: How to hold the last frame when using ffmpeg.
    – llogan
    Sep 13, 2016 at 22:11
  • I will try that. Would be perfect. My videos have 20 minutes of diff
    – lcssanches
    Sep 13, 2016 at 23:07

1 Answer 1

1

Basic method is to use the overlay filter. If you know the audio duration and are ready to manually craft the command for each video, then you can use the template in @LordNeckbeard's comment.

A generic command which you can use is

ffmpeg -i input.mp4 -filter_complex "[0]showwaves=s=320x240:r=10[a-dur];[a-dur][0]overlay"
       -c:a copy -movflags +faststart output.mp4
1
  • Great! Now I just have to automate this. Thanks @Mulvya.
    – lcssanches
    Sep 16, 2016 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .