Trim ALAC — Free Online Tool
Trim an ALAC (.m4a) audio file to a precise segment while preserving the original lossless Apple Lossless encoding — no re-encoding, no quality loss. Because both input and output are ALAC in an MPEG-4 container, the audio stream is simply copied with new start and end timestamps.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your ALAC file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
Since the input and output are both ALAC stored in an .m4a (MPEG-4) container, FFmpeg performs a stream copy rather than a re-encode. The raw ALAC audio packets between the specified start and end points are extracted and written directly into a new .m4a file. No decoding or re-encoding occurs, which means the waveform data is bit-for-bit identical to the corresponding section of the original — critical for archival and mastering workflows. The only caveat is that because ALAC is a frame-based codec, FFmpeg will seek to the nearest keyframe before the specified start point, so the actual trim may begin a few milliseconds earlier than requested; the container timestamps are adjusted to reflect the intended range. Metadata tags stored in the MPEG-4 container are preserved by default during the copy operation.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In the browser, this runs via FFmpeg.wasm compiled to WebAssembly — the command syntax is identical to desktop FFmpeg, so you can copy it directly to a terminal. |
-i input.m4a
|
Specifies the input ALAC file in an MPEG-4 container (.m4a). FFmpeg reads the container structure to locate the ALAC audio stream and any embedded metadata before applying the trim parameters. |
-ss 00:00:00
|
Sets the trim start point at 0 seconds (the beginning of the file). Change this timestamp to seek into the file — for example, -ss 00:01:30 starts the output at 1 minute and 30 seconds into the original ALAC recording. |
-to 00:00:10
|
Sets the trim end point at 10 seconds. The output .m4a will contain only the ALAC audio between the -ss and -to timestamps. Replace with your desired end time, or swap -to for -t to specify a duration instead. |
-c copy
|
Instructs FFmpeg to copy all streams (in this case, the ALAC audio stream) without decoding or re-encoding. This preserves the lossless audio data bit-for-bit and makes the operation nearly instantaneous regardless of file size. |
output.m4a
|
The destination file for the trimmed ALAC audio. Using the .m4a extension ensures the output is written as an MPEG-4 container holding the copied ALAC stream, maintaining full compatibility with Apple Music, iTunes, and iOS devices. |
Common Use Cases
- Extract a specific song or movement from a full lossless album rip stored as a single long ALAC file before importing into iTunes or Apple Music
- Trim silence or dead air from the beginning or end of a losslessly recorded live concert capture in ALAC without degrading audio fidelity
- Cut a precise segment from an ALAC master recording to send as a lossless reference clip to a mixing or mastering engineer
- Shorten an ALAC audiobook chapter file to isolate a specific section for review or quality-checking without transcoding
- Create a lossless preview clip from an ALAC recording to attach to a licensing pitch, preserving full dynamic range and sample depth
- Remove an unwanted intro or outro from an ALAC podcast recording that was captured losslessly before final production lossy encoding
Frequently Asked Questions
No. Because both the input and output use the ALAC codec inside an .m4a container, FFmpeg uses stream copy mode (-c copy), which extracts the compressed audio packets directly without decoding them. The trimmed file is bit-for-bit identical to the corresponding portion of the original — every sample, every bit depth value, and every channel is preserved exactly. This is one of the core advantages of working in a lossless format like ALAC.
Yes, in most cases. When FFmpeg copies an ALAC stream within the MPEG-4 container, it also copies the metadata atoms (title, artist, album, track number, artwork, etc.) stored in the container. However, tags like track duration will be updated to reflect the new trimmed length. If you have embedded album art, it will also be preserved in the output .m4a file.
ALAC is a frame-based codec, and FFmpeg must seek to the nearest audio frame boundary at or before your requested start point. If your specified timestamp falls in the middle of a compressed frame, FFmpeg backs up to the previous frame boundary to ensure clean, artifact-free playback from the start. The container timestamps are corrected so that most players will begin playback at the intended position, but the file technically contains audio data from slightly before your cut point.
Modify the values after -ss (start time) and -to (end time). Both accept timestamps in HH:MM:SS format or plain seconds — for example, -ss 00:01:30 -to 00:03:45 trims from 1 minute 30 seconds to 3 minutes 45 seconds, and -ss 90 -to 225 is equivalent. You can also replace -to with -t to specify a duration instead of an end timestamp; for example, -t 00:02:15 would extract 2 minutes and 15 seconds starting from the -ss point.
Yes, using a shell loop on your desktop. On macOS or Linux: for f in *.m4a; do ffmpeg -i "$f" -ss 00:00:00 -to 00:00:10 -c copy "trimmed_$f"; done. On Windows Command Prompt: for %f in (*.m4a) do ffmpeg -i "%f" -ss 00:00:00 -to 00:00:10 -c copy "trimmed_%f". The in-browser tool processes one file at a time, but the displayed FFmpeg command is designed to be reused locally for batch operations on files of any size.
MPEG-4 containers do support chapter tracks, and FFmpeg's stream copy will carry over chapter metadata. However, chapter markers that fall outside the trimmed range will reference timestamps that no longer exist in the output file, and chapters at specific absolute positions may not align correctly with the new shorter file. If your source file contains chapter markers, review them in a tag editor like MusicBrainz Picard or iTunes after trimming and adjust timestamps as needed.
Technical Notes
ALAC (Apple Lossless Audio Codec) stores compressed audio in an MPEG-4 container with the .m4a file extension, using the same container format as AAC but with a lossless codec. Because trimming keeps both the codec and container identical, FFmpeg can operate in stream copy mode, which is orders of magnitude faster than re-encoding and produces no generational quality loss — important when the ALAC file represents a mastered or archival source. ALAC supports up to 32-bit integer sample depth and sample rates up to 384 kHz, and all of these properties are preserved during a copy-mode trim. One known limitation specific to frame-based codecs like ALAC is sub-frame-precision trimming: the actual cut point is constrained to frame boundaries (typically every few milliseconds), so sample-accurate trimming to an exact millisecond is not guaranteed without re-encoding. The .m4a output is fully compatible with Apple Music, iTunes, iOS, macOS, and any player that supports ALAC, including VLC and most modern media players. Files processed in the browser via FFmpeg.wasm behave identically to desktop FFmpeg for this operation.