Metadata-Version: 2.4
Name: youtube-downloader-cli
Version: 0.2.0
Summary: CLI tool for download from YouTube
Project-URL: Home, https://github.com/duong-dt/youtube-downloader
Author-email: duong <dotungduong2@gmail.com>
License: This is free and unencumbered software released into the public domain.
        
        Anyone is free to copy, modify, publish, use, compile, sell, or
        distribute this software, either in source code form or as a compiled
        binary, for any purpose, commercial or non-commercial, and by any
        means.
        
        In jurisdictions that recognize copyright laws, the author or authors
        of this software dedicate any and all copyright interest in the
        software to the public domain. We make this dedication for the benefit
        of the public at large and to the detriment of our heirs and
        successors. We intend this dedication to be an overt act of
        relinquishment in perpetuity of all present and future rights to this
        software under copyright law.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
        MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
        IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
        OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
        ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
        OTHER DEALINGS IN THE SOFTWARE.
        
        For more information, please refer to <http://unlicense.org/>
License-File: LICENSE
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: The Unlicense (Unlicense)
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.10
Requires-Dist: click>=8.1.8
Requires-Dist: pyperclip==1.9.0
Requires-Dist: pytubefix>=8.12
Requires-Dist: questionary==2.1.0
Requires-Dist: rich>=13.9
Provides-Extra: dev
Requires-Dist: ruff>=0.9.2; extra == 'dev'
Description-Content-Type: text/markdown

# YouTube Downloader

1. YouTube Video download
   * From a video or from a playlist
   * Download caption option available
   * Selectable resolution

2. YouTube Audio download
   * From a video or from a playlist


# Installation & Upgrade
1. To install
* Using `pip`
   ```console
   pip install youtube-downloader-cli
   ```

* Using `uv`
   ```console
   uv tool install youtube-downloader-cli
   ```

* Using `uvx` to use this tool directly without install 
  ```console
  uvx youtube-downloader-cli
  ```

2. To upgrade
* Using `pip`
  ```console
  pip install --upgrade youtube-downloader-cli
  ```
* Using `uv`
  ```console
  uv tool install --upgrade --reinstall youtube-downloader-cli
  ```

* Using `uvx`
  ```console
  uvx youtube-downloader-cli@latest
  ```

# CLI Application

#### Step 1. Enter YouTube video URL (auto-detect from clipboard)

#### Step 2. Choose options

Available options:

    1. Download audio only 
    2. Download video 
    3. Download video with caption 
    4. Download audios from playlist
    5. Download videos from playlist

#### Step 3. Choose a directory to save file(s)

#### Step 4. Choose preferred resolution for video downloading

If option 2, 3, or 5 is chosen in ***Step 2***, please select a preferred resolution for video downloading.

Available options:

    SD - 480p
    HD - 720p
    FullHD - 1080p
    QHD - 1440p
    4K - 2160p
    best

Video with highest resolution, but not higher than user's choice (unless '**best**' is chosen), will be downloaded.

#### Step 5. Choose captions to download

If option 3 is chosen in ***Step 2***, please select which caption(s) to be downloaded. User will only be prompted if more than one caption is available for selected video.

---

Note: If PyTubeFix failed to connect to YouTube, it may need to be upgraded to the newest version.

Using `pip`: `pip install --upgrade pytubefix`.

Or using `uv`: `uv install --upgrade --reinstall youtube-downloader-cli`. 

# Dependencies
1. For CLI Application
   * pyperclip
   * pytubefix
   * questionary
   * rich

2. Of `pytubefix`
   
   NodeJS is used for POTOKEN generation by `pytubefix`. If NodeJS is not available, POTOKEN will be skipped, may result in YouTube denying `pytubefix`'s requests.

3. FFMPEG
   
   Progressive stream (both audio & video in one file) in YouTube has lower resolution. If `ffmpeg` is available, high resolution video & audio will be downloaded separately, then merges using `ffmpeg`.

   If `ffmpeg` is not available in $PATH, progressive stream will be downloaded.
