Skip to main content

Mediakit

YouTube Download YouTube videos fast, directly from the command line

Latest version on PyPI Monthly downloads Number of contributors License

Features   |    Installation   |    How to use   |    API Reference   |    Development experiences


⚠️ Warning

This project is archived and no longer maintained. If you'd like alternatives to Mediakit, youtube-dl and yt-dlp are great options, including more features and a solid contributing community.


Mediakit is a command line tool to download videos from YouTube.

Downloading with Mediakit

Features

  • Quickly download YouTube videos with a single command on your terminal
  • Select specific download formats (video, audio and video-only) if you want to, with resolutions as high as 4K 😎

Installation

To install Mediakit, you need Python 3.6+ and pip already installed on your computer. Then, run:

pip install mediakit

How to use

You can download a video with Mediakit by running:

mediakit <video_url> [<output_path>]
  • video_url: the URL of the video to download (e.g. https://www.youtube.com/watch?v=...).

    As URL's may have special characters, it is recommended that you wrap the URL in double quotes ("") to ensure that it will be recognized properly.

  • output_path: optional destination to where to save the downloads. If not provided, this will default to the current directory.

    You can also provide a custom name for the downloaded file. To do that, include it in the output path (e.g. path/to/folder/video.mp4).

After running this command, an interactive CLI will guide you through the download process.

Examples of use:

  • Download to the current directory

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI"
    
  • Download to ~/Videos

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" ~/Videos
    
  • Download to ~/Videos with name song.mp4

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" ~/Videos/song.mp4
    

Selecting specific download formats

By default, Mediakit will download the specified video with the highest available resolution. However, you can select specific download formats with the flag --formats (or its shorthand -f), followed by one or more desired formats:

mediakit <video_url> [<output_path>] [-f | --formats]

You can also download as audio (mp3) or as video only (without audio) by using the format options audio and videoonly, respectively. If no resolution is provided with these options, Mediakit will download the media with highest quality, although you can select a specific resolution by adding it right after the option used (e.g. -f audio 128kbps). Check the examples bellow for more use details.

If a resolution is not available for the video, the download will fall back to the closest available resolution lower than the one specified.

Examples of use:

  • Download with resolution of 1080p

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f 1080p
    
  • Download with resolution of 4K (2160p)

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f 4K
    
  • Download multiple resolutions at once (each resolution will be downloaded in a different file)

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f 1080p 720p
    
  • Download with the highest resolution available (same result as not using the flag -f)

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f max
    
  • Download as audio (mp3)

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f audio
    
  • Download multiple formats and resolutions at once (each resolution will be downloaded in a different file)

    mediakit "https://www.youtube.com/watch?v=m7AFEULF9LI" -f 1080p audio videoonly 720p
    # download video with 1080p, audio with highest definition available and video-only (without audio) with 720p
    

Downloading multiple videos

Downloading from playlists

By providing a playlist URL, Mediakit will automatically download all videos in it.

mediakit <playlist_url> [<output_path>]

Make sure the playlist is marked as public, otherwise Mediakit won't be able to access it!

You can also use other options with this command, such as specify which formats and definitions you want your downloads to be.

Using a batch file

With the option -b (or its longhand --batch), you can download multiple videos sequentially by providing a batch file (a text file containing one or more video URL's, each one in a separate line):

mediakit [-b | --batch] <batch_file>

By running this, Mediakit will read all URL's in the provided file and download them sequentially.

You can also use other options along with --batch, similarly to downloading from playlists.

Examples of use:

Using a batch file called urls.txt as an example:

# contents of `urls.txt`
https://www.youtube.com/watch?v=m7AFEULF9LI
https://www.youtube.com/watch?v=tpWLeUt_7Cc
https://www.youtube.com/watch?v=Fau8gKw33ME
  • Download URL's in urls.txt with the highest available resolution

    mediakit -b urls.txt
    
  • Download URL's in urls.txt as audio (mp3)

    mediakit -b urls.txt -f audio
    

API Reference

Mediakit currently supports the following command options:

Option Description Example
-h, --help Show help mediakit -h
-v, --version Show the currently installed version mediakit -v
-y, --yes Answer "yes" to all questions beforehand mediakit https://... -y
-b <batch_file>,
--batch <batch_file>
Download videos from URL's stored in a batch file mediakit -b urls.txt
-nc, --no-colors Disable the colors of the interface mediakit https://... -nc
-f <formats>,
--formats <formats>
Specify which formats you want to download mediakit https://... -f audio
-p <maximum downloads in parallel>,
--formats <maximum downloads in parallel>
Set a limit to downloads in parallel mediakit https://... -f audio

Development experiences

All experiences and learning acquired during the development of Mediakit are detailed in Development experiences and learning. Check it out if you want to know more about what were the motivations to build this project, how it was developed and what were the main challenges and experiences.


Made by Diego Aquino 😎. Connect with me!

Metadata

Release files for mediakit 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mediakit 0.7.2
File Size Uploaded Provenance Actions
mediakit-0.7.2.tar.gz 25.9 kB Without provenance Details for mediakit-0.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mediakit 0.7.2
File Interpreter ABI Platform Actions
mediakit-0.7.2-py3-none-any.whl Python 3 none any Details for mediakit-0.7.2-py3-none-any.whl

Total release size: 67.4 kB

Release files / mediakit-0.7.2.tar.gz

Download URL mediakit-0.7.2.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3f263786bf21140d4b195788b174bc59e57ded40423c10dae433595707a5a113
BLAKE2b-256 checksum
How to use checksums
b92f8e30072cce9e695c75904fd156063a0b4abbbf1b707f854561ddc50bf86e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / mediakit-0.7.2-py3-none-any.whl

Download URL mediakit-0.7.2-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b19901ce2763fdb97db843798ee4459d219a41ab9e58f1c53cf43dc67c1c876d
BLAKE2b-256 checksum
How to use checksums
f916eadae54113869681f825902e51042c84b0f82b43775e0f26fe4ae97af0a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for mediakit 0.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page