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.
This is for a mobile app (Cordova) so I can't use a program like ffmpeg, but I need to build the video programmatically. The audio codec may vary.
(I used the AVI format because it seemed simpler to me, but if you know how to tweak the audio of a MP4 it's even better.)
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.