I wants such a output video where audio of output is created using ffmpeg -filter_complex mechanism,
/usr/local/Cellar/ffmpeg/3.2.2/bin/ffmpeg
-i /uploads/videos/1487684390-lg9htt0RW2.mov
-i /uploads/audios/1487664761-SCPbo6Tkac.mp3
-filter_complex "
[0:a]atrim=0:8.70824980736,asetpts=PTS-STARTPTS[aud1];
[1:a]atrim=0:12.9567301273,asetpts=PTS-STARTPTS[aud2];
[0:a]volume=0.3,atrim=start=8.70824980736:21.6649799347,asetpts=PTS-STARTPTS[slow_aud];
[aud2][slow_aud] amerge=inputs=2[a_merged];
[0:a]atrim=start=21.6649799347:31.6410098076 [remaining_audio];
[aud1][a_merged][remaining_audio]concat=n=3:v=0:a=1[aout]"
-map 0:v -map "[aout]" -c:v copy -acodec mp3
/uploads/output/1487684390-lg9htt0RW2.mov
Original Audio Recorded Based On UTC timestamp Vs Original Video Recorded Based on UTC timestamp
13:00-------- Original Event Audio -------- 13:20
12:50------------- Event Video Recorded --------------13:30
This is my requirement
So the audio of the output video should contains
What I am getting by above commands
You haven't reset the timestamps of the remaining audio, as the concat filter requires. So, it should be
[0:a]atrim=start=21.6649799347:31.6410098076,asetpts=PTS-STARTPTS[remaining_audio];
A shorter way of achieving the same result is
-filter_complex
"[1:a]adelay=12956.7301273|12956.7301273[mp3];
[0:a]volume=0.3:enable='between(t,8.70824980736,21.6649799347)'[vid];
[vid][mp3]amix[aout]"