I have a simple application that downloads a video + audio and 'concatenates' them with the tool FFmpeg , the problem is that most of the time the user will download a song bigger than the video in question and then there is a video of 10 seconds and the rest is a screen locked with background sound ... someone would know to inform me the parameters + explanation so I concatenate the song exactly the length of the video?
Current code:
ffmpeg -i {0}.{1} -i {2}.{3} -vcodec copy -acodec copy {4}.{5} && rm -rf {0}.{1} {2}.{3}
Search: Video and Audio file format