adding audio files to exist video with ffmpeg make the video currapted

For the developers that use FFmpeg in their software.
Post Reply
yanshof
Posts: 5
Joined: Thu Jan 11, 2018 9:33 am

adding audio files to exist video with ffmpeg make the video currapted

Post by yanshof » Sun Jan 21, 2018 6:35 pm

I have video file (*.avi) and audio files (*.wav) that i want to marge to ine avi file.

The wav files are marge with some delay ( work fine )

But in some cases the audio files are longer then the video stream and i getting currapted video file that contain only the audio - and i can't see the video.

When i try to separate the audio and the video from the currapted video output i got the good video file and good audio file that i can use ( see the video and listen to the audio )

I don't know if its possible to keep the audio and video in case the audio is longer on the delay that the video file.

Here how i marge the files ( audio and the video )

ffmpeg.exe -report -i "..\\merged.avi" -i "Storage\\1.wav" -i
"Storage\\2.wav" -i "Storage\\3.wav" -filter_complex "adelay=30000|30000"
"adelay=91000|91000" "adelay=151000|151000" -c:v copy "Storage\\ALL.AVI"

CoRoNe
Posts: 64
Joined: Thu Aug 22, 2013 5:14 pm
Contact:

Re: adding audio files to exist video with ffmpeg make the video currapted

Post by CoRoNe » Fri Feb 23, 2018 2:17 pm

What exactly are you trying to achieve?
If you want to apply the audio delay and end up with a video that has 3 separate audiotracks, then you'd have to output to a MKV file, as AVI doesn't support multiple audiotracks.
If you want to apply the audio delay and end up with a video that has 1 audiotrack, then you'd have to merge the audiotracks together.

This is the wrong section for your post, btw. It needs to be in "Support / Usage"

User avatar
sarav
Posts: 2
Joined: Tue Mar 20, 2018 2:13 pm
Location: India

Re: adding audio files to exist video with ffmpeg make the video currapted

Post by sarav » Tue Mar 20, 2018 2:17 pm

Am also facing the same issue. My code only working In FFmpeg-3.2-win64-static.

Cant able to use newer one. Kindly help me sort out this.

Post Reply