ffmpeg -i in.mp4 -c:v copy -an silent.mp4 drops the audio and copies all 320 video packets as they are, in a fraction of a second. ReelSDK's API strips an 11-second clip for under a fifth of a cent ($0.02 per compute minute).
Remove audio from a video with ffmpeg
Drop the audio and copy the video: nothing is decoded, so the picture stays bit for bit the same, and ReelSDK's API was done in about 4 seconds. Mute 2 s to 5 s with volume=0 instead, or drop only the second audio track with a negative -map.
GuidesUpdated
ffmpeg -i in.mp4 -c:v copy -an silent.mp4-an leaves every audio stream out and -c:v copy writes the video packets as they are. The result has every frame of the original and is smaller by the size of the audio.
Variations
The other commands you will need
Drop audio but keep subtitles and other streams
-map 0selects every stream and-map -0:aremoves the audio ones again. Unlike-analone, this keeps subtitle and data streams that ffmpeg would not pick on its own.negative map ffmpeg -i in.mp4 -map 0 -map -0:a -c copy silent.mp4Remove only one audio track
Counting from 0,
-0:a:1removes the second audio track and keeps the rest.drop track 1 ffmpeg -i two.mp4 -map 0 -map -0:a:1 -c copy one.mp4Mute a time range
volume=0withenablesilences the audio between 2 s and 5 s and leaves the rest. The audio is re-encoded, the video is copied.mute 2 to 5 s ffmpeg -i in.mp4 -c:v copy \ -af "volume=0:enable='between(t,2,5)'" \ -c:a aac -b:a 192k muted.mp4
The flags
The flags in these commands
| Flag | What it does | Used here |
|---|---|---|
-an | As an output option, leaves every audio stream out | Remove audio |
-c:v copy | Copies the video packets without decoding them | All four |
-map 0 | Selects every stream of input 0, subtitles and data included | Negative map, one track |
-map -0:a | A negative map: removes the matching streams from the selection | Negative map |
-map -0:a:1 | Removes only the second audio stream | One track |
volume=0 | Sets the audio level to zero | Mute a range |
enable='between(t,2,5)' | Applies the filter only from 2 s to 5 s | Mute a range |
Source: ffmpeg documentation, checked November 2026.
Why the picture does not change
With -c:v copy ffmpeg never decodes the video. It reads the H.264 packets from the input and writes them into the new MP4. We compared the two files packet by packet: same timestamps, same sizes, same md5. Only the audio and its share of the container are gone, about a quarter of a megabyte on this clip.
Leave out -c:v copy and ffmpeg re-encodes the video with libx264 at its defaults. That takes far longer and loses a little quality for no gain.
-an or a negative -map
-an turns off audio in the automatic stream selection, which picks one video, one audio and one subtitle stream at most. On a plain MP4 that is all there is, so -an is enough.
Files with several subtitle or data streams lose those with automatic selection. -map 0 -map -0:a starts from every stream and removes only the audio, so everything else survives. On our clip both ways wrote files of exactly the same size.
No audio track, or a silent one
Some tools want an audio track even if it is quiet. The concat demuxer, for one, expects every file to have the same streams, so a silent clip without audio will not join cleanly with clips that have it. In that case add silence from anullsrc instead of removing the track:
The silent AAC track added only about 11 KB to the file.
ffmpeg -i in.mp4 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 \
-map 0:v -map 1:a -c:v copy -c:a aac -shortest mute.mp4Checking a muted range
To confirm a range is really silent, run silencedetect on the result. On muted.mp4 it reported silence from just after 2 s to just after 5 s, the 3 seconds we asked for plus the edges of the AAC frames.
ffmpeg -i muted.mp4 -af silencedetect=noise=-50dB:d=0.5 -f null -Without installing ffmpeg
The same command as one API call
Send the same args to POST /v1/ffmpeg with the video URL in inputs. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in a few seconds and cost under a fifth of a cent.
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"in.mp4": "https://api.reelsdk.com/f/lib/demo/clip.mp4"
},
"args": ["-i", "in.mp4", "-c:v", "copy", "-an", "silent.mp4"],
"outputs": ["silent.mp4"]
}'FAQ
Questions, answered
How do I remove the audio from a video with ffmpeg?
Run ffmpeg -i in.mp4 -c:v copy -an silent.mp4. -an drops the audio and -c:v copy keeps the video exactly as it was, so the command finishes in a moment.
Does -an reduce video quality?
Not with -c:v copy. The video packets are copied unchanged; on our test clip every packet had the same md5 before and after.
How do I mute only part of a video?
Use the volume filter with timeline editing: -af "volume=0:enable='between(t,2,5)'" silences 2 s to 5 s. Copy the video with -c:v copy and re-encode only the audio.
Can I remove audio with an API instead?
Yes. POST the same args to https://api.reelsdk.com/v1/ffmpeg with the video URL in inputs. It runs ffmpeg 8.1 for $0.02 per compute minute, billed per second with a 1-second minimum.
- Replace the audio in a video with ffmpegSwap a video's soundtrack for another file with -map and -shortest, keep the picture untouched, and pad audio that runs short.
- Extract audio from a video with ffmpegCopy the AAC track out of an MP4 without re-encoding, or convert it to MP3 or WAV, with the file size each command produced.
- Mix two audio tracks with ffmpegLay music under a voice or combine any two tracks with amix, set their levels with weights, and avoid the three defaults that bite.
- Trim a video with ffmpegCut a clip with -ss and -to: frame-exact with a re-encode, fast with -c copy, and why the copy starts before your time.
- Concatenate videos with ffmpegJoin clips with the concat demuxer and -c copy when they match, or with the concat filter when their size, frame rate or codec differ.
- Video to GIF with ffmpegMake a clean GIF from a video with palettegen and paletteuse, then shrink it with frame rate, size, colours or a different format.
- Video conversionConvert WebM, MKV or MOV to MP4 and back in one ffmpeg call, about a third of a cent for a 30 s clip.
- FFmpeg onlineRun your own ffmpeg command on your files in the browser, free and without installing or uploading anything.
- ReelSDK vs self-hosted FFmpegTranscoding a minute of 1080p to 720p takes about 24 seconds of compute: about 0.8 cents on ReelSDK, about a tenth of a cent on a busy 4 vCPU box. Below about 11,000 minutes a month, the API costs less than an always-on box.
Sources, checked November 2026
Ready to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
