Trim AU — Free Online Tool
Trim a Sun AU audio file to a precise start and end point, preserving the original PCM audio stream (pcm_s16be by default) without any re-encoding or quality loss. Ideal for extracting clips from legacy Unix audio files while keeping the raw, uncompressed waveform intact.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your AU 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
Because both the input and output are AU files sharing the same PCM codec, FFmpeg uses stream copying (-c copy) to trim the file — no decoding or re-encoding occurs. The tool simply rewrites the AU container's simple fixed-length header with updated metadata and copies the raw PCM byte range that falls within your specified time window. Since AU stores uncompressed PCM audio (typically 16-bit big-endian signed PCM), the trim is sample-accurate and introduces zero generational quality loss. The output file is a fully valid AU file ready for playback on any Unix-compatible system or legacy audio tool.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. When run in the browser, this executes the FFmpeg.wasm WebAssembly build entirely client-side — your AU file never leaves your device. |
-i input.au
|
Specifies the input Sun AU file. FFmpeg reads the AU header to determine the PCM encoding (e.g., pcm_s16be), sample rate, and channel count before processing. |
-ss 00:00:00
|
Sets the trim start point as a timestamp. When placed after -i (as an output option), FFmpeg decodes up to this point before beginning to copy, ensuring accurate seeking in PCM AU files. Change this value to start your clip later in the file. |
-to 00:00:10
|
Sets the trim end point as an absolute timestamp from the beginning of the file, so this example produces a 10-second AU clip. Replace with -t followed by a duration (e.g., -t 5.5) if you prefer to specify clip length instead of an end time. |
-c copy
|
Instructs FFmpeg to copy the AU audio stream (whether pcm_s16be, pcm_alaw, pcm_mulaw, or another PCM variant) without re-encoding. This makes the trim lossless, instant, and codec-agnostic — no quality is lost regardless of the original PCM encoding. |
output.au
|
The output filename with the .au extension, telling FFmpeg to write a valid Sun AU container. The output header will be populated with the same sample rate, channel count, and PCM encoding type as the input file. |
Common Use Cases
- Extract a specific spoken phrase or sound effect from a legacy Sun Workstation AU audio archive for reuse in a modern project
- Trim a long Unix system alert or notification sound stored in AU format down to just the essential beep or tone
- Clip a segment from an early internet-era AU audio file (common in 1990s web audio) for preservation or archival purposes
- Cut out silence or unwanted preamble from a raw AU recording captured on a Unix system before converting it to another format
- Isolate a specific passage from a multi-minute AU-encoded telephony recording that uses pcm_alaw or pcm_mulaw encoding for quality testing
- Prepare a short AU audio snippet for use in a Unix or embedded system that specifically requires the AU container format
Frequently Asked Questions
No. Because the input and output are both AU files using the same PCM codec (such as pcm_s16be), FFmpeg uses stream copying rather than decoding and re-encoding the audio. The raw PCM samples are copied byte-for-byte from the original file into the new AU container, so there is absolutely no quality loss regardless of how many times you trim.
AU files store uncompressed PCM audio, which means there are no compressed frames or keyframe boundaries to worry about — every individual sample is independently addressable. FFmpeg can seek to and cut at a very precise point in the audio stream. In practice, the trim accuracy is within a single audio sample (a fraction of a millisecond at standard sample rates like 8000 Hz or 44100 Hz).
The AU format has an extremely minimal header: it stores only a magic number, data offset, data size, encoding type, sample rate, and channel count — plus an optional free-form annotation field. There are no standardized ID3-style metadata tags. When trimming, FFmpeg copies what header information it can, but the AU format's design means rich metadata was never supported in the first place. If you need metadata, consider converting to a format like FLAC or WAV after trimming.
Yes. The -c copy flag instructs FFmpeg to copy whatever audio codec is present in the source AU file, whether that is pcm_s16be, pcm_alaw, pcm_mulaw, pcm_s8, or pcm_u8. The trim operation does not care about the specific PCM variant — it copies the encoded bytes directly. Your output AU file will use the same encoding as the input.
Modify the values after -ss (start time) and -to (end time) in the command. Both accept timestamps in HH:MM:SS format or plain seconds (e.g., 30.5 for 30.5 seconds). For example, to extract from 5 seconds to 12.5 seconds you would use: ffmpeg -i input.au -ss 00:00:05 -to 00:00:12.5 -c copy output.au. Alternatively, replace -to with -t to specify a duration instead of an end timestamp.
The single command shown handles one file at a time, but you can batch process AU files easily on the command line using a shell loop. On Linux or macOS: for f in *.au; do ffmpeg -i "$f" -ss 00:00:05 -to 00:00:30 -c copy "trimmed_$f"; done. On Windows Command Prompt: for %f in (*.au) do ffmpeg -i "%f" -ss 00:00:05 -to 00:00:30 -c copy "trimmed_%f". This is especially useful for trimming large collections of legacy Unix audio files to a uniform length.
Technical Notes
The Sun AU format uses a fixed 24-byte minimum header (magic .snd, data offset, data size, encoding integer, sample rate, channels) followed by optional annotation bytes and then raw PCM data. Because the audio data begins at a known byte offset and PCM samples have a fixed size, trimming is a straightforward byte-range operation — no index tables or frame boundaries need to be rebuilt. FFmpeg's -c copy avoids any codec pipeline entirely, making this one of the fastest possible trim operations. One edge case to be aware of: if the source AU file has an inaccurate or zero-filled data size field in its header (common in streamed or improperly closed AU files, since AU was designed with streaming in mind), FFmpeg will attempt to read to end-of-file and the output size field will be recomputed correctly. The AU format does not support multiple audio tracks, subtitles, chapters, or video, so none of those concerns apply here. If your AU file was recorded at an unusual telephony sample rate (e.g., 8000 Hz with pcm_mulaw), the trim will respect that sample rate and the output will play back correctly at the same rate.