Skip to main content
This guide will walk you through using MegaDownloader to download your first video, extract audio, and play the downloaded file. By the end, you’ll have a complete understanding of the core workflow.
Before starting, ensure you’ve completed the Installation guide and configured the yt-dlp path.

Starting the Application

1

Launch MegaDownloader

Run the application using Maven or the packaged JAR:
mvn exec:java
or
java -jar target/megadownloader-1.0-SNAPSHOT.jar
The application window will open with a modern dark theme (FlatLaf Darcula) and display the login screen.
2

Login to your account

Enter your credentials in the login form:
  1. Email: Type your email address (validated in real-time using regex pattern from LoginForm.java:183)
    Pattern pattern = Pattern.compile("^[\\w.-]+@[\\w.-]+\\.[a-zA-Z]{2,}$");
    
  2. Password: Enter your password (must not be empty)
  3. Remember me: Check this box to save your session token for auto-login next time
  4. Click Login or press Enter
The application validates your email format in real-time - you’ll see a red border if the format is invalid. The login is processed asynchronously using a SwingWorker to keep the UI responsive.
Once authenticated, you’ll automatically navigate to the main download panel (Main.java:227).

Downloading Your First Video

Now let’s download a video from YouTube:
1

Paste the video URL

  1. Copy a YouTube video URL from your browser
  2. Paste it into the URL text field at the top of the main panel
The URL field cannot be empty or contain placeholder text. If invalid, you’ll see an error dialog (MainPanel.java:487).
2

Configure download options

Before clicking Download, you can customize the download:
  • Audio only: Check this box to extract audio as MP3 (requires FFmpeg)
  • Advanced options: Click the Advanced ▼ button to add custom yt-dlp arguments
When “Audio only” is checked, MegaDownloader passes these arguments to yt-dlp (MainPanel.java:570-574):
if (audioOnly) {
    command.add("-x");
    command.add("--audio-format");
    command.add("mp3");
}
3

Start the download

Click the Download button.You’ll see:
  • The button text changes to “Downloading…”
  • A progress bar appears showing real-time download progress
  • Console output with yt-dlp logs (if running from terminal)
The download runs in a background SwingWorker thread (MainPanel.java:546-694), parsing yt-dlp output to update the progress bar:
if (line.contains("[download]") && line.contains("%")) {
    String percentStr = line.substring(line.indexOf("]") + 1, line.indexOf("%")).trim();
    double percent = Double.parseDouble(percentStr);
    publish((int) percent);
}
4

Wait for completion

When the download completes successfully:
  • A success dialog appears: “Download completed successfully!”
  • The Play Last Downloaded File button becomes visible
  • The URL field updates to: “Insert new URL to download new video”
  • If M3U playlist creation is enabled in Preferences, a playlist file is generated
The downloaded file is saved to your configured download directory or the project root by default.

Extracting Audio

To download only the audio from a video:
1

Enable audio extraction

Before clicking Download:
  1. Paste your video URL
  2. Check the Audio only checkbox
  3. Click Download
2

FFmpeg processing

MegaDownloader will:
  1. Download the best audio stream from the video
  2. Use FFmpeg to convert it to MP3 format
  3. Save the file with the video title and .mp3 extension
If FFmpeg is not found, you’ll see a warning dialog with instructions (MainPanel.java:524-537):
FFmpeg not found! Audio extraction requires FFmpeg.

Please either:
1. Place ffmpeg.exe and ffprobe.exe in: [your-yt-dlp-directory]
2. Add ffmpegPath:"C:\path\to\ffmpeg\folder" to config.txt

Continue download anyway?
If you choose “Yes”, the download continues but may fail during audio extraction.
3

Verify audio file

After successful extraction:
  • The MP3 file appears in your download directory
  • The progress bar shows 100%
  • You can play it immediately using the Play button

Playing Downloaded Files

MegaDownloader includes a built-in player launcher:
1

Play the last downloaded file

After a successful download, click the Play Last Downloaded File button.The application uses Java’s Desktop API to open the file with your system’s default media player (MainPanel.java:714-717):
if (Desktop.isDesktopSupported()) {
    Desktop desktop = Desktop.getDesktop();
    desktop.open(lastDownloadedFile);
}
2

Browse all downloaded files

To manage your entire media library:
  1. Click the Manage Media button in the bottom-right corner
  2. The Media Manager panel opens with a table showing:
    • All local files in your download directory
    • Files uploaded to the server (if any)
    • File type, size, and modification date
  3. You can:
    • Play any file by double-clicking or using Quick Actions
    • Open Folder to view files in your file explorer
    • Download server files to local storage
    • Delete unwanted local files
3

Use Quick Actions

In the Manage Media panel, double-click any action in the Quick Actions list:
  • Play: Opens the selected file in your default media player
  • Open Folder: Opens the download directory in file explorer
  • Download: Downloads server files to your local directory
  • Delete: Permanently deletes local files (with confirmation)
You can also right-click any file in the table to access a context menu with these actions (ManageMediaPanel.java:309-347).

Advanced Features

Custom yt-dlp Arguments

For advanced users, you can pass custom arguments directly to yt-dlp:
1

Enable advanced options

Click the Advanced ▼ button on the main panel. The button changes to Advanced ▲ and reveals a text area.
2

Add custom arguments

Enter any valid yt-dlp arguments, for example:
--format "bestvideo[height<=720]+bestaudio/best[height<=720]"
or
--playlist-start 1 --playlist-end 5
These arguments are parsed and added to the yt-dlp command (MainPanel.java:576-588).

Speed Limiting

To limit download speed:
1

Open Preferences

Go to Edit > Preferences from the menu bar.
2

Configure speed limiter

  1. Click the Limiter toggle button to enable it
  2. Use the slider or text field to set speed in KB/s (1-100000)
  3. The text field and slider are synchronized in real-time
  4. Click Save
When enabled, the --limit-rate argument is passed to yt-dlp (MainPanel.java:559-562):
if (limiterEnabled) {
    command.add("--limit-rate");
    command.add(speedLimitKBps + "K");
}

M3U Playlist Creation

For batch downloads (like playlists), enable automatic M3U file generation:
1

Enable M3U creation

  1. Go to Edit > Preferences
  2. Check Create m3u for playlists
  3. Click Save
2

Download a playlist

When you download a playlist, MegaDownloader automatically creates a playlist.m3u file containing all downloaded items.The M3U creator intelligently filters files based on download mode (MainPanel.java:263-323):
  • Audio mode: Only includes .mp3, .m4a, .opus, .wav, .flac, .aac
  • Video mode: Only includes .mp4, .webm, .mkv, .avi, .flv, .mov

Keyboard Shortcuts

MegaDownloader supports several keyboard shortcuts for faster navigation:
  • Enter (on login screen): Submit login form
  • Escape: Exit the application or return to previous panel
  • Double-click (in Media Manager): Play selected file

Filtering and Searching Media

In the Manage Media panel:
1

Filter by type

Use the dropdown at the top-right to filter:
  • All files: Shows everything
  • Video: Only video files (.mp4, .webm, .mkv, etc.)
  • Audio: Only audio files (.mp3, .m4a, .opus, etc.)
2

Search by filename

Type in the search field to filter files in real-time by name. The filter is case-insensitive and searches as you type (ManageMediaPanel.java:284-307).
3

Sort columns

Click any column header to sort the table:
  • File Name
  • Type (Video/Audio)
  • Size
  • Date Modified
  • Source (Local/Server/Both)

Troubleshooting

If you encounter issues while using MegaDownloader:Download fails immediately:
  • Verify the yt-dlp path in Preferences
  • Check that the video URL is valid and accessible
  • Ensure you have write permissions to the download directory
Audio extraction fails:
  • Confirm FFmpeg is installed and located in the yt-dlp directory
  • Add ffmpegPath to config.txt if FFmpeg is elsewhere
  • Check console output for detailed FFmpeg errors
Progress bar doesn’t update:
  • This is normal for very small files
  • yt-dlp may not output progress for certain formats
  • The download is still running in the background
Can’t play downloaded files:
  • Ensure you have a default media player installed
  • Check that the file actually exists in the download directory
  • Try opening the file manually from your file explorer

Next Steps

Now that you’ve mastered the basics:
  • Explore the User Guide for detailed information on all capabilities
  • Learn about Configuration options to customize your experience
  • Check the API Reference if you’re interested in extending the application
MegaDownloader automatically saves your login session when “Remember me” is checked. On next launch, it will attempt auto-login using your saved token (LoginForm.java:265-279).

Build docs developers (and LLMs) love