You want to take a look at the aloop
-filter.
ffmpeg -i "song.mp4" -i "2.mp3" -filter_complex "[1:a]aloop=loop=-1[al];[al]adelay=3000|60000[1a];[0:a][1a]amix" -vcodec copy -y "output1.mp4"
https://ffmpeg.org/ffmpeg-filters.html#aloop
And then you will probably want to limit the song.mp4, so we are using the duration
option of amix
, to tell it to limit by the first input given. https://ffmpeg.org/ffmpeg-filters.html#amix
ffmpeg -i "song.mp4" -i "2.mp3" -filter_complex "[1:a]aloop=loop=-1[al];[al]adelay=3000|60000[1a];[0:a][1a]amix=duration=first" -vcodec copy -y "output1.mp4"
Since I am not sure which of the two files you want to loop and don't know if you want to loop before or after the delay you might need to adjust the order of filters.
2.mp3
is shorter thansong.mp4
and you want to loop themp3
? Or is it the other way around?