transitive-bullshit / ffmpeg-gl-transition

FFmpeg filter for applying GLSL transitions between video streams.
647 stars 125 forks source link

Audio not hearing in output file while Concatenation two files, #48

Open elavarasanJargon opened 4 years ago

elavarasanJargon commented 4 years ago

Hi guys,

I am trying to concatenate two files for one video file. For that, it's working fine and i got output video file. But i can't hearing audio on output video file. It's issue please anyone help me.

Here is tested command,

../ffmpeg \ -i video1.mp4 \ -i video2.mp4 \ -y -filter_complex "\ [0:v]split[v000][v010];\ [1:v]split[v100][v110];\ [v000]trim=0:39[v001];\ [v010]trim=39:40[v011t];\ [v011t]setpts=PTS-STARTPTS[v011];\ [v100]trim=0:4[v101];\ [v110]trim=4:5[v112t];\ [v112t]setpts=PTS-STARTPTS[v112];\ [v011][v101]gltransition=duration=1:source=/home/procserverjh/opengl/gl-transitions-master/transitions/crosswarp.glsl[vt0];\ [v001][vt0][v112]concat=n=3[outv];[0:a][1:a]amix=inputs=2[ad]" \ -map "[outv]" -map "[ad]?" -vcodec h264_nvenc -acodec aac -strict experimental -ac 2 -ar 44100 -ab 128k \ output.mp4

Thanks, R.Elavarasan

vishnupradeep97 commented 2 years ago

You need to use adelay filter to delay the audio of the second video and then use an amix filter to mix audios and use that as audio for your video.