Ga verder naar de inhoud

Archiving YouTube with Tartube

As part of the project Best practices for archiving social media in Flanders and Brussels, various tools were tested to archive different social media platforms. This guide describes the tool Tartube, a graphical user interface for archiving YouTube videos. The code of websites and tools changes constantly. Therefore, it is possible that at some point the tool will no longer function.

Tartube is an open-source graphical user interface built upon the code of youtube-dl. The tool is compatible and works on Windows, Linux, and macOS. With Tartube, it’s possible to archive YouTube videos based on the URL of specific videos, YouTube channels, playlists, and live streams.

Installation

For Windows and Linux there are official executables; Tartube for macOS needs to be installed manually via the command line.

Windows

Go to the website of Tartube, download and install the 64bit installer.

macOS

The following instructions differ depending on the type of Mac computer you have, based on the processor it contains. First find out which processor is in your computer. Intel or ARM (Apple M1).

Mac Computer with ARM processor (Apple M1)

Follow the instructions below to install Tartube on a Mac computer with an ARM Chip, also known as Apple M1. The instructions come from the Tartube Github repository and are translated and reproduced as of 07/09/2023. If more than 6 months have passed, it’s best to consult the Github repository for up-to-date instructions and email us if updates are needed.

Start! Execute the following instructions in the Terminal:

brew install cairo pkg-config python

  • Install Gtk 3:
pip3 install pycairo

install gobject-introspection gtk+3

  • Install the Python Requests module:

pip install requests

  • Install youtube-dl or yt-dlp:

pip install youtube-dl

pip install yt-dlp

  • Install the theme for the icons in Tartube:

brew install adwaita-icon-theme

brew install ffmpeg

  • Install Tartube:
pip3 install tartube

Mac computer with Intel processor

These instructions are for Mac computers with an Intel processor. The instructions are based on the documentation of Tartube, translated and reproduced as of 07/09/2023 to update this guide. If more than 6 months have passed, it’s best to consult the Github repository for up-to-date instructions and email us if updates are needed.

Execute the following instructions in the Terminal:

:brew install pkg-config

:brew install cairo

:brew install python

  • Install Gtk 3:

pip3 install pycairo
brew install gobject-introspection
python3 -m pip install PyGObject
brew install gtk+3

  • Install the Python Requests module:

pip install requests

  • Install youtube-dl or yt-dlp:

pip install youtube-dl

pip install yt-dlp

  • Install the theme for the icons in Tartube:

brew install adwaita-icon-theme

brew install ffmpeg

  • Install Tartube:
pip3 install tartube

pip3 install PyGObject

Ready!

Problems? Try the troubleshooting tips in the Tartube documentation

Linux

For Linux platforms, there are several options.

There are also some DEB / RPM packages marked as STRICT. In these packages updates for youtube-dl have been disabled from Tartube.

Debian

For distributions based on Debian, such as Ubuntu, Linux Mint and BSD, a .deb package is available.

  • Go to the Tartube GitHub releases page and download the python3-tartube_x.x.x.deb release to a logical location, for example /home/yourusername/Documents/tools/
  • Right-click on the python3-tartube_x.x.x.deb file and select Install Package.

: Or install the package with the following command dpkg -i ~/Documents/tools/python3-tartube_x.x.x.deb (replace the filename "python3-tartube_x.x.x.deb" with the actual filename)

  • Install FFmpeg if it is not already installed using the command sudo apt install ffmpeg.
  • Tartube requires an installation of youtube-dl. If youtube-dl is not yet installed:
    • Start Tartube
    • Click on Operations and select Update youtube-dl.

RHEL

Linux distributions based on RHEL such as Fedora can use the RPM package.

  • Go to Tartube Downloads and download the Tartube installation file for RHEL-based distributions.

  • Download the file to the Downloads folder, and execute the following command to install Tartube: sudo rpm –i tartube-2.3.110.rpm.

Youtube-dl, ffmpeg and pip must be installed. Youtube-dl is needed to download videos from YouTube; FFmpeg is required for post-processing. Pip is needed to install youtube-dl.

Install these with the following commands in a new terminal window.

Arch

Distributions based on Arch, such as Manjaro, can use the semi-official AUR package.

Open a new terminal window and execute the following commands:

Installation of FFmpeg is recommended

  • install FFmpeg with the following command: sudo pacman -S ffmpeg

More

Go to the Tartube website for more distributions and installation procedures, such as Gentoo and no-root via PyPI.

Configuring Tartube

First Start

Start Tartube and select a folder where the videos that are archived via Tartube will be saved.

Select a downloader, yt-dlp is recommended by tartube.

Click the "Install and update downloader" button to update or install the yt-dlp version.

This may take some time:

If the update is complete, click "Next".

Click on the button "Install FFmpeg" to ensure that videos can be converted.

If the installation fails, click the "Install FFmpeg" button again.

If everything is okay, FFmpeg should now be installed. Click "Next" to complete the setup.

Click "Ok" to start Tartube.

The handy thing about Tartube is that you can choose all the settings in advance in a graphical user interface instead of configuration files as with youtube-dl to achieve the same and that all videos to be archived in the future are subject to those settings.

With Tartube open, select "Edit" and then, "General Download Options".

Files

With the "General Download Options" window open, navigate to the "Files" tab.

These options relate to the final filename of the archived video and associated files.

There are several possibilities, the preset combinations as shown in the image below.

Use the menus and the "add" buttons to create your own template for naming the archived videos.

The complete list of naming options can be consulted via the youtube-dl documentation.

For this guide, we have chosen the following template after consultation: %(upload_date)s-%(id)s.%(ext)s.

