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

Is it possible to loop audio when mixing with longer movie using avconv? I want music to repeat itself through whole movie. In avconv manual i found parameter "-flags loop" but it doesn't work. Music plays once and stops, while movie lasts longer with no sound.

avconv -i LONGER_MOVIE.mpg -i SHORTER.mp3 -flags loop -map 0:v -map 1:a MIXED_OUTPUT.mpg
share|improve this question
-flags loop shouldn't exist in recent Libav as far as I know. Also, the -loop option only works for images. I don't think what you want is currently possible. You could duplicate the MP3 separately from the video track, and then use the -shortest option. – slhck Mar 1 '13 at 16:42
Thanks. That's what i've actually done. It's not the best solution, because i want server script to mix short loopped music with video uploaded by users. To use that technique i have to make music file at least 2 hours long (in case of my audios repeat them about 60 times). I hoped there is a better method. – user2123923 Mar 1 '13 at 16:51

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.