I don't understand what you mean but it's pretty easyits sound and that anywhere in the video
ffmpeg \
-i video1.mp4 -i audio1.mp3 \
-c:v copy \
-map 0:v -map 1:a \
-y output.mp4
ffprobe -i <file> -show_entries format=duration -v quiet -of csv="p=0"
sox input output trim <seconds given by ffprobe>