Skip to content

Command Line Application to Emulate YouTube's Compression.

License

Notifications You must be signed in to change notification settings

DanielLMcGuire/YT-Compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YouTube Compression Tool

Check out the glitchy crap version using ffmpeg dlls (It's actually kind of cool!)

Overview

The YouTube Compression Tool is a command-line application designed to compress video files using FFmpeg in an extremely similar way to the YouTube Compression Algorithm.

What the YouTube Algorithm does: (Based on Research)

  • Video codec conversion based on video resolution (H.264 for 1080p and below; VP9 for higher resolutions).
  • Audio codec conversion based on audio bitrate.
  • Two-pass encoding for improved video and audio quality and compression.

Prerequisites

  • Windows Users: You need winget installed. If it's not available, the tool will prompt to download and install it automatically.
  • Linux Users: Ensure that ffmpeg and ffprobe are installed on your system.

Build

  1. Clone the repository:

    git clone --recursive https://github.com/DanielLMcGuire/YT-Compression.git
    cd YT-Compression
  2. Build the project:

    Use the provided Makefile to compile the code.

    make windows 
    make linux
    
    make all
    

Usage

To use the tool, run the compiled executable with the path to your video file as an argument.

cd bin
./YTCompression <Video.file>

How It Works

  1. Codec Determination: Based on the video resolution, the appropriate codec is selected:
    • libx264 for resolutions up to 1080p.
    • libvpx-vp9 for resolutions above 1080p.
  2. Two-Pass Encoding: The tool performs a two-pass encoding process for better quality and compression:
  3. Windows Installation: If winget is not found, the tool will prompt to download and install it, then use it to install FFmpeg.

Troubleshooting

  • Command Failed Errors: If you encounter issues with commands failing, ensure FFmpeg is properly installed and accessible from your system's PATH.
  • FFmpeg Not Found on Windows: If winget fails to install FFmpeg, you can manually download and install FFmpeg from FFmpeg's official website.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.

Contact

For any inquiries or support, please open an issue in the repository or contact [email protected].

Legal Notice

This project is an independent tool for video compression and is not affiliated with, endorsed by, or sponsored by YouTube, Google, or any of their subsidiaries. The use of the term "YouTube" in the project's name or description is solely for descriptive purposes and does not imply any official connection or partnership with YouTube or Google. All trademarks, logos, and other identifiers associated with YouTube and Google are the property of their respective owners.