In the "Write/Move Files" tab, select all options under "File write options", normally that is already the case by default. The extra files (video miniatures/thumbnails, video description/description) are written to generic sub-folders ".data" and ".thumbs" in the download location, while the metadata file is still written without a subfolder. Due to these quirks of the tool, it is currently not recommended to use these options as they result in an unstructured file storage, which may change in the future.

In the "Keep files" tab, select all options so that all files, such as the description, metadata file, description file and thumbnail are saved together with the video in the download folder.

Select Format

It is possible to create a preference list of video formats in Tartube. Tartube will go through this list and always try to download the format listed first; if the first format is not available, Tartube will download the next one in the list, and so on.

With Tartube open, click on "Edit" and then on "General download options...".

Move the desired formats to the right-hand box, then select "mkv" under "If a merge is required after post-processing, output to this format". If streams need to be merged, convert them into a single mkv container.

Select the "Advanced" tab and tick the following options. If this menu is not visible, click the "Show advanced download options" button in the "Files" menu.

"From the preferred list, download the first format that's available for all videos" ensures that Tartube will look for the first available format for each video being downloaded. If it is not available, Tartube will try the next format in the queue. This setting applies to all videos.

The option "Prefer free video formats, unless one is specified above" under "Other format options" is optional. In short, this option ensures that open-source video formats are preferred. For example, if both a webm and an mp4 stream are available, the webm stream will be downloaded.

Only if the bitrate of the webm stream is higher than the mp4 stream; if not, and the webm stream has a lower bitrate, the mp4 stream will be downloaded.

Post-processing

In the "Post-processing" menu, select the following options.

The options ensure that when post-processing of the video streams is needed, MKV will always be chosen as the final format.

As well as embedding subtitles when necessary.

Subtitles

Open the subtitle settings via the "Subtitles" tab, and under the "Options" tab select the following options.

During testing of Tartube, some irregularities were discovered. Due to a bug in Tartube, the "Download subtitles for these languages" option will always download English subtitles. Other languages appear to be ignored for now.

If the aim is to download other subtitles, select the option "Download all available subtitles". This option will download all available subtitles.

Go to the "More options" tab.

Tick the option "During post-processing, merge subtitles file with video". Subtitles will then be added to the MKV container.

Usage

Using Tartube for individual videos, channels, playlists and live streams is the same.

Folders

Use the folder icon in the main window to add a folder, this will be created in the location that was chosen when Tartube was first started.

It’s possible to manage your file management completely via Tartube, creating subfolders and new standalone folders.

  • All Videos shows all videos that have been archived via Tartube

  • Bookmarks shows the videos you have bookmarked
  • Favourite Videos shows the videos you have marked as favourite
  • "Livestream" folder provides an overview of ongoing live streams, if the live streams have ended they will be removed from this folder and stored in the chosen folder.
  • Missing Videos shows all videos that have been downloaded but deleted by the uploader of the online source/YouTube channel
  • New Videos shows all videos that have been downloaded but not yet viewed.
  • Recent Videos shows all videos that were downloaded or checked the last time youtube-dl was used
  • Waiting Videos shows videos that still need to be watched, after which the videos are removed from the folder but not from the database.
  • Temporary Videos contains temporary videos and is emptied every time Tartube is started.
  • Unsorted Videos is the folder where other videos can be stored that don't belong anywhere else.

Creating a new folder

Click on the folder icon to start and follow the instructions in the screenshot below

The option to create the new folder as a subfolder of an existing folder is under the option (Optional) Add this folder inside another folder.

Downloading Videos

Tartube can download individual videos, YouTube channels, playlists and live streams based on the URL.

Downloading live streams is only complete when the live stream ends. Then the file is finally written and saved to the system.

Archiving a YouTube Video

Click on the folder where the video should be downloaded and click the camera button top left, paste the URL of the video, playlist or channel into the Tartube dialog box.

Then press the download button at the top to start the download

Or use the "Download all" button at the bottom of the folder list.

Archiving a YouTube Channel

Go to the YouTube channel that needs to be archived and copy the URL. For example, the YouTube channel "Computerphile" fzy as URL "https://www.youtube.com/user/Computerphile" has

  1. Click on the "Add a new channel" button top left.
  2. Enter the name of the channel
  3. Paste the YouTube channel URL
  4. Select a folder where the videos should be downloaded, a new folder will be created by default with the name of the channel.
  5. Click "Ok"

Then press the download button at the top to start the download

Archiving a Live Stream

Adding live streams works the same as individual videos.

Click on the folder where the video should be downloaded and click the camera button top left, paste the URL of the video, YouTube channel or playlist into the Tartube dialog box.

Live streams that have not yet started can be added, Tartube checks every few minutes whether the live stream has already started and starts downloading if this is the case.

  • Live streams that are still running have a green background, if the live stream has ended it changes to a standard grey background.
  • A livestream that has not yet started has a red background.
  • The "premiere" and "debut" part of a YouTube livestream is displayed in cyan when the livestream is playing and orange for the "Premiere" to begin.

The final file is only "ready" when the live stream has ended, aborting the download results in a .mp4.part file, an incomplete file.

Scheduling

It’s useful to have Tartube archive new YouTube videos in the background.

Go to "Edit" and then to "System preferences", give the scheduling settings a name and click on "Add" a next window will open to adjust the options of the schedule.

Adjust the options as desired, under the "Media" it is possible to apply the settings only to a specific channel.

Select the channel in the menu at the bottom that should be subject to the scheduled download settings and then click on "Add".

Licentie

  • CC-BY-SA

Collectie

Expertisedomein

Verwante software

Deze pagina is laatst aangepast op 03 oktober 2025

Deze pagina aanvullen of corrigeren?

Foutje gespot? Of heb je aanvullende inzichten? Deel je ervaringen via onderstaande knop.