Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Video Split over 4 ids? #56

Open
Demboer15 opened this issue Sep 27, 2021 · 36 comments
Open

Video Split over 4 ids? #56

Demboer15 opened this issue Sep 27, 2021 · 36 comments

Comments

@Demboer15
Copy link

Demboer15 commented Sep 27, 2021

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.

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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

@Demboer15
Copy link
Author

Demboer15 commented Sep 27, 2021

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.

@Essam23
Copy link

Essam23 commented Sep 27, 2021

Post the link of the episode or the movie.

@Demboer15
Copy link
Author

Demboer15 commented Sep 27, 2021

Any episode.

But also think it happens with anything else on website

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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

@Demboer15
Copy link
Author

Demboer15 commented Sep 27, 2021

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

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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.

@Demboer15
Copy link
Author

Demboer15 commented Sep 27, 2021

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.

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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.

@Demboer15
Copy link
Author

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.

@Essam23
Copy link

Essam23 commented Sep 27, 2021

Are you using a VPN?

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

@Demboer15
Copy link
Author

Demboer15 commented Sep 27, 2021

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

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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

@Demboer15
Copy link
Author

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

@Essam23
Copy link

Essam23 commented Sep 27, 2021

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
Copy link

Essam23 commented Sep 28, 2021

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

@Demboer15
Copy link
Author

Demboer15 commented Sep 28, 2021

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.

@Essam23
Copy link

Essam23 commented Sep 28, 2021

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

@Demboer15
Copy link
Author

Demboer15 commented Sep 28, 2021

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.

@oribe522
Copy link

oribe522 commented Sep 28, 2021

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

@Essam23
Copy link

Essam23 commented Sep 28, 2021

@Demboer15 The script needs the URLs 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 .

@oribe522
Copy link

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.

@Demboer15
Copy link
Author

@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.

@Essam23
Copy link

Essam23 commented Sep 28, 2021

@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.

@Demboer15
Copy link
Author

Demboer15 commented Sep 28, 2021

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.

@JessicaJonez
Copy link

@Essam3152 would you mind looking at this if you can help #66

@Essam23
Copy link

Essam23 commented Nov 9, 2021

@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

@oribe522
Copy link

oribe522 commented Nov 9, 2021

@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!

@Demboer15
Copy link
Author

@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
Copy link
Author

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

Thanks in advance.

@post-master
Copy link

@Essam3152 What can i do sir ? @Essam3152

`_ ____________ ____ __ _____ _ __
| | / / / __ )/ __ / / / /()_ / /_
| | /| / / / / __ / / / / / _ / / / / __ / /
| |/ |/ / /
/ /
/ / /
/ / /
/ / // / / / // / /

|/|///// //___// // ./_/
/_/

by parnex Edited By JudgeU
Required files : mkvmerge.exe, XstreamDL-CLI, mp4decrypt.exe, ffmpeg.exe, aria2c.exe, ccextractorwinfull.exe

Selected MPD : https://g003-vod-us-cmaf-prd-cl.cdn.peacocktv.com/pub/global/cY3/xNU/PCK_1634093103246.8225_01/cmaf/mpeg
_cenc_2sec/master_cmaf.mpd?c3.ri=5001555883745733320

0 total 3154 segments 6312.93s encrypted_video_H264_960x540_1833.85kbps
1 total 3154 segments 6312.93s encrypted_video_H264_1920x1080_7222.21kbps
2 total 3154 segments 6312.93s encrypted_video_H264_1280x720_4603.58kbps
3 total 3154 segments 6312.93s encrypted_video_H264_960x540_2963.41kbps
4 total 3154 segments 6312.93s encrypted_video_H264_768x432_857.49kbps
5 total 3154 segments 6312.93s encrypted_video_H264_512x288_354.81kbps
6 total 3132 segments 6312.99s encrypted_audio_EAC3_en_196.77kbps
7 total 3149 segments 6312.96s encrypted_audio_AAC_en_103.19kbps
8 total 3149 segments 6312.96s encrypted_audio_AAC_es_103.19kbps
9 total 3149 segments 6312.96s encrypted_audio_AAC_en-ad_103.11kbps
input stream number(s):
5
encrypted_video_H264_512x288_354.81kbps download start.
encrypted_video_H264_512x288_354.81kbps --------------------------------------- 100.00% • 266.8/266.8 MiB • ? • 0:00:00
encrypted_video_H264_512x288_354.81kbps --------------------------------------- 100.00% • 266.8/266.8 MiB • ? • 0:00:00
encrypted_video_H264_512x288_354.81kbps --------------------------------------- 100.00% • 267.0/267.0 MiB • ? • 0:00:00
C:/Ripping Tools/widevine-L3-WEB-DL-Script-Peacock-subtitles/widevine-L3-WEB-DL-Script-Peacock-subtitles/encrypted_video_H264_512x288_354.81kbps.mp4 was merged successfully
C:/Ripping Tools/widevine-L3-WEB-DL-Script-Peacock-subtitles/widevine-L3-WEB-DL-Script-Peacock-subtitles/encrypted_video_H264_512x288_354.81kbps was deleted

Decrypting .....
'C:\Ripping' is not recognized as an internal or external command,
operable program or batch file.
'C:\Ripping' is not recognized as an internal or external command,
operable program or batch file.
'C:\Ripping' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the file specified.
Merging .....
mkvmerge v57.0.0 ('Till The End') 64-bit
Error: The file 'decrypted.mp4' could not be opened for reading: open file error.

All Done .....

Do you want to delete the Encrypted Files : Press 1 for yes , 2 for no
Enter Response :`

@Essam23
Copy link

Essam23 commented Nov 10, 2021

@Demboer15 You could try this modified script, it uses yt-dlp, it will work only with the mpd in this type

https://cmaf.cf.us.hbomaxcdn.com/videos/GXt-ZRQXsQcPCwgEAAAqW/1/b1ec35/1_KW0E8Q_ad_1080hi.mpd

you could find that kind of mpd by searching in network for "content" press on every link then press on "response" and search for "fallbackManifest", not every video will have it.

The script is modified to download only the English subtitles, and it has keys.json for the movie "birds of prey" HBOMAX USA, use webdl.py -o movie -id -s or webdl.py -o movie -s.

widevine-L3-WEB-DL-Script-HBOMAX-subtitles.zip

11

@Demboer15
Copy link
Author

Thanks Essam3152, tested and all working fine, pulling the subs now.

@Essam23
Copy link

Essam23 commented Nov 10, 2021

@post-master I do not know yet why are you getting this error message, try to put "widevine-L3-WEB-DL-Script-Peacock-subtitles" in a different partition like "D", and do not use the batch file.

@post-master
Copy link

@Essam3152 sir can I have your discord or telegram, please?

@JohnWick1K47
Copy link

The file 'decrypted.mp4' could not be opened for reading: open file error @Essam3152 any solution?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants