Package: yle-dl
Download videos from Yle serversCopyright (C) 2010-2024 Antti Ajanki,antti.ajanki@iki.fiLicense: GPL v3 or laterHomepage:https://aajanki.github.io/yle-dl/index-en.htmlSource code:https://github.com/aajanki/yle-dlyle-dl is a tool for downloading media files from the video streaming
services of the Finnish national broadcasting company Yle:Yle
Areena,Elävä ArkistoandYle news.InstallationBelow are general installation instructions. See aseparate
pagefor specialized installation
instructions for Debian, Ubuntu, Mac OS X, Windows and Android.1. Install the dependenciesPython 3.7+ffmpeg (subtitles fully supported only on ffmpeg 4.1 or later)Optionally for few rare streams:wget2. Install yle-dlInstall pipxInstall yle-dl:pipx install yle-dlInstalling 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.Alternatively, installing the source distribution in the editable mode: Download the sources
and run the following in the source directory:pip3 install --user .Usageyle-dl [options] URLoryle-dl [options] -i filenamewhere 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 filenameSave stream to the named file-i filenameRead input URLs to process from the named file, one URL per line--latestepisodeDownload the latest episodes--showurlPrint the URL of the stream, don't download--showtitlePrint stream title, don't download--showmetadataPrint streammetadata as JSON--vfatCreate Windows-compatible filenames--sublang langDisable subtitles if lang is "none"--resolution resMaximum vertical resolution in pixels--maxbitrate brMaximum bitrate stream to download, integer in kB/s or "best" or "worst". Not all streams support limited bitrates.--postprocess cmdExecute 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 uriHTTP(S) proxy to use. Example:--proxy localhost:8118--destdir dirSave files to dir--pipeDump stream to stdout for piping to media player. E.g.yle-dl --pipe URL | vlc -.-V, --verboseShow verbose debug outputTypeyle-dl --helpto see the full list of options.To download through a SOCKS5 proxy, usetsocksor a similar wrapper.Using with libav instead of ffmpegyle-dl --ffmpeg avconv --ffprobe avprobe ...Config fileArguments 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. Seeyledl.conf.samplefor 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 distrosA list of contributed packagesIntegration testspytest-3Some 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:pytest-3 --geoblockedRunning only a single test file:pytest-3 tests/integration/test_areena_radio_it.pyExamplesYle AreenaSave an Areena stream to a file with an automatically generated name:yle-dl https://areena.yle.fi/1-787136Save a stream to a file called video.mkv:yle-dl https://areena.yle.fi/1-787136 -o video.mkvPlaying 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-787136Areena live TV broadcastsyle-dl https://areena.yle.fi/tv/suorat/yle-tv1

yle-dl https://areena.yle.fi/tv/suorat/yle-tv2

yle-dl https://areena.yle.fi/tv/suorat/yle-teema-femRecord the broadcast shown an hour (3600 seconds) ago:yle-dl --startposition -3600 https://areena.yle.fi/tv/suorat/yle-tv1Elävä Arkistoyle-dl https://yle.fi/aihe/artikkeli/2010/10/28/studio-julmahuvi-roudasta-rospuuttoonEmbedded videos on the yle.fi news articlesyle-dl https://yle.fi/a/74-20036911Creating a new releaseRelease instructionsKnown problemsProblem: 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 streamThis is a known problem. Currently there are no fixes.Problem: I get warnings about unsupported subtitles and dropping subtitlesDownloading produces a bunch of warnings such as "Can't support the
subtitle" and "Dropping 114 duplicated subtitle events".These warning messages are harmless and can be ignored. Subtitles
should get downloaded correctly in most cases despite the warnings.
The only exceptions are live streams.Problem: I installed yle-dl but get an error message "command not found" when I try to run itThe installation location is not on shell's search path. Use the full path to run yle-dl:~/.local/bin/yle-dlBetter 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