[youtube-dl] Download files from youtube.com or other video platforms

Why has the title of this thread been obfuscated? It's not like other references within have also been obfuscated.
 
Last edited:
In the new unpacked version of yt-dl, there is the problem that the upstream bin/youtube-dl doesn't launch the program
I don't understand. Doesn't launch which program? There isn't an upstream bin/youtube-dl file.
I think you may have confused yourself. You've definitely confused me.
The package appears to work OK for me following yesterday's update.
 
I don't understand. Doesn't launch which program? There isn't an upstream bin/youtube-dl file.
...
This youtube-dl script, which the upstream provides to launch yt-dl on Unixes:
Code:
# wget -qO - 'https://gitlab.com/dstftw/youtube-dl/-/raw/master/bin/youtube-dl'
#!/usr/bin/env python

import youtube_dl

if __name__ == '__main__':
    youtube_dl.main()
#
Which doesn't work in the Python CF environment without changes as described in my post, and which we have modified:
Code:
# opg-unpack youtube-dl_2020.11.01.1-1_mipsel.opk
...
# cat  ../youtube-dl/Hummy/youtube-dl_2020.11.01.1-1_mipsel/bin/youtube-dl 
#!/bin/sh
python /mod/lib/python2.7/dist-packages/youtube-dl "$@"
#
 
Has anyone else seen their youtube-dl download times increase drastically recently? Half hour programmes that a month ago were downloading from BBC iplayer in around 15 minutes are now taking well upwards of an hour, almost two sometimes. I know there could be a hundred reasons for this, I'm not asking for suggestions of causes - just wondering on the off-chance others have seen this which might - only might - indicate a common issue.

Still no luck with subs BTW despite the advice given - I gave up on that!
 
Has anyone else seen their youtube-dl download times increase drastically recently? Half hour programmes that a month ago were downloading from BBC iplayer in around 15 minutes are now taking well upwards of an hour, almost two sometimes. I know there could be a hundred reasons for this, I'm not asking for suggestions of causes - just wondering on the off-chance others have seen this which might - only might - indicate a common issue.

Still no luck with subs BTW despite the advice given - I gave up on that!
To get subtitles from iPlayer I add the following entries to /mod/etc/youtube-dl.com:
Code:
--write-sub
--sub-format srt
--convert-subs srt
For playback on the HDR-FOX you may need to edit the srt files to remove formatting information (e.g. caption colour) otherwise this will show up as text entries on screen.
Also, to use on the HDR-FOX, you will need to edit the filenames. The files will be called 'Programme.en.srt' or 'Programme.en-GB.srt' where 'Programme' is the name of the transport stream. The srt file needs to be called 'Programme.srt', for example.
 
It works for https://www.bbc.co.uk/iplayer/episode/m000qq5v which just generated "ERROR: requested format not available" even with your patch.
Are you sure?
Code:
# youtube-dl -v -F 'https://www.bbc.co.uk/iplayer/episode/m000qq5v'
[debug] System config: [u'--restrict-filenames', u'--prefer-ffmpeg', u'-f', u'(best/bestvideo+bestaudio)[height<=?1080][fps<=?60][tbr<=?3500]', u'-o', u'/mnt/hd2/My Video/%(title)s.%(ext)s', u'--no-overwrites', u'--config-location', u'/mod/.config/youtube-dl/config']
[debug] User config: [u'-f', u'(best/bestvideo+bestaudio)[height<=?1080][fps<=?60][tbr<=?1900]']
...
[debug] youtube-dl version 2020.09.20
...
[bbc.co.uk] m000qq5v: Downloading video page
[bbc.co.uk] m000qq5v: Downloading playlist JSON
[bbc.co.uk] m000qq5s: Downloading media selection XML
[bbc.co.uk] m000qq5s: Downloading media selection XML
[bbc.co.uk] m000qq5s: Downloading MPD manifest
[ ... repeated 3 times ]
[info] Available formats for m000qq5s:
format code                                                                             extension  resolution note
stream-uk-pc_streaming_concrete_combined_sd_mf_akamai_uk_dash-audio_eng=96000           m4a        audio only [en] DASH audio   96k , m4a_dash container, mp4a.40.5 (48000Hz)
...
stream-uk-pc_streaming_concrete_combined_sd_mf_akamai_uk_dash-video=281000              mp4        384x216    DASH video  281k , mp4_dash container, avc3.42C015, 25fps, video only
...
stream-uk-pc_streaming_concrete_combined_sd_mf_limelight_uk_dash_https-video=5070000    mp4        1280x720   DASH video 5070k , mp4_dash container, avc3.640020, 50fps, video only (best)
#
Same for 2020.12.09.
I have just pushed the updated version (minus patch now) to the repository.
Ta. Apparently using the v6 media selectors gives a better list, obviating the need to check several types of selector.
 
Apparently youtube-dl's iplayer extractor supports asx playlists but obviously that isn't working here.
...
Good news: youtube-dl (upstream and CF repo) now (and possibly for the last 5 years) correctly handles this form of BBC playlist https://www.bbc.co.uk/programmes/p06m8m6y/episodes ("programmes series page").

Bad news: it doesn't handle iPlayer series pages like https://www.bbc.co.uk/iplayer/episodes/p06m8m6y, although it must have worked 5 years ago.

Worse news: the iplayer-episodes script, which filled the gap caused by the failed support of the latter page type in yt-dl, also fails; although the changes that the BBC made don't break the scraping, the script now needs to follow HTTP redirects; the curl command in line 54 needs to have the -L option. At the same time, adding this fragment as a case in the case $1 in block makes it easier to test:
Code:
--list|-l)
       # just list the episode URLs
       # iplayer-episodes -l series_url
       qqq() { cat; }
       shift
       ;;

Slightly better news: this PR for yt-dl upstream restores the native iPlayer playlist support and would make iplayer-episodes obsolete.

Fixed typo per @prpr
 
Last edited:
I have just installed Youtube-dl 2021-03-03 using Webif >> Package Management >> Upgrades and re-booted the Humax but the version still appears to be 2020.11.01.1 anyone else having this problem?

YT-2021.jpg

Code:
Humax1# opkg list-installed
. . . . .
wireless-tools - 29-1
youtube-dl - 2021.03.03
zip - 3.0-1

Humax1#
Humax1# youtube-dl --version
2020.11.01.1
Humax1#

Humax1# opkg info youtube-dl
Package: youtube-dl
Version: 2021.03.03
Depends: ffmpeg (>= 4.1), wget (>= 1.20), python, libiconv
Provides:
Status: install user installed
Section: misc
Architecture: mipsel
Maintainer: prpr
MD5Sum: 43b739b66b34f98fb6872c301216b4e0
Size: 1353740
Filename: youtube-dl_2021.03.03_mipsel.opk
Description: Download videos from youtube.com or other video platforms
Installed-Time: 1615053356

Humax1#
 
Humax1# youtube-dl --version 2020.11.01.1
I guess that means somebody forgot to update the version string in the build, unless maybe the build of yt-dl itself remains the same but our own tweaks in the package make the overall package version go up.
 
I don't think it installed for some reason, I have since removed youtube-dl using the Web-If >> Package Management >> Installed >> Remove and then re-installed the current version, I now have this :-
Code:
Humax1#
Humax1# youtube-dl --version
2021.03.03
Humax1#
 
Version 2021.03.03 will now download playlists like this :-
Code:
Humax1# youtube-dl -f 251 https://www.youtube.com/playlist?list=PLI6kLIhBBwmTjh6StDK8egwQT48MPP0Re

[youtube:tab] PLI6kLIhBBwmTjh6StDK8egwQT48MPP0Re: Downloading webpage
[download] Downloading playlist: 11 short Videos
[youtube:tab] playlist 11 short Videos: Downloading 11 videos
[download] Downloading video 1 of 11
[youtube] fLCkTCfAxWE: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video01.webm
[download] 100% of 3.73MiB in 00:07
[download] Downloading video 2 of 11
[youtube] fQOdZNEP23k: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video02.webm
[download] 100% of 4.24MiB in 00:08
[download] Downloading video 3 of 11
[youtube] E36vJJ3ZoWY: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video03.webm
[download] 100% of 4.87MiB in 00:10
[download] Downloading video 4 of 11
[youtube] i-wnKKe5OVI: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video04.webm
[download] 100% of 3.04MiB in 00:06
[download] Downloading video 5 of 11
[youtube] ntByv2BJByo: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video05.webm
[download] 100% of 4.80MiB in 00:09
[download] Downloading video 6 of 11
[youtube] jxs5u5rH4eQ: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video06.webm
[download] 100% of 4.55MiB in 00:09
[download] Downloading video 7 of 11
[youtube] lKxYVVQjMUc: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video07.webm
[download] 100% of 3.29MiB in 00:07
[download] Downloading video 8 of 11
[youtube] kGAkY9359ls: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video08.webm
[download] 100% of 3.59MiB in 00:07
[download] Downloading video 9 of 11
[youtube] 8qC80RbNFwo: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video09.webm
[download] 100% of 3.77MiB in 00:08
[download] Downloading video 10 of 11
[youtube] 9iSTMczEuZ4: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video10.webm
[download] 100% of 3.39MiB in 00:07
[download] Downloading video 11 of 11
[youtube] rDzc9GkaPtU: Downloading webpage
[download] Destination: /mnt/hd2/My Video/short Video11.webm
[download] 100% of 3.55MiB in 00:07
[download] Finished downloading playlist: 11 short Videos
Humax1#
 
I don't think it installed for some reason
Clearly not, although I don't really see how. There is a task that runs post-installation that removes the cached compiled parts and replaces them with new.
Obviously it didn't work for whatever reason, but we will now never know. Uninstall/reinstall was the right solution anyway.
 
Back
Top