Scarica facilmente i video da BBC iPlayer (con youtube-dl)
< Valutazione su BBC iPlayer - Download dei video
Yes. I have the same.
I also am no longer getting the grey box with the ffmpeg text in Chromium or Chrome.
The BBC seem to have changed their iPlayer page.
Yes, you are both right. Here's a comment I just left on my blog post related to the script:
I confirm they did a major revamp of the layout and they also tweaked a bit the inner workings of the player. I am investigating the situation a bit and I will need some time to write a new version of the script.
Therefore... Keep Holding On :grin:
BTW is anyone able to find a recent video that is truly HD? It seems most of the files now are at most 960px large. :astonished:
Hi Lazza.
Thanks for responding so quickly, it's much appreciated. I look forward to your update as and when it becomes available.
Cheers
Peter
Please try version 4.0 4.0.1 and help me with testing the coverage across the BBC website. I've checked it works for the following kind of pages:
However the website is very big and has lots of sections with different graphics. So I could have missed some of them.
If you find a content without the command line leave a comment on this blog post.
Please note that you are required to use youtube-dl
now. Pay attention to the updated instructions.
Wow, I wish commercial software companies were as responsive as you!
I tried your new script at - http://www.bbc.co.uk/iplayer/episode/b08plvy6/line-of-duty-series-4-episode-6 and it downloaded a 30 second trailer for Dr. Who, but didn't go on to get the main programme.
I'm accustomed to your previous script downloading both the little channel "jingles" that prefix some programmes and then the main programme, but I don't know if there's a technical difference between these jingles and a trailer.
One other minor point. Your earlier scripts warned if a file was going to be overwritten, this version didn't.
I'll do some more testing and will let you know if I find anything strange.
A coffee will definitely be on its way.
Cheers
Peter
Firstly I updated youtube-dl.
I tried to download
http://www.bbc.co.uk/iplayer/episode/b08nz26m/the-last-kingdom-series-2-episode-7
#Try 1. It got about half way through and crashed.
#Try 2. It got about half way through and crashed
#Try 3. Reached 100% download and failed, see below.
--------------
Think@ThinkPad-T60:~/Desktop$ youtube-dl "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/c57530-b08nz25j/vf_b08nz25j_1b22390c-48ad-485d-a963-8f9c932d376d.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1493658526_54c1eb0ef6a5a22883e0c4add3d732d1" -o The_Last_Kingdom
[generic] pc_hd_abr_v2_dash_master: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pc_hd_abr_v2_dash_master: Downloading webpage
[generic] pc_hd_abr_v2_dash_master: Extracting information
[dashsegments] Total fragments: 901
[download] Destination: The_Last_Kingdom.fpc_hd_abr_v2_dash_master-video=5070000
[download] 100% of 1.23GiB in 43:14
[dashsegments] Total fragments: 901
[download] Destination: The_Last_Kingdom.fpc_hd_abr_v2_dash_master-audio_eng_1=96000
[download] 100% of 39.42MiB in 03:54
[ffmpeg] Merging formats into "The_Last_Kingdom.mp4"
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Think@ThinkPad-T60:~/Desktop$
I wish commercial software companies were as responsive as you!
As a matter of fact, I do work as a software developer. I do not publish software but work on custom personalized projects. :blush: (Do you want to order some custom script? :tongue: ) But today is national holiday in Italy and yesterday was a Sunday, so I was a bit more free than usual.
You are right about the trailer issue. The first time you watched a video, the trailer got caught and you had to reload the page. They told me about this on my blog and I've published 4.0.2 like 1 minute ago. :joy:
It got about half way through and crashed
I've updated the script with an additional tweak to the command line. The original one was giving problems with some versions of youtube-dl
(even recent ones). This one should be working better.
Update
Tried the 4.0.3 script and got this (because the trailer from the previous attempt still existed). Reinstating your original "overwrite y/n?" would be useful.
>youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/8353d4-b08qlrd5/vf_b08qlrd5_e6bd9b2e-ca2a-419a-82c5-72c076c44bc9.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1493675323_dd20aabe1a8e3ab2a8dd634e25b3e404" -o Line_of_Duty
[generic] pc_hd_abr_v2_dash_master: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pc_hd_abr_v2_dash_master: Downloading webpage
[generic] pc_hd_abr_v2_dash_master: Extracting information
[download] Line_of_Duty.mp4 has already been downloaded and merged
Deleted this, then on BBC site, let the trailer play through until program started, then ran the youtube-dl script and it worked fine.
Out of interest, I also tried and succeeded in downloading K Smith's Last Kingdom episode.
In your previous versions I didn't need to actually start the iplayer, I could just copy and paste your ffmpeg script as soon as it appeared. With the trailer issue here, does it mean that I'll always have to launch iplayer and wait for any trailers to play before I launch the youtube-dl script?
If I ever meet anybody needing a custom script, I'll be sure to mention your name.
Peter
Reinstating your original "overwrite y/n?" would be useful
That's a ffmpeg
feature... :sweat_smile:
With the trailer issue here, does it mean that I'll always have to launch iplayer and wait for any trailers to play before I launch the youtube-dl script?
The previous version was performing wild guesses with different techniques on different pages. This version detects the state of the player(s) on the page and updates the command line(s). It is required to press Play on some pages, for instance the pasta recipe linked above.
However, I tested on Last Kingdom and it was skipping the trailer (also because it's doing a wild guess to skip the trailer videos). Apparently it doesn't skip it on all episodes. :neutral: Did you test it also on other pages?
Hi,
Hope you had a great national holiday.
Thank you for the script. It is so useful to me and clearly many others also.
I am using Lubuntu.
I tried the Last Kingdom download again.
It got to 100% again and failed.
Output is below
-------------------
think@ThinkPad-T60:~/Desktop/last_kingdom_7$ youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/c57530-b08nz25j/vf_b08nz25j_1b22390c-48ad-485d-a963-8f9c932d376d.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1493757423_a0e966f3af9fe9a50ed344c0465190fa" -o The_Last_Kingdom
[generic] pc_hd_abr_v2_dash_master: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pc_hd_abr_v2_dash_master: Downloading webpage
[generic] pc_hd_abr_v2_dash_master: Extracting information
[dashsegments] Total fragments: 901
[download] Destination: The_Last_Kingdom.fpc_hd_abr_v2_dash_master-video=5070000
[download] 100% of 1.23GiB in 42:02
[dashsegments] Total fragments: 901
[download] Destination: The_Last_Kingdom.fpc_hd_abr_v2_dash_master-audio_eng_1=96000
[download] 100% of 39.42MiB in 03:09
[ffmpeg] Merging formats into "The_Last_Kingdom.mp4"
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
think@ThinkPad-T60:~/Desktop/last_kingdom_7$
Are you using the latest version of youtube-dl
from its website or the one in the repositories?
Was going to report that the previous version stopped working after a recent update. But it looks as if the resolution for this is already well under way; bloody good job everybody.
Hi Lazza
How are you?
Thanks again for the great script & help :smiley:
All my Lubuntu system files are up to date.
A few days ago I updated youtube-dl. I installed with
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
I did it again just now then tried a much shorter download than the Last Kingdom. I tried this
youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_sd/4e9249-p051t2md/vf_p051t2md_bd5e274e-eed9-4736-b2b8-8ca37ce87cdf.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1493835987_6a8f7f2f9da6e59ba54f57b9fac1416d" -o David_Davis_on_how_much_Britain_may_or_may_not_have_to_pay_for_its_Brexit_bill_
It failed in the same way as above, reaching 100% then apparently unable to merge the files at the end of the process.
The output is below.
I then downloaded this file
https://youtube-dl.org/downloads/latest/youtube-dl-2017.05.01.tar.gz
unpacked it and placed the Python file
youtube-dl in
/usr/local/bin/
then
sudo chmod a+rx /usr/local/bin/youtube-dl
and tried download with the above short news clip again and got the same result. Same as before. It could not merge the files at the end of the video download.
May be because Brexit is a disaster it did not work?
---------------------
think@ThinkPad-T60:~/Desktop/new2$ youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_sd/4e9249-p051t2md/vf_p051t2md_bd5e274e-eed9-4736-b2b8-8ca37ce87cdf.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1493835987_6a8f7f2f9da6e59ba54f57b9fac1416d" -o David_Davis_on_how_much_Britain_may_or_may_not_have_to_pay_for_its_Brexit_bill_
[generic] pc_hd_abr_v2_dash_master: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pc_hd_abr_v2_dash_master: Downloading webpage
[generic] pc_hd_abr_v2_dash_master: Extracting information
[dashsegments] Total fragments: 8
[download] Destination: David_Davis_on_how_much_Britain_may_or_may_not_have_to_pay_for_its_Brexit_bill_.fpc_hd_abr_v2_dash_master-video=1604000
[download] 100% of 4.80MiB in 00:10
[dashsegments] Total fragments: 8
[download] Destination: David_Davis_on_how_much_Britain_may_or_may_not_have_to_pay_for_its_Brexit_bill_.fpc_hd_abr_v2_dash_master-audio_eng=96000
[download] 100% of 278.28KiB in 00:01
[ffmpeg] Merging formats into "David_Davis_on_how_much_Britain_may_or_may_not_have_to_pay_for_its_Brexit_bill_.mp4"
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
think@ThinkPad-T60:~/Desktop/new2$
Actually, I should've been more careful on my previous advice. The merging part is done by ffmpeg
. Can you get a static build of that? Unfortunately when using Ubuntu we get software which is updated to the last version before the distro came out. For instance, if you use Ubuntu 14.04 then your ffmpeg
version will be from 2014, and so on...
https://www.johnvansickle.com/ffmpeg/
May be because Brexit is a disaster it did not work?
LOL possibly! It will work when the government of the UK pays the money. :tongue: Just kidding. :smile:
Hi Lazza
I was going to report another problem but discovered that you've already fixed it in 4.0.4. I really appreciate your efforts. You obviously aren't doing this for the money. Do you do it because you like problem solving? Do you get a buzz of achievement from it?
After your initial reply, I took some time to check out the BBC links you posted. Prior to 4.0.4 I found problems with two of them and 4.0.4 has fixed one, but http://www.bbc.co.uk/programmes/b08n1kk6 still gives "ERROR: requested format not available" I don't know it that means they've removed something or if your script has an error.
On the subject of your list of links, I found it amusing that the football one landed on an article about the relegation of my city's arch rival.
So far, I haven't found any full HD programmes.
Thanks for your efforts.
Cheers.
Peter
Hi Lazza
Thanks for all your help
1/ I compiled a new ffmpeg and checked it worked, which it does.
Still youtube-dl was unable to merge the files as shown below.
2/ I then downloaded the static build of ffmpeg from here
https://www.johnvansickle.com/ffmpeg/
which is great! I did not know that was there.
I then did
thinkpad@ThinkPad-T60:~$ whereis ffmpeg
ffmpeg: /home/user/bin/ffmpeg
and copied the files from the static build download tarball
into here
/home/user/bin/ffmpeg
and it still failed to merge the files.
thinkpad@thinkPad-T60:~/Desktop/New$ youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_sd/45c5d9-p052dzmm/vf_p052dzmm_e9b3a94b-6081-4444-82d1-072862182ad8.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1494366808_a610eefb6c80bb0d193516745025e8b2" -o Jeremy_Corbyn_warns_of_a_reckoning_to_come_for_rigged_system_
[generic] pc_hd_abr_v2_dash_master: Requesting header
WARNING: Falling back on generic information extractor.
[generic] pc_hd_abr_v2_dash_master: Downloading webpage
[generic] pc_hd_abr_v2_dash_master: Extracting information
[dashsegments] Total fragments: 29
[download] Destination: Jeremy_Corbyn_warns_of_a_reckoning_to_come_for_rigged_system_.fpc_hd_abr_v2_dash_master-video=1604000
[download] 100% of 20.79MiB in 00:44
[dashsegments] Total fragments: 29
[download] Destination: Jeremy_Corbyn_warns_of_a_reckoning_to_come_for_rigged_system_.fpc_hd_abr_v2_dash_master-audio_eng=96000
[download] 100% of 1.22MiB in 00:05
[ffmpeg] Merging formats into "Jeremy_Corbyn_warns_of_a_reckoning_to_come_for_rigged_system_.mp4"
ERROR:
thinkpad@ThinkPad-T60:~/Desktop/New$
youtube-dl -f bestvideo+bestaudio "http://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_sd/16c803-p052dz62/vf_p052dz62_76ef5732-0187-4c0f-8679-77a25dd02173.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1494458708_b189dd6a8f2990a9f6172037cf116d9d" -o Russian_WW2_victory_parade_features_Arctic_missiles
I have version 4.0.4 of the script.
$youtube-dl --version
2017.05.09
On completion I end up with 4 unmerged files in the directory
file_name.fpc_hd_abr_v2_dash_master-audio_eng=96000
file_name.fpc_hd_abr_v2_dash_master-audio_eng=96000.part-Frag0.part
file_name.fpc_hd_abr_v2_dash_master-video=1604000
file_name.fpc_hd_abr_v2_dash_master-video=1604000.part-Frag8
Do you do it because you like problem solving? Do you get a buzz of achievement from it?
Well, yes, you could say so. :smile: At first it was like that because there were no other reliable ways of downloading the videos on the BBC. Now it's mostly about maintenance because some people expect the script to be fully working otherwise they start asking fixes and stuff like that.
I'm not talking about you guys, but some people really expect that also free software be fully maintained. One even asked me for help in customizations, which is custom development hence a job (aka not free).
still gives "ERROR: requested format not available" I don't know it that means they've removed something or if your script has an error.
Whoops, yeah... of course. youtube-dl
cannot get the best video of an audio track. :blush: I've got to fix that one.
K Smith, that's weird. I am still able to download without issues, for instance using youtube-dl
2017.02.24.1 and ffmpeg
3.3. Did you install the media codecs correctly on your Linux system?
The script has stopped working today
Up until last night, the script was working fine. Today, in both Chrome and Firefox I'm no longer getting the grey box with the ffmpeg text. The BBC seem to have changed their iPlayer page.