[FFmpeg-user] How to add padding silence for MP4 container?

Francois Visagie francois.visagie at gmail.com
Sat May 25 13:59:37 CEST 2013


Hi All,

 

I'm trying to help someone who needs to delay his audio stream by 2s: he got
given a .mp4 file containing only video and a .aac file with audio which he
needs to mux together delaying the audio by 2s.

 

This works perfectly for MKV:

 

                ffmpeg -i invideo.mp4 -itsoffset 00:00:02.000 -i inaudio.aac
-codec:v copy -codec:a copy out.mkv

 

However, he'd prefer the MP4 container format. Although the ffmpeg command
completes perfectly, no player on my machine respects the MP4 timestamps and
I've seen this reported elsewhere also.

 

So instead of using timestamps with MP4, is there a way to tell ffmpeg to
insert 2s of silence at the beginning of the audio?

 

Many thanks,

Francois

 

Francois Visagie

 

 

T: +27 (83) 326-4358

F: +27 (86) 511-3490

E: francois.visagie at gmail.com

 

 



More information about the ffmpeg-user mailing list