Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.