Aller au contenu principal

Installation & Setup Guide

Overview

This guide provides step-by-step instructions for installing and setting up both components of the YouTube download toolkit: the Chrome extension for collecting video links and the Java application for downloading them.

Prerequisites

Before installing the toolkit, ensure you have the following software installed on your system:

Required Software

  1. Google Chrome Browser

  2. Java Runtime Environment (JRE) 11 or higher

  3. youtube-dl Command-Line Tool

  4. ffmpeg Media Processing Tool

System Requirements

  • Operating System: Windows 10/11, macOS 10.14+, or Linux
  • Disk Space: At least 1GB free space for downloads
  • Internet Connection: Required for downloading videos
  • RAM: Minimum 4GB recommended

Part 1: Chrome Extension Installation

Since this extension is not published on the Chrome Web Store, you'll need to install it in developer mode:

  1. Download the Extension

    git clone https://github.com/your-repo/youtube-download-tools.git
    cd youtube-download-tools/YoutubeCopyLinkChromeExtension
  2. Open Chrome Extensions Page

    • Open Google Chrome
    • Navigate to chrome://extensions/
    • Or go to Menu → More Tools → Extensions
  3. Enable Developer Mode

    • Toggle the "Developer mode" switch in the top-right corner
    • This enables the ability to load unpacked extensions
  4. Load the Extension

    • Click "Load unpacked" button
    • Navigate to the YoutubeCopyLinkChromeExtension folder
    • Select the folder and click "Select Folder"
  5. Verify Installation

    • The extension should appear in your extensions list
    • You should see "Youtube Links Copy" with version 1.1
    • Pin the extension to your toolbar for easy access

Method 2: Manual File Installation

If you have the extension files without Git:

  1. Extract Files

    • Download and extract the extension files to a folder
    • Ensure all files are in the same directory
  2. Follow Steps 2-5 from Method 1 above

Extension Permissions

The extension will request the following permissions:

  • activeTab: Access to the current YouTube tab
  • contextMenus: Add right-click menu options
  • storage: Save your preferences and collected links
  • unlimitedStorage: Store large lists of video links

Part 2: Java Application Setup

Download and Build

  1. Download the Application

    git clone https://github.com/your-repo/youtube-download-tools.git
    cd youtube-download-tools/YoutubeDownloader
  2. Build with Maven (if building from source)

    mvn clean install

    This creates target/YoutubeDownloader.jar

  3. Alternative: Use Pre-built JAR

    • If available, download the pre-built JAR file
    • Place it in your desired directory

Configuration Setup

  1. Create Working Directory

    mkdir youtube-downloads
    cd youtube-downloads
  2. Copy JAR File

    cp path/to/YoutubeDownloader.jar .
  3. First Run Configuration

    java -jar YoutubeDownloader.jar

    On first run, the application will:

    • Create a default config.properties file
    • Set up the default download directory
    • Display the configuration menu
  4. Configure Download Settings

    • Choose option 5 (Change Configuration Settings)
    • Set your preferred download directory
    • Customize file naming template if desired

Windows Batch File Setup

For easier execution on Windows, create a batch file:

  1. Create run.bat

    @echo off
    java -jar YoutubeDownloader.jar
    pause
  2. Make it Executable

    • Save the file in the same directory as the JAR
    • Double-click to run the application

Part 3: External Dependencies Setup

Installing youtube-dl

Windows

# Using pip (recommended)
pip install youtube-dl

# Or download executable
# Download youtube-dl.exe from https://youtube-dl.org/
# Place in PATH or same directory as JAR

macOS

# Using Homebrew
brew install youtube-dl

# Using pip
pip3 install youtube-dl

Linux

# Ubuntu/Debian
sudo apt install youtube-dl

# Or using pip
pip3 install youtube-dl

Installing ffmpeg

Windows

  1. Download from https://ffmpeg.org/download.html
  2. Extract to a folder (e.g., C:\ffmpeg)
  3. Add C:\ffmpeg\bin to your PATH environment variable

macOS

# Using Homebrew
brew install ffmpeg

Linux

# Ubuntu/Debian
sudo apt install ffmpeg

# CentOS/RHEL
sudo yum install ffmpeg

Verify Installation

Test that all dependencies are working:

# Test Java
java -version

# Test youtube-dl
youtube-dl --version

# Test ffmpeg
ffmpeg -version

# Test the application
java -jar YoutubeDownloader.jar

Part 4: Initial Configuration

Chrome Extension Setup

  1. Open the Extension Popup

    • Click the extension icon in your Chrome toolbar
    • You should see the "Youtube Links Copy" interface
  2. Configure Categories

    • In the "Params" text area, enter your desired categories:
    music
    tutorials
    entertainment
    education
    news
  3. Save Configuration

    • Click the "Save All" button
    • Your categories are now available in right-click menus

Java Application Configuration

  1. Set Download Directory

    Configuration Menu:
    1. View Configuration
    2. Change Configuration Value
    3. Save and Exit
    Enter your choice: 2
    Enter the key: destinationFolderName
    Enter the new value: C:\Users\YourName\Downloads\YouTube
  2. Configure File Naming

    Enter the key: downloadedFileName
    Enter the new value: %(channel)s-%(title)s-%(resolution)s.%(ext)s
  3. Set Default List File

    Enter the key: defaultListFile
    Enter the new value: my-videos.txt

Part 5: Verification and Testing

Test Chrome Extension

  1. Visit YouTube

  2. Test Right-Click Menu

    • Right-click on a video thumbnail
    • You should see your configured categories in the context menu
  3. Test Collection

    • Select a category from the context menu
    • Open the extension popup
    • Verify the video appears in the "List Links" area

Test Java Application

  1. Test Single Video Download

    • Run the Java application
    • Choose option 1 (One video MP4 format)
    • Enter a YouTube URL
    • Choose a resolution (e.g., 720)
  2. Test List Processing

    • Create a test file with the collected links from the extension
    • Choose option 4 (Download list from file)
    • Verify videos download to correct folders

Troubleshooting

Common Issues

Extension not appearing in context menu:

  • Refresh the YouTube page
  • Check that the extension is enabled
  • Verify you're right-clicking on video thumbnails, not other elements

Java application can't find youtube-dl:

  • Ensure youtube-dl is in your system PATH
  • Try placing youtube-dl.exe in the same directory as the JAR file

Downloads failing:

  • Check your internet connection
  • Verify youtube-dl is up to date: youtube-dl -U
  • Some videos may be region-restricted or private

Permission errors:

  • Ensure the download directory is writable
  • Run with administrator privileges if necessary

Getting Help

If you encounter issues:

  1. Check the console output for error messages
  2. Verify all dependencies are properly installed
  3. Test with a simple, public YouTube video first
  4. Check the project's issue tracker for known problems

Next Steps

Once everything is installed and configured:

  1. Read the Usage Guide for detailed workflow instructions

Your YouTube download toolkit is now ready to use!