I'm building an AVI file programmatically from a list of images (MJPG) and a sound track. Until now it's working well, but I'd like to delay the audio at some sync position.
I tried the dwStart field but apparently it's not supported by players. I also tried to pad the beginning of the audio stream with zeros, but it didn't work.
Any help is welcome.
+ Reply to Thread
Results 1 to 5 of 5
delay whole audio from start it isn't probelm i.e. Avidemux can do this easily, If you need delay or some operation in the middle of your avi, I think only way is to use some NLE (non linear editing) software. BTW for project you are doing is it best to use such software, so probably you are actually using one. At least from my point of view.
BernixVideo Avidemux, Mkvtoolnix, Subtitle edit, Vidcoder. Other software that I love :Animation: Opentoonz, Painting: Krita, Video capture: OBS studio, Video player: Potplayer, TV recording: VLC, NLE: KDEnlive
ffmpeg isn't good for delaying in AVI. The only "good" solution for delaying in AVI is to encode actual silence before the audio. AVI Mux GUI does this, ffmpeg and VirtualDub don't. So preprending 0s might work for PCM, otherwise you have to encode the silence into your audio format (mp3, AAC, etc.)
All this advice to use external apps is not going to help someone who is writing a program to fabricate the AVI file.
As sneaker points out, you need to insert silent audio frames in the proper encoding for your sound format.