Skip to main content

Download videos from Yle servers

Build status PyPI version

Copyright (C) 2010-2026 Antti Ajanki, antti.ajanki@iki.fi

License: GPL v3 or later

Homepage: https://aajanki.github.io/yle-dl/index-en.html

Source code: https://github.com/aajanki/yle-dl

yle-dl is a tool for downloading media files from the video streaming services of the Finnish national broadcasting company Yle: Yle Areena, Elävä Arkisto and Yle news.

Installation

Below are general installation instructions. See a separate page for specialized installation instructions for Debian, Ubuntu, Mac OS X, Windows and Android.

1. Install the dependencies

  • Python 3.9+
  • ffmpeg (subtitles fully supported only on ffmpeg 4.1 or later)
  • wget (required for podcasts)

2. Install yle-dl

  1. Install pipx
  2. Install yle-dl: pipx install yle-dl

Installing yle-dl with all optional dependencies (pipx install yle-dl[extra]) enables storing video metadata as extended file attributes and automatically detecting filesystems that require restricted character sets.

Usage

yle-dl [options] URL

or

yle-dl [options] -i filename

where URL is the address of the Areena or Elävä arkisto web page where you would normally watch the video in a browser.

yle-dl options:

  • -o filename Save stream to the named file
  • -i filename Read input URLs to process from the named file, one URL per line
  • --latestepisode Download the latest episodes
  • --showurl Print the URL of the stream, don't download
  • --showtitle Print stream title, don't download
  • --showmetadata Print stream metadata as JSON
  • --restrict-filename-no-specials Create Windows-compatible filenames
  • --sublang lang Disable subtitles if lang is "none"
  • --subtitles-only Download only subtitle file, skip video and audio
  • --resolution res Maximum vertical resolution in pixels
  • --maxbitrate br Maximum bitrate stream to download, integer in kB/s or "best" or "worst". Not all streams support limited bitrates.
  • --postprocess cmd Execute a command cmd after a successful download. The command is called with the downloaded video file as the first parameter and subtitle files (if any) as the following parameters.
  • --proxy uri Proxy to use. Examples: --proxy localhost:8118, --proxy socks5h://localhost:1080
  • --destdir dir Save files to dir
  • --pipe Dump stream to stdout for piping to media player. E.g. yle-dl --pipe URL | vlc -.
  • -V, --verbose Show verbose debug output

Type yle-dl --help to see the full list of options.

Config file

Arguments that start with '--' can also be set in a config file. The default config file is ~/.yledl.conf (or alternatively ~/.config/yledl.conf) or one can be specified via --config. See yledl.conf.sample for an example configuration.

Config file syntax allows: key=value, flag=true. If an arg is specified in more than one place, then command line values override config file values which override defaults.

Contributed packages for various distros

A list of contributed packages

Examples

Yle Areena

Save an Areena stream to a file with an automatically generated name:

yle-dl https://areena.yle.fi/1-787136

Save a stream to a file called video.mkv:

yle-dl https://areena.yle.fi/1-787136 -o video.mkv

Playing in mpv (or in vlc or in any other video player) without downloading first:

yle-dl --pipe https://areena.yle.fi/1-787136 | mpv --slang=fi -

Executing a script to postprocess a downloaded video (see the example postprocessing script at scripts/muxmp4):

yle-dl --postprocess scripts/muxmp4 https://areena.yle.fi/1-787136

Areena live TV broadcasts

yle-dl tv1

yle-dl tv2

yle-dl teema

Record the broadcast shown an hour (3600 seconds) ago:

yle-dl --startposition -3600 tv1

Elävä Arkisto

yle-dl https://yle.fi/aihe/artikkeli/2010/10/28/studio-julmahuvi-roudasta-rospuuttoon

Embedded videos on the yle.fi news articles

yle-dl https://yle.fi/a/74-20036911

Development

Install yle-dl in editable mode in a virtual environment:

python3 -m venv venv
source venv/bin/activate
pip install --editable .[extra] --group test

Install the pre-commit hooks for linting and type checking:

pipx install pre-commit

pre-commit install

Unit and integration tests

python3 -m pytest

Some tests succeed only when run on a Finnish IP address because some Areena streams are available only in Finland. By default, these tests are skipped. To run all tests, include the "--geoblocked" flag:

python3 -m pytest --geoblocked

Running only a single test file:

python3 -m pytest tests/integration/test_areena_radio_it.py

Creating a new release

Release instructions

Bug reports and feature suggestions

If you encounter a bug or have an idea for a new feature, please post it to the GitHub issue tracker. You can write in English or in Finnish.

Known problems

Problem: Subtitles are visible only for the first five minutes.

Solution: Update your ffmpeg to version 4.1 or later.

Problem: Subtitles are missing on live stream

This is a known problem. Currently, there are no fixes.

Problem: Some subtitle lines appear twice

Solution: This is a bug in recent ffmpeg versions. Downgrade ffmpeg. For example, version 4.1 generates non-duplicated subtitles.

Problem: I get warnings about unsupported subtitles and dropping subtitles

Downloading always produces certain warnings messages that are harmless and can be ignored. Subtitles should get downloaded correctly in most cases despite the warnings.

At least messages similar to the following are safe to ignore:

  • mime type is not rfc8216 compliant
  • Can't support the subtitle(uri: ...)
  • Dropping 114 duplicated subtitle events
  • Unsupported codec with id 98313 for input stream 5

Problem: On macOS, downloads fail with "Unable to negotiate TLS/SSL session" or "Bad file descriptor"

Homebrew's standard ffmpeg uses macOS SecureTransport for TLS, which is incompatible with Yle's Akamai CDN. Install ffmpeg-full (which uses GnuTLS) instead:

brew install ffmpeg-full

Then add to ~/.yledl.conf:

ffmpeg=/opt/homebrew/opt/ffmpeg-full/bin/ffmpeg
ffprobe=/opt/homebrew/opt/ffmpeg-full/bin/ffprobe

Problem: On macOS, downloading fails due to SSL errors

You probably have urllib3 v2.x and an incompatible SSL library installed.

Install a more recent Python that has been built with OpenSSL 1.1.1 or more recent.

Alternatively, downgrade your urllib3 to v1.x by running the following command in yle-dl's Python environment:

pip install urllib3<2

Sample errors that indicate this problem: "urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3" or "ssl.SSLEOFError: [SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:2426)"

Problem: I installed yle-dl but get an error message "command not found" when I try to run it

The installation location is not on shell's search path. Use the full path to run yle-dl: ~/.local/bin/yle-dl

Better yet, append the search path permanently by editing shell's config file. For example, on bash do the following:

echo "export PATH=\"\$HOME/.local/bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc

Metadata

Release files for yle-dl 20260624

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

Source distribution (sdist)

Source distribution for yle-dl 20260624
File Size Uploaded
yle_dl-20260624.tar.gz 86.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yle-dl 20260624
File Interpreter ABI Platform
yle_dl-20260624-py3-none-any.whl Python 3 none any Details

Total release size: 161.7 kB

Release files / yle_dl-20260624.tar.gz

Download URL yle_dl-20260624.tar.gz
Size 86.6 kB
Tags Source
SHA-256 checksum
How to use checksums
df7f5e985d15b0770068f729c29be30232358d4ea136ab395e63eb9aa77abfc7
BLAKE2b-256 checksum
How to use checksums
d1d73702ab9c244aa3eb07bebd5abf3af31fd720b55c346324b4b9b25251f1ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / yle_dl-20260624-py3-none-any.whl

Download URL yle_dl-20260624-py3-none-any.whl
Size 75.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2eb44d39a786f5845938d656ff824d33664277715bd03ab7efa03bd4320b0e6
BLAKE2b-256 checksum
How to use checksums
6fedb5cedb9c2b604386c4cee72c42d2068e366d257f8f3dbadc314459fde3b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

20260624 This release

2 release files

2.37

2 release files

2.36

2 release files

2.35

2 release files

2.34

2 release files

2.33

2 release files

2.32

2 release files

2.31

2 release files

2.30

2 release files

2.29

2 release files

2.28

2 release files

2.27

2 release files

2.26

2 release files

2.25

2 release files

2.24

2 release files

2.23

2 release files

2.22

2 release files

2.21

2 release files

2.20

2 release files

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