I'm using ffmpeg concat demuxer to combine similar files: https://trac.ffmpeg.org/wiki/Concatenate#demuxer

My input files have different lengths for video and audio streams. But are otherwise same in every regard, which is why I'm using concat demuxer.

This is resulting in the final output being un-seekable at certain timestamps.

Similar to this: https://video.stackexchange.com/questions/18247/ffmpeg-concat-demuxer-corrupted-output-freezed-video-on-some-concatenated-parts

But in my case, I don't care much about the audio stream and would rather it be discarded, if that helps since then there won't be two streams of different duration - just a single video stream.

The documentation seems to imply this may be possible, that you can choose which stream to consider for input.

Is that possible? I.e. omit audio streams from the input files when concatenating?


Use the -map or -an option.

ffmpeg -f concat -i input.txt -map 0:v -c copy output.mp4

Using these options will disable the default stream selection behavior which would otherwise automatically choose an audio stream.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.