[FFmpeg-user] How to add padding silence for MP4 container?
Paul B Mahol
onemda at gmail.com
Sat May 25 15:03:17 CEST 2013
On 5/25/13, Francois Visagie <francois.visagie at gmail.com> wrote:
> 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?
ffmpeg -i input -af aresample=firts_pts=X
where X is 2 * sample_rate of your audio stream.
you can't use -codec:a copy to insert real silence.
>
>
>
> Many thanks,
>
> Francois
>
>
>
> Francois Visagie
>
>
>
>
>
> T: +27 (83) 326-4358
>
> F: +27 (86) 511-3490
>
> E: francois.visagie at gmail.com
>
>
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list