[FFmpeg-user] why are my streams not aligned?

Ted Park kumowoon1025 at gmail.com
Mon Nov 18 20:07:53 EET 2019

> I am not sure what you mean?  I thought I was doing a simple encoding:
> -  One input video only, one output for video.
> - One audio input plus a finalized video input for the audio output.
Yes, but you have separate (raw) input sources.

I think by alignment you are referring to the segment durations varying from each variant to another which could be a simple fix (at least I think?)
> Map is used to end up with a video only stream and an audio only stream.
by using the variant map for the hls muxer.

But then when you play the result, are the video and audio going to be in sync is what I’m wondering, since they come from separate sources, and processed on separate tasks.

> I am only including the copied video because I was under the impression
> that it was required to properly segment the audio file.

The audio stream doesn’t even have to be ts, you could have separate aac files for each segment. If you mean properly wrt synchronization, that’s what I’m wondering, since you have separate audio and video sources, is that even going to make any difference?

i.e. if you simply multiplex the input and output, are the video and audio in sync? If so, using that file and variant map would make things a lot simpler.

More information about the ffmpeg-user mailing list