widevine-L3-WEB-DL-Script icon indicating copy to clipboard operation
widevine-L3-WEB-DL-Script copied to clipboard

Video Split over 4 ids?

Open Demboer15 opened this issue 3 years ago • 36 comments

Have an mpd that splits video id into four parts (audio is one id):

https://imgur.com/Mb2gipt

How do I get script to download all four ids: -0, -1,-2 and -3 and merge together correctly. When I use XstreamDL it automatically downloads as one video file so obviously there must be a way for script to do this correctly. Thanks in advance for any help.

Demboer15 avatar Sep 27 '21 14:09 Demboer15

Just choose any ID of the four, they are all the same file.

Essam23 avatar Sep 27 '21 14:09 Essam23

They are not the same in this case, the first one downloads a small section of the beginning, the 2nd and 3rd downloads a larger section of the middle and the 4th the end.

Demboer15 avatar Sep 27 '21 16:09 Demboer15

Post the link of the episode or the movie.

Essam23 avatar Sep 27 '21 16:09 Essam23

Any episode.

But also think it happens with anything else on website

Demboer15 avatar Sep 27 '21 16:09 Demboer15

Try using this modified version of the script, just run download.bat and choose the audio in aac.

widevine-L3-WEB-DL-Script-Peacock.aac.zip

Essam23 avatar Sep 27 '21 21:09 Essam23

When you say run download.bat, can you elaborate, thanks.

Demboer15 avatar Sep 27 '21 21:09 Demboer15

Just put keys.json in the same folder with webdl2.py and double click on download.bat, You might get offered to choose the audio and the video, choose the audio in aac, not sure if the keys will work with the audio in eac3 or not, and some of the shows has the audio only in aac, If you could decrypt the audio in eac3 open webdl2.py with Notepad++ and replace aac with eac3, you could make a copy of the script and name it webdl3.py and a copy of download.bat and name it download.2.bat and edit download.2.bat by replacing webdl2.py with webdl3.py and when you want to decrypt the audio in eac3 execute download.2.bat.

Essam23 avatar Sep 27 '21 22:09 Essam23

Tried shift+right click in white space of script folder, open command window, type download.bat+return. All it does is open webdl2.py in notepad and when I close that it states in command window: press any key to continue... and then it closes command window. Double clicking download.bat does same thing, keys.json (with duplicate mpd url link removed) in new Peacock script folder. That's why I was asking you to elaborate, thought I was doing something wrong.

Demboer15 avatar Sep 27 '21 22:09 Demboer15

The purpose of the batch file is not to use the command prompt, anyway ignore the batch file and rename webdl2.py to webdl.py and use it as you used to do before.

Essam23 avatar Sep 27 '21 22:09 Essam23

As said, even just double clicking batch file did same thing.

Renamed to webdl.py as requested, run script as normal, went through start download process etc and now it is repeatedly saying downloading map file, is this normal, or wrong.

Demboer15 avatar Sep 27 '21 22:09 Demboer15

Are you using a VPN?

Upload your keys.json here in a comment. Is your account a premium one?

Essam23 avatar Sep 27 '21 22:09 Essam23

Using smartdns (works fine with XstreamDL), with premium, no ads.

Demboer15 avatar Sep 27 '21 22:09 Demboer15

Try using a different mpd, I had the same problem before changing the mpd worked for me.

Essam23 avatar Sep 27 '21 22:09 Essam23

Tried both VPN and different mpd, no luck, any other suggestions.

Demboer15 avatar Sep 27 '21 23:09 Demboer15

I have no other suggestions now, you could try using this keys.json for the first episode of "Cheers", It worked for me, but it has ads.

keys.zip

Essam23 avatar Sep 27 '21 23:09 Essam23

I modified the script to use XstreamDL-CLI, download it from here.

https://codeload.github.com/Essam3152/widevine-L3-WEB-DL-Script/zip/refs/heads/Peacock

You could change the options of XstreamDL-CLI in this line.

https://github.com/Essam3152/widevine-L3-WEB-DL-Script/blob/Peacock/webdl.py#L62

Essam23 avatar Sep 28 '21 07:09 Essam23

Thanks, that definitely works.

One final question, where can I tell XstreamDL in the script where ffmpeg is located to remove "Warning: cannot find executable ffmpeg", during execution of script. Doesn't affect running of script, just annoying seeing it.

1, tried adding "--ffmpeg "C:\Users<username>\Desktop\ffmpeg-2021-09-20-git-59719a905c-full_build\bin\ffmpeg.exe"" in the XstreamDL options line but it caused a syntax error when running script. 2, added ffmpeg.exe to binaries folder but still get message. 3, tried adding "ffmpegexe = dirPath + '/binaries/ffmpeg.exe' in script but still get message.

Demboer15 avatar Sep 28 '21 17:09 Demboer15

You could add ffmpeg.exe to PATH or add it in the same folder with webdl.py or add ffmpeg.exe in binaries and in the script modify it to

subprocess.run([XstreamDLexe, json_mpd_url, '--select', '-name', 'encrypted', '-save-dir', dirPath, '--enable-auto-delete', '--limit-per-host', '100', "--mp4decrypt", "binaries", '--ffmpeg', 'binaries'])

I updated the script and added ffmpeg, download the new version.

https://codeload.github.com/Essam3152/widevine-L3-WEB-DL-Script/zip/refs/heads/Peacock

Essam23 avatar Sep 28 '21 18:09 Essam23

Was about to post an idea about the subtitles. Not sure if there are subtitles on their own, tried looking for ttml2 etc when enabled in stream and check console but nothing there but the video itself has embedded closed captions which after the mkv is created I use CCExtractor to extract them as srt and merge them myself into existing mkv. Would it be possible to add this as a process to the script.

Demboer15 avatar Sep 28 '21 18:09 Demboer15

Do you have any idea why subtitles look like this? https://i.ibb.co/r7mZqWM/Imagen2.jpg It´s CC no?

oribe522 avatar Sep 28 '21 18:09 oribe522

@Demboer15 The script needs the URLs of the subtitles, see here.

https://github.com/parnexcodes/widevine-L3-WEB-DL-Script/issues/45#issuecomment-926075918

I might try to find a way for getting the URLs of the subtitles, usually Apple devices use a different format for the subtitles .

Essam23 avatar Sep 28 '21 18:09 Essam23

Was about to post an idea about the subtitles. Not sure if there are subtitles on their own, tried looking for ttml2 etc when enabled in stream and check console but nothing there but the video itself has embedded closed captions which after the mkv is created I use CCExtractor to extract them as srt and merge them myself into existing mkv. Would it be possible to add this as a process to the script.

It would be great.

oribe522 avatar Sep 28 '21 18:09 oribe522

@Demboer15 The script needs the URL of the subtitles, see here.

#45 (comment)

I might try to find a way for getting the URLs of the subtitles, usually Apple devices use a different format for the subtitles .

Either way would be great, either URL if possible or CCExtractor which I,ve been using on episodes.

Demboer15 avatar Sep 28 '21 18:09 Demboer15

@Demboer15 I could not find anything helpful in the m3u8 URL of a video on the iPhone.

https://g005-sf-us-cmaf-prd-ak.cdn.peacocktv.com/pub/global/986/849/pck_4193981/cmaf/1630090539624.6821/mpeg_2sec/master_cmaf.m3u8

and I do not think I would be able to modify the script to use CCExtractor.

Essam23 avatar Sep 28 '21 19:09 Essam23

No worries, what you've done with the script so far I am very grateful for, been able to add CCExtractor would of just made it one less step to deal with. Personal preference, but 2 minor things I changed were updating mkvmerge to v61.0.0.0 and changing the default language for video to und instead of eng.

Demboer15 avatar Sep 28 '21 20:09 Demboer15

@Essam3152 would you mind looking at this if you can help https://github.com/parnexcodes/widevine-L3-WEB-DL-Script/issues/66

JessicaJonez avatar Oct 21 '21 14:10 JessicaJonez

@Demboer15 @oribe522 I modified the script to use CCExtractor, run download.bat and the script will extract the subtitle and merge it in the video (or use webdl.py -o movie).

https://codeload.github.com/Essam3152/widevine-L3-WEB-DL-Script/zip/refs/heads/Peacock-subtitles

Use this keys.json for testing the script.

keys.zip

Essam23 avatar Nov 09 '21 13:11 Essam23

@Demboer15 @oribe522 I modified the script to use CCExtractor, run download.bat and the script will extract the subtitle and merge it in the video, the script has keys.json you could test the script with it.

https://mega.nz/file/9h13nSgR#Pi02VVxNbs9MaQ-d3YsZWP3Qnc8OcbaG8bwn5ufh5vg

Thanks! really thanks!

oribe522 avatar Nov 09 '21 14:11 oribe522

@Demboer15 @oribe522 I modified the script to use CCExtractor, run download.bat and the script will extract the subtitle and merge it in the video (or use webdl.py -o movie).

https://codeload.github.com/Essam3152/widevine-L3-WEB-DL-Script/zip/refs/heads/Peacock-subtitles

Use this keys.json for testing the script.

keys.zip

Wow, thanks, just to confirm working with Peacock mpd.

Demboer15 avatar Nov 09 '21 19:11 Demboer15

Talking of subtitles, Essam3152, anyway of grabbing latest HBOMAX subtitles with script, they are now using split .VTT files.

Thanks in advance.

Demboer15 avatar Nov 10 '21 11:11 Demboer15