Trim First 10 Seconds of Audio with FFmpeg
This article provides a quick, practical guide on how to remove the first 10 seconds of an audio file using FFmpeg on Linux. You will learn the exact command-line syntax to trim your audio swiftly without losing quality, along with explanations of the key parameters used.
The Standard FFmpeg Trimming Command
To skip the first 10 seconds of an audio file and save the rest, you
use the -ss option. This flag specifies the start time
seeking point. Open your Linux terminal and run the following
command:
ffmpeg -ss 00:00:10 -i input.mp3 -acodec copy output.mp3Command Breakdown
Understanding what each part of the command does helps you customize it for future use:
ffmpeg: Calls the FFmpeg program.-ss 00:00:10: Tells FFmpeg to seek to the 10-second mark. You can use theHH:MM:SSformat or simply pass a total number of seconds, like-ss 10. Placing this before the input file makes the operation much faster because it utilizes seeking.-i input.mp3: Specifies your original, untrimmed input file name.-acodec copy: Instructs FFmpeg to copy the audio stream directly without re-encoding it. This makes the process nearly instantaneous and preserves 100% of the original audio quality.output.mp3: The name of your new, trimmed audio file.
Alternative Time Formats
If you prefer shorter commands, FFmpeg easily understands raw integers for seconds. Both of these variations achieve the exact same result:
ffmpeg -ss 10 -i input.mp3 -acodec copy output.mp3If your file uses a different extension, such as WAV, OGG, or FLAC, just change the input and output file extensions accordingly. FFmpeg automatically detects the container type.