Audio Trimmer
Trim audio files by setting start time and duration using FFmpeg.
Audio Trimmer cuts a segment by Start Time and Duration (both HH:MM:SS text fields) and can change Output Format at the same time (MP3, WAV, OGG, AAC, FLAC; default MP3). Defaults are Start 00:00:00 and Duration 00:00:10 — always edit Duration for real use. A Local Processing alert confirms trimming runs in the browser.
The source chip shows size and duration once metadata loads (· HH:MM:SS); a native audio player previews the original. Output downloads as trimmed-{basename}.{ext} so the source is never overwritten. Steps: Upload → Trim → Download.
How it works
FFmpeg.wasm via useAudioTrimmerFfmpeg. getTrimArgs builds -ss {start} -i {input} -t {duration} then codec flags: mp3 → libmp3lame 192k; wav → pcm_s16le; ogg → libvorbis; aac → aac 192k; flac → flac.
Duration metadata is read client-side with new Audio(url) onloadedmetadata. Success toast: Audio trimmed! Result label: Trimmed to EXT.
How to use
- Open Audio Trimmer and read the Local Processing alert (middle step label is Trim).
- Drop an audio file (hint: MP3, WAV, OGG, AAC, FLAC — any audio format).
- Confirm size · duration on the chip and preview with the native player.
- Enter Start Time as HH:MM:SS (default 00:00:00).
- Enter Duration as HH:MM:SS (default 00:00:10).
- Choose Output Format (MP3 default; same-as-source keeps the type).
- Click Trim Audio (Trimming…) and watch progress % + FFmpeg log.
- Preview Trimmed to EXT, compare sizes, then Download (trimmed-…) or Start Over.
Tips
- Defaults trim only the first 10 seconds — set Duration to the length you actually want.
- You can change format while trimming (e.g. WAV → MP3 @192k), not just cut.
- Start + duration must fit inside the source or FFmpeg fails (Failed to trim audio.).
- WAV uses pcm_s16le (bigger); FLAC stays lossless.
- Output is always prefixed trimmed- to avoid overwriting the original.
Audio Trimmer FAQ
Is my audio uploaded?
No — audio trimming runs locally in your browser.
How are start/duration entered?
Text fields with HH:MM:SS placeholders (defaults 00:00:00 / 00:00:10).
Which formats can I output?
MP3, WAV, OGG, AAC, FLAC — same list as the input hint.
Can I trim without changing format?
Yes — pick the same format as the source; codec args re-encode to that format.
Why does my result have a trimmed- prefix?
The output is always named trimmed-{original-basename}.{ext} so the source file is never overwritten.
Credits
- ffmpeg.wasm — -ss/-t seeking plus codec selection in WebAssembly