Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

DISCLAIMER: I am unfortunately very new to codecs and using FFMPEG, so I apologize for any incorrect terminology or if this is in actuality a very easily resolved question.

I have a sequence of jpeg images and a sequence of mp3 frames where each has an associated timestamp.

By assuming a constant framerate which could be found from the number of images / duration of video, I have been able to assemble an AVI out of the jpeg images and a wav out of the mp3 frames (after some tomfoolery with FFMPEG). These can then be combined in a straightforward manner to create an avi container with sound and video.

Most of the time, the assumption that the framerate is constant is correct and produces a product where the audio and video is synced. However,there are times where the framerate was drastically reduced when the streams were originally recorded, which results in the final video being completely out of sync.

As I have the timestamps, I feel there must be a straightforward way to encode the video where each jpg frame is named its timestamp. However, my searches into encoding variable rate videos have yielded two solutions. The first requires using a codec like MJPEG that accepts variable rate encoding using a custom script (didn't look too simple as I am not a pro at FFMPEG). The other required repeating image frames in order to maintain a constant framerate.

What do you guys suggest I do?

share|improve this question
What command are you using to combine the audio and video? – OrangeDog Jun 4 '14 at 16:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.