0

i want to merge mp4 with mp3 using ffmpeg.

Duration of mp4 : 2 sec Duration of mp3 : 23 sec Output needed : Mp4 of duration 23 sec with vidoe playing in loop till 23 sec

Tried below code

1: Below code is created buggy result video time shows as 49 sec and vidoe stops after 23 sec

ffmpeg -stream_loop -1 -i video.mp4 -c copy -v 0 -f nut - | ffmpeg -thread_queue_size 10K -i - -i song.mp3 -c copy -map 0:v -map 1:a -shortest -y out.mp4

Please help with proper way to do same

Your Answer

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

Browse other questions tagged or ask your own question.