All posts
Remove audio from video via CLI
ffmpeg: copy the video stream and drop all audio tracks.
Open online converterPackages to install
Only ffmpeg is required. Stream copy keeps the original video quality.
ffmpeg
sudo apt-get update
sudo apt-get install -y ffmpegHow to run the command
Use -c copy to remux without re-encoding and -an to strip every audio stream.
ffmpeg -y -i input.mp4 -map 0:v -c copy -an output.mp4Dockerfile example
Build a minimal Ubuntu image with the required packages and run the conversion inside the container.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
docker build -t remove-audio-from-video .
docker run --rm -v "$PWD:/work" -w /work remove-audio-from-video \
ffmpeg -y -i input.mp4 -map 0:v -c copy -an output.mp4Example commands
Run these locally after installing the packages, or inside the container from the Dockerfile.
ffmpeg -y -i input.mp4 -map 0:v -c copy -an output.mp4ffmpeg -y -i input.webm -map 0:v -c copy -an output.webmffmpeg -y -i input.avi -map 0:v -c copy -an output.avi