Overview
OfflineTube allows you to configure default quality settings for downloads. These preferences are stored in browser localStorage and persist across sessions.Default Quality
The default quality setting determines which video resolution is pre-selected when starting a new download.Default video quality/resolution for downloads. Stored in localStorage as
yt-default-quality.Available Quality Options
OfflineTube supports the following quality presets (fromsrc/components/SettingsPanel.tsx:21-30):
| Quality | Label | Description |
|---|---|---|
best | Mejor disponible | Highest quality available for the video |
2160p | 2160p (4K) | 4K Ultra HD resolution |
1440p | 1440p (2K) | 2K Quad HD resolution |
1080p | 1080p (Full HD) | Full HD resolution |
720p | 720p (HD) | HD resolution (default) |
480p | 480p | Standard definition |
360p | 360p | Low resolution |
240p | 240p | Minimum resolution |
How Quality Selection Works
- User preference: The selected quality (e.g.,
720p) is used as a target - Format matching: yt-dlp finds the best format at or below the target quality
- Auto-merge: Video and audio streams are automatically merged by FFmpeg
- Fallback: If the exact quality isn’t available, the closest lower quality is used
mini-services/offlinetube-api/main.py:266-269):
Download Type
Type of content to download:
video (MP4) or audio (M4A). Stored in localStorage as yt-default-type.Options:video- Download video with audio (MP4 format)audio- Download audio only (M4A format)
Video Download
Whendownload_type is set to video:
- Downloads both video and audio streams
- Merges them into a single MP4 file
- Embeds thumbnail into the file metadata
- Output codec: H.264 or AV1 (browser-compatible)
Audio Download
Whendownload_type is set to audio:
- Downloads audio stream only
- Uses best available audio quality
- Output format: M4A or MP3
- Smaller file size than video
Format Selection
In the YouTube Explorer, you can select specific formats beyond the quality presets.Video Formats
Each quality level may have multiple format options:- Different codecs (H.264, VP9, AV1)
- Different bitrates
- Different file sizes
Audio Formats
Audio-only formats include:- Different bitrates (128kbps, 256kbps, etc.)
- Different codecs (AAC, Opus, M4A)
Configuring Default Settings
Via Settings Panel (UI)
- Navigate to Configuración (Settings) tab
- Under Descarga por defecto section:
- Select desired Calidad de video (720p, 1080p, etc.)
- Choose Tipo de descarga (Video or Audio)
- Settings are saved automatically to localStorage
Via localStorage (Programmatic)
Settings are stored in browser localStorage and can be accessed programmatically:src/app/page.tsx:54-61:
Quality Detection
After download completes, OfflineTube detects the actual output quality using FFprobe.Video Quality Detection
Extracts the actual video height from the downloaded file:1080 → displayed as 1080p
Audio Quality Detection
Extracts the bitrate for audio-only downloads:128000 → displayed as 128kbps
From mini-services/offlinetube-api/main.py:177-208
Best Practices
Recommended Settings
Daily use (balanced quality/size)Format Notes
Completed downloads display format information:- Video downloads: Show actual resolution (e.g.,
1080p,720p) - Audio downloads: Show bitrate (e.g.,
128kbps,256kbps) - Quality badge: Displayed in the downloads list and library
format_note field after download completion (main.py:362-364):