aajanki / yle-dl

Download videos from Yle servers
https://aajanki.github.io/yle-dl/index-en.html
GNU General Public License v3.0
309 stars 51 forks source link

Never-ending Moomin Winter #230

Closed ExTechOp closed 4 years ago

ExTechOp commented 4 years ago

When trying to download episode 13 of Muumilaakso, "Taikatalvi", the software somehow never finishes, it just sits there saying "Checking if the stream is complete...". I interrupted after ten minutes.

% yle-dl -o Muumilaakso-S01E13-Taikatalvi.mp4 https://areena.yle.fi/1-4529479 |& tee miten.meni 
yle-dl 20191231: Download media files from Yle Areena and Elävä Arkisto
Copyright (C) 2009-2019 Antti Ajanki <antti.ajanki@iki.fi>, license: GPLv3

Output file: Muumilaakso-S01E13-Taikatalvi.mp4
[webvtt @ 0x55e629e9f0c0] Dropping 2 duplicated subtitle events
frame=33000 fps=443 q=-1.0 Lsize=  409244kB time=00:22:00.51 bitrate=2538.8kbits/s speed=17.7x    
Stream saved to Muumilaakso-S01E13-Taikatalvi.mp4
Muumilaakso-S01E13-Taikatalvi.mp4 already exists.
Checking if the stream is complete...
^C

% ls -l Muumilaakso-S01E13-Taikatalvi.mp4 
-rw-rw-r-- 1 users users 419065866 Feb 15 22:02 Muumilaakso-S01E13-Taikatalvi.mp4
aajanki commented 4 years ago

First of all, you probably meat to use the URL https://areena.yle.fi/1-4265515 which is the address for episode 13. The URL in your example points to the series page containing all the Muumit episodes. Yle-dl tries to download each episode one after one. The combination of an series page URL and a named output file doesn't do anything very sensible at the moment.

"Checking if the stream is complete" means that, when yle-dl starts downloading the second Muumit episode, it notices that there already exists a file called "Muumilaakso-S01E13-Taikatalvi.mp4" and tries to verify if it has been completely downloaded. This is slow because ffmpeg has to scan through the whole file. It shouldn't take ten minutes, however. Rather less than a minute.

Use the --no-overwrite switch if you want to skip the slow check. It avoids checking the content of the file and assumes that any existing file has been successfully downloaded.

ExTechOp commented 4 years ago

Sigh. I keep making these simple errors. Maybe I'm suffering from Dunning-Kruger.