Zackriya-Solutions/meetily · warning
File too large: {:.2}GB. Maximum supported size is {}GB
Error message
File too large: {:.2}GB. Maximum supported size is {}GB What it means
validate_audio_file (import.rs:149) rejects files whose metadata len() exceeds MAX_FILE_SIZE_BYTES, a 20 GiB cap defined at import.rs:61 explicitly to prevent OOM during the decode-to-memory pipeline (all samples accumulate into a Vec<f32>, multiplying size several-fold over the compressed input) and to bound processing time. It fires after existence/format checks and before duration probing. The cap is on total file size, not audio payload, so video-heavy MP4s hit it even though their audio track is small.
Source
Thrown at frontend/src-tauri/src/audio/import.rs:149
.map(|e| e.to_lowercase())
.unwrap_or_default();
if !AUDIO_EXTENSIONS.contains(&extension.as_str()) {
return Err(anyhow!(
"Unsupported format: .{}. Supported: {}",
extension,
AUDIO_EXTENSIONS.join(", ")
));
}
// Get file size
let metadata = std::fs::metadata(path)
.map_err(|e| anyhow!("Cannot read file: {}", e))?;
let size_bytes = metadata.len();
// Check file size limit
if size_bytes > MAX_FILE_SIZE_BYTES {
return Err(anyhow!(
"File too large: {:.2}GB. Maximum supported size is {}GB",
size_bytes as f64 / (1024.0 * 1024.0 * 1024.0),
MAX_FILE_SIZE_BYTES / (1024 * 1024 * 1024)
));
}
// Get filename without extension for title
let filename = path
.file_stem()
.and_then(|s| s.to_str())
.unwrap_or("Imported Audio")
.to_string();
// Try fast metadata-only validation first
let duration_seconds = match extract_duration_from_metadata(path) {
Ok(duration) => {
debug!(
"Got duration from metadata: {:.2}s (fast path)",View on GitHub (pinned to 0281737d87)
Solutions
- Extract just the audio: ffmpeg -i huge.mp4 -vn -c:a aac -b:a 64k audio.m4a - usually shrinks 20+ GiB video to a few hundred MB.
- Split long recordings into parts under 20 GiB (ffmpeg -i in.wav -f segment -segment_time 3600 part%02d.wav) and import sequentially.
- Downsample while extracting (-ac 1 -ar 16000) to match the Whisper pipeline target and cut resample memory too.
- If >20 GiB single-file import is truly needed, raise MAX_FILE_SIZE_BYTES in import.rs - but first verify RAM headroom for the in-memory f32 samples.
- Prevent at the UI: show the size limit next to the picker so users transcode before selecting.
Example fix
# before: 25GB mp4 rejected by the 20GiB cap # after: strip video, keep speech-quality audio - imports fine ffmpeg -i meeting-4k.mp4 -vn -ac 1 -ar 16000 -c:a aac -b:a 48k meeting-audio.m4a
Defensive patterns
Strategy: validation
Validate before calling
// Frontend: pre-check size before invoking so users get guidance, not an error const MAX = 20 * 1024 * 1024 * 1024; const stat = await statFile(path); // via fs plugin if (stat.size > MAX) suggestAudioExtraction(path);
Type guard
const withinImportLimit = (sizeBytes: number) => sizeBytes <= 20 * 1024 * 1024 * 1024;
Try / catch
try { await invoke('import_audio_file', payload); }
catch (e) {
if (String(e).startsWith('File too large'))
showHint('Run: ffmpeg -i file.mp4 -vn -ac 1 -ar 16000 -c:a aac out.m4a and import out.m4a');
else throw e;
} Prevention
- Show the 20GB limit next to the file picker.
- Extract audio (-vn) from big video containers before importing - usually a 100x shrink.
- Split multi-day recordings into per-session files.
- If raising MAX_FILE_SIZE_BYTES, size RAM for all f32 samples held in memory (~4 bytes/sample).
When it happens
Trigger: Selecting multi-hour lossless captures (24h WAV at 48kHz stereo is ~15.5 GiB uncompressed - borderline); huge video files whose audio is tiny but whose container exceeds 20 GiB (4K screen recordings, multi-hour seminar MP4s); concatenated archives; PMR/recovery recordings.
Common situations: Importing day-long conference recordings or screen captures; WAV masters from studio sessions; users assuming audio import counts only the audio stream; surveillance/lecture capture archives.
Related errors
- File does not exist: {}
- Unsupported format: .{}. Supported: {}
- Cannot read file: {}
- Source file not found: {}
- No transcript text available. Please add some text first.
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/ccdbe8480ca6b407.
Report an issue: GitHub.