Skip to main content

Make ZIM file from a Youtube channel, user or playlist(s)

Project description


CodeFactor License: GPL v3 PyPI version

youtube2zim allows you to create a ZIM file from a Youtube Channel/Username or one-or-more Playlists.

It downloads the video (webm or mp4 extension – optionnaly recompress them in lower-quality, smaller size), the thumbnails, the subtitles and the authors' profile pictures ; then, it create a static HTML files folder of it before creating a ZIM off of it.


  • ffmpeg for video transcoding (only used with --lower-quality).
  • zimwriterfs for ZIM file packaging. Use --no-zim to skip this step.
  • curl and unzip to install Javascript dependencies. See if you want to do it manually.


Here comes a few different ways to install youtube2zim.


youtube2zim is a Python3 software. If you are not using the Docker image, you are advised to use it in a virtualenv to avoid installing software dependences on your system.

virtualenv -p python3 ./ # Create virtualenv
source bin/activate      # Activate the virtualenv
pip3 install youtube2zim # Install dependencies
youtube2zim --help       # Display youtube2zim help

At the end, call deactivate to quit the virtual environment.

See requirements.txt for the list of python dependencies.


docker run -v my_dir:/output openzim/youtube youtube2zim --help

Globally (on GNU/Linux)

sudo pip3 install -U youtube2zim


youtube2zim uses Youtube API v3 to fetch data from Youtube. You thus need to provide an API_KEY to use the scraper.

To get an API:

  1. Connect to Google Developers Console
  2. Create a new Project then Select it.
  3. When asked, choose Create Credentials and select the API Key type. (Credentials page)
youtube2zim --api-key "<your-api-key>" --type user --id "Vsauce"


  • Your API_KEY is subject to usage quotas (10,000 requests/day) so use --only_test_branding when adjusting parameters and branding to not waste your quota.
  • On macOS, the locale setting is buggy. You need to launch it with LANGUAGE environment variable (as ISO-639-1) for the translations to work.
LANGUAGE=fr youtube2zim --language fra


Before contributing be sure to check out the guidelines.


GPLv3 or later, see LICENSE for more details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for youtube2zim, version 2.1.3
Filename, size File type Python version Upload date Hashes
Filename, size youtube2zim-2.1.3-py3-none-any.whl (3.6 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size youtube2zim-2.1.3.tar.gz (3.5 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page