I have an AC3 5.1 audio file to which I would like to insert x seconds of silent audio at the beginning. This has nothing to do with video muxing, so itsoffset is useless since it seems to only work with an audio stream accompanying a video one. I would like to achieve this with ffmpeg. Any ideas?
You can use the aevalsrc audio source filter in
Sample rate will default to 44100. You can change it, for example, by appending
Now you can concatenate the files using
Or you can use the concat protocol:
Or you can do everything in one command with the concat filter:
This last example will result in re-encoding, while the other examples will not re-encode.
Do it the easy way using Audacity. Import your audio file into Audacity, click in the audio track where you want to insert your silence, and from the Audacity menu select Generate -> Silence. You can see this illustrated in more detail here.