Skip to main content
  1. Posts/

Audio Processing Using FFmpeg

··158 words·1 min·
Tools Audio Ffmpeg
Table of Contents

Collected tips on audio processing with FFmpeg.

Remove audio from a video
#

To remove audio from a video file, i.e., muting the video, run the following command:

ffmpeg -i input.mp4 -c copy -an input-silent.mp4

Ref:

Extract audio from FFmpeg
#

ffmpeg -i input.mp4 -vn -acodec copy out.acc
  • -vn: do not use video
  • -acodec copy: copy the audio stream (equivalent to -codec:a copy, see stream specifier)

Extract audio in a time range
#

ffmpeg -i input.mp4 -vn -acodec copy -ss 00:01:00 -t 30 out.aac
  • -ss: the start time to process the video, in above case, we start from 1 minute
  • -t: the video duration to process, in this case, we process 30 seconds of video.

There is also a -to option which specifies the stop time to process the video. So the above command can also be written as:

ffmpeg -i input.mp4 -vn -acodec copy -ss 00:01:00 -to 00:01:30 out.aac

Ref:

Related

How to Extract Key Frames from A Video with FFmpeg
··426 words·2 mins
Tools Ffmpeg Video
Process video in a certain time range with FFmpeg?
··304 words·2 mins
Tools Ffmpeg
Notes on FFmpeg (1)
··530 words·3 mins
Tools Ffmpeg Video