In the past, ripping Adult Swim videos was simple. Yt-dlp worked fine since there was no encryption.
They've now gone to widevine. While getting a key is easy enough, I'm missing something.
After the first commercial break, the download stops even though it continues in the browser.
The playlists are warner media atmaster_wv_de.m3u8 (there is no mpd) contains the different versions. So the 'layer6_wv.m3u8' will do 1080p.Code:https://vod-media-lln.warnermediacdn.com/adultswim/cenc/
Grabbing that playlist I see the segments are wm_6_0_0.mp4 through wm_6_0_106.mp4.
Then at the commercial break there is:
Then the segments are wm_6_1_*.mp4 instead of wm_6_0_*.mp4.Code:#EXT-X-DISCONTINUITY #EXT-X-CUE-OUT:0 #EXT-X-MAP:URI="wm_6_1.mp4" #EXTINF:6.006,
N_m3u8dl-re doesn't seem to know to resume after the next section of segments. Thoughts?
I don't know what else to provide.
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 16 of 16
-
-
You could provide a video URL? I'm asking because for this
https://www.adultswim.com/videos/apollo-gauntlet/eros
I can download it easily with no problems like you mentioned. So a URL would be nice to haveLast edited by 2nHxWW6GkN1l916N3ayz8HQoi; 19th Aug 2024 at 01:58.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
That video is short and probably doesn't have a commercial break.
https://www.adultswim.com/videos/demon-slayer/someones-dream
Playlist: https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016...ame=top-2.15.0
Key=
Code:7883dc804772f614d235809d00000000:f8d5c5c5840e9e888b584a1f3b5fcfde
Last edited by doctorm; 19th Aug 2024 at 02:09.
-
When fetching API by hand (my browser doesn't let me play this one for some reason) I got that video id :
Code:AZEtqNWaSaru9Cdsy7g4
Code:85dd75a69f06a2a9846c7a92e11eada896564ca8
Code:https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016f400000000/master_wv_de.m3u8
HTML Code:import requests from pprint import pprint id = "AZEtqNWaSaru9Cdsy7g4" print('id: ', id) params = (('fields', 'title,type,duration,collection_title,poster,stream,title_id,auth,media_id,launch_date,auth_launch_date,disable_ads,season_number,episode_number'),) response = requests.get(f'https://www.adultswim.com/api/shows/v1/videos/{id}', params=params).json() media_id = response['data']['video']['media_id'] print('media_id: ', media_id) season_number = response['data']['video']['season_number'] episode_number = response['data']['video']['episode_number'] title = response['data']['video']['title'] params = (('appId', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuZXR3b3JrIjoiYWR1bHRzd2ltIiwicHJvZHVjdCI6InR2ZSIsInBsYXRmb3JtIjoid2ViLXRvcDIiLCJhcHBJZCI6ImFkdWx0c3dpbS10dmUtd2ViLXRvcDItZWphdWdvIn0.fjf3vyXbgvxlOQo8RBmic9FQtIUvE_oxVunWFpOiLwQ'),) response = requests.get(f'https://medium.ngtv.io/v2/media/{media_id}/desktop', params=params).json() mpd_url = response['media']['desktop']['widevine']['cenc']['url'] print('mpd_url: ', mpd_url)
Code:id: AZEtqNWaSaru9Cdsy7g4 media_id: 85dd75a69f06a2a9846c7a92e11eada896564ca8 mpd_url: https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016f400000000/master_wv_de.m3u8
HTML Code:var i = Cn.PlayerConfigBuilder.forSetup().withContainer(e.container).withMetadata(Cr({}, Object.assign({}, { env: "production" === window.AS.Environment.getEnv() ? "prod" : "ite", companyId: "e1b9076f-e876-436d-ba0a-d0fac24ff03e", appId: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuZXR3b3JrIjoiYWR1bHRzd2ltIiwicHJvZHVjdCI6InR2ZSIsInBsYXRmb3JtIjoid2ViLXRvcDIiLCJhcHBJZCI6ImFkdWx0c3dpbS10dmUtd2ViLXRvcDItZWphdWdvIn0.fjf3vyXbgvxlOQo8RBmic9FQtIUvE_oxVunWFpOiLwQ", adType: "SSAI" }
Last edited by aqzs; 19th Aug 2024 at 02:29.
-
Manually remove the ads from m3u8 then download with this command
Code:N_m3u8DL-RE --check-segments-count false --base-url https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016f400000000/layer6/ layer6_wv.m3u8 --key 7883dc804772f614d235809d00000000:f8d5c5c5840e9e888b584a1f3b5fcfde --save-name hentai
Code:https://gofile.io/d/htPMSA
-
Downloading the video (only) using your command and edited m3u8 works fine. It has 47:30. But after muxing it to mkv, around ~30 min mark, there's an encrypted section.
Edit: @OP, I don't think there's a straight solution for this. You could take @frieren's solution and just manually cut out the encrypted parts. Those are most likely the remaining ads.
Edit 2: here's a download link to the full uncorrupted video https://www.transfernow.net/dl/20240819qViM8cNvLast edited by 2nHxWW6GkN1l916N3ayz8HQoi; 19th Aug 2024 at 11:06.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
After extensive consultation with Pepe, we were able to come up with this:
The reason the video was not correctly downloaded is because N_m3u8DL-RE gives up an '#EXT-X-DISCONTINUITY' HLS tag.
This tag is used when there are changes in the video fragments (a discontinuity). In this case, the tag only changed the initialization fragment, which would have been fine, if one the init fragments didn't have a single byte difference. This is the reason N_m3u8DL-RE stopped processing the manifest.
So 'forcing' the complete download of the manifest by removing the discontinuity tags would still leave the one part encrypted.
What had to be done is splitting the manifest before and after the discontinuity section, which left three separate manifests that had to be downloaded individually.
I also removed the first fragment of parts 2 and 3 so the text at the start of the video wouldn't repeat itself in the middle. There is still an about one second long black screen between part transitions.
Merging there manifests results in this file:
https://www.swisstransfer.com/d/5c0bb331-238b-4760-8648-fb63a1fe939b
@2nHxWW6GkN1l916N3ayz8HQoi:
Your download seems to be unavailable.Bypass HMACs, One-time-tokens and Lic.Wrapping: https://github.com/DevLARLEY/WidevineProxy2 -
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Until N_m3u8DL-RE fixes their program, here's a script that does all the steps that were explained here
Code:import re from os import makedirs, listdir from os.path import join, exists from subprocess import run import requests MASTER_M3U8 = "https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016f400000000/master_wv_de.m3u8?playername=top-2.15.0" KEY = "7883dc804772f614d235809d00000000:f8d5c5c5840e9e888b584a1f3b5fcfde" VIDEO_RESOLUTION = "" AUDIO_BANDWIDTH = "" TEMP_FOLDER = "temp" if not exists(TEMP_FOLDER): makedirs(TEMP_FOLDER) def split_m3u8(m3u8_name, m3u8_url): response = requests.get(m3u8_url).text m3u8_url = m3u8_url.split("/") m3u8_url.pop() init_m3u8 = response.split("#EXT-X-MAP:")[0] end_m3u8 = "#EXT-X-ENDLIST" m3u8_maps = response.split('#EXT-X-MAP:')[1:] m3u8_maps = [f'#EXT-X-MAP:{m.strip()}' for m in m3u8_maps if m.strip()] fragment_name = m3u8_name.split("_")[0] + "_" fragment = 0 commands = [] for current_map in m3u8_maps: fragment += 1 current_map = current_map.split(end_m3u8)[0] current_map = current_map.splitlines() last_lines = current_map[-2:] has_disco = False for line in last_lines: for tag in ['#EXT-X-DISCONTINUITY', '#EXT-X-CUE-OUT']: if tag in line: has_disco = True break if has_disco: break if has_disco: current_map.pop() current_map.pop() for i in range(0, len(current_map)): if "#EXTINF:" in current_map[i]: current_map[i + 1] = "/".join(m3u8_url + [current_map[i + 1]]) elif "#EXT-X-MAP:" in current_map[i]: uri = re.findall(r'URI="([^"]+)"', current_map[i])[0] new_uri = "/".join(m3u8_url + [uri]) current_map[i] = current_map[i].replace(uri, new_uri) current_map = "\n".join(current_map) current_map = "\n".join([init_m3u8, current_map, end_m3u8]) m_name = f'{m3u8_name}_part_{fragment}.m3u8' output_path = join(TEMP_FOLDER, m_name) with open(output_path, "w") as f: f.write(current_map) output_name = m3u8_name.split("_")[0] + "_" + str(fragment) commands.append( f'N_m3u8DL-RE "{output_path}" ' f'--key {KEY} -M format=mkv ' f'--save-name "{output_name}"' ) for c in commands: run(c) files = listdir(".") ffmpeg_txt = "" for f in files: if f.startswith(fragment_name) and ".MUX." not in f and "_dec" not in fragment_name: if "_full" not in f: ffmpeg_txt += f"file '{f}'\n" fragment_name = fragment_name.split("_")[0] ffmpeg_txt_path = "ffmpeg_txt.txt" with open(ffmpeg_txt_path, "w") as f: f.write(ffmpeg_txt) full_name = f'{fragment_name}_full.mkv' run(f'ffmpeg -f concat -i "{ffmpeg_txt_path}" -c copy {full_name}') return full_name def process_master_m3u8(): response = requests.get(MASTER_M3U8).text lines = response.splitlines() stream_inf_tuples = [] for i in range(len(lines)): line = lines[i].strip() if line.startswith("#EXT-X-STREAM-INF"): m3u8_path = lines[i + 1].strip() stream_inf_tuples.append((line, m3u8_path)) video_tuples = [] audio_tuples = [] for stream_inf, m3u8_path in stream_inf_tuples: paths = MASTER_M3U8.split("?")[0].split("/") paths.pop() paths.extend(m3u8_path.split("/")) m3u8_path = "/".join(paths) if "RESOLUTION=" in stream_inf: resolution = re.findall(r'RESOLUTION=\d+x(\d+)', stream_inf) video_tuples.append((int(resolution[0]), m3u8_path)) elif "BANDWIDTH=" in stream_inf: bandwidth = re.findall(r'BANDWIDTH=(\d+)', stream_inf) audio_tuples.append((int(bandwidth[0]), m3u8_path)) video_tuples = sorted(video_tuples, key=lambda v: v[0], reverse=True) if VIDEO_RESOLUTION not in [None, ""]: video_tuples = list(filter(lambda v: str(v[0]) == VIDEO_RESOLUTION, video_tuples)) video_tuple = video_tuples[0] audio_tuples = sorted(audio_tuples, key=lambda a: a[0], reverse=True) if AUDIO_BANDWIDTH not in [None, ""]: audio_tuples = list(filter(lambda a: str(a[0]) == AUDIO_BANDWIDTH, audio_tuples)) audio_tuple = audio_tuples[0] fulls = [] fulls += [split_m3u8(f'video_res_{video_tuple[0]}', video_tuple[1])] fulls += [split_m3u8(f'audio_band_{audio_tuple[0]}', audio_tuple[1])] mkvmerge = f'mkvmerge {" ".join(fulls)} -o content_full.mkv' run(mkvmerge) if __name__ == '__main__': process_master_m3u8()
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Edited a bunch...:
Another problem is the audio is in Layer7, so you'd have to edit both playlists.
But it still doesn't work. The file size is increased, but nothing after the break plays. Remuxing even removes the data after the break.
Tried yt-dlp with ffmpeg as downloader and then mp4decrypt. It seems to download the master playlist audio and video okay (based on size), but doesn't decrypt.
Mind you, yt-dlp w/o ffmpeg errors that 'initialization fragment found after media fragment' and ffmpeg errors A LOT 'Failed to seek for auxiliary info, will only parse senc atoms for encryption info'.
Edit... and so...:
Just to prove this was doable, you need to edit the audio and video m3u8 files and SPLIT them at the commercial breaks. So in this case layer6_wv is split into L6a and L6b. layer7_wv_0 is L7a and L7b.
Code:N_m3u8DL-RE.exe -M format=mp4 --check-segments-count false --key a8099fd53564a923956eca3000000000:e52353c682f180e478712f2237df91aa --base-url "https://vod-media-cf.warnermediacdn.com/adultswim/cenc/b69aa9fd1a102d803a270d13b8f753a300000000/layer6/" l6a.m3u8 --save-name 6a N_m3u8DL-RE.exe -M format=mp4 --check-segments-count false --key a8099fd53564a923956eca3000000000:e52353c682f180e478712f2237df91aa --base-url "https://vod-media-cf.warnermediacdn.com/adultswim/cenc/b69aa9fd1a102d803a270d13b8f753a300000000/layer6/" l6b.m3u8 --save-name 6b N_m3u8DL-RE.exe -M format=mp4 --check-segments-count false --key a8099fd53564a923956eca3000000000:e52353c682f180e478712f2237df91aa --base-url "https://vod-media-cf.warnermediacdn.com/adultswim/cenc/b69aa9fd1a102d803a270d13b8f753a300000000/layer7/" l7a.m3u8 --save-name 7a N_m3u8DL-RE.exe -M format=mp4 --check-segments-count false --key a8099fd53564a923956eca3000000000:e52353c682f180e478712f2237df91aa --base-url "https://vod-media-cf.warnermediacdn.com/adultswim/cenc/b69aa9fd1a102d803a270d13b8f753a300000000/layer7/" l7b.m3u8 --save-name 7b (echo file '6a.mp4' & echo file '6b.mp4' )>listv.txt ffmpeg -safe 0 -f concat -i listv.txt -c copy test.mp4 (echo file '7a.mp4' & echo file '7b.mp4' )>lista.txt ffmpeg -safe 0 -f concat -i lista.txt -c copy test-a.mp4 ffmpeg.exe -i test.mp4 -i test-a.mp4 -c copy -disposition:s:0 default -metadata:s:1 language=eng Complete.mp4
Last edited by doctorm; 20th Aug 2024 at 00:10.
-
I think I found an easy fix for this site that skips over their broken ad manifest. Do you have another video URL where you get ads? The demon slayer one is gone.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
I don't know what info you need. Here's an episode: https://www.adultswim.com/videos/common-side-effects/pilot
Code:N_m3u8DL-RE "https://vod-manifests-fly.warnermediacdn.com/csm/builder/734364842,proxy.1,735184591,729790619,735061713,734609818,734487686,672057476,734778148,proxy.2.m3u8?yo.p.si=csm-e-cewbdause1vprlf-0bd7db27f8a5204a6-45-1741292602151&yo.p.hn=csm-e-cewbdause1vprlf-0bd7db27f8a5204a6.bln1.yospace.com&yo.p.ci=478924639&yo.p.fn=aHR0cHM6Ly92b2QtbWVkaWEtZmx5Lndhcm5lcm1lZGlhY2RuLmNvbS9hZHVsdHN3aW0vY2VuYy83ZDFiODM3NWNjZWU1NTJhYWJiYTJjNzhlYWU2MGVhZDAwMDAwMDAwL21hc3Rlcl9tZC5tM3U4&yo.p.bp=MANIFEST&yo.p.cu=Q3dRQg==&_fw_ae=&user_ids=&nw=48804&yo.me=true&afid=325214640&prof=48804%3Aadultswim_web_vod&yo.oh=Y3NtLWUtd2JkLXZsZi1lYi50bHMxLnlvc3BhY2UuY29t&yo.kf=wv-cenc&yo.up=https%3A%2F%2Fvod-media-fly.warnermediacdn.com&_fw_ar=&yo.av=3&caid=51470adab5b4ff0235de4c378ddefe616d01011e&yo.aas=true&conf_csid=as.com_vod_web&context=478924639&playername=top-2.14.0&vdur=1289.054&vip=184.164.175.47" --key 2995ba01b09e5cede9700f7700000000:9cd3d6f7ecc0b58a258f4f9ad021e2b1 --use-shaka-packager -M format=mkv
Last edited by doctorm; 6th Mar 2025 at 15:31.
-
Link was enough. Thanks for the url. Interesting, seems the trick can't be used for all videos. Good to know. For example for this video
https://www.adultswim.com/videos/dragon-ball-z-kai/a-boundary-pushing-brawl-goku-friez...nd-ginyu-again
You can download the video in 1 easy command by skipping over the drm.
Code:yt-dlp "http://amd.cdn.turner.com/adultswim/episodes/us_geo/dragonballzkai/2015/11/dragonballzkai_cc_044/hls/dragonballzkai_cc_044_stream_tv.m3u8"
Code:yt-dlp "http://amd.cdn.turner.com/adultswim/episodes/us_geo/dragonballzkai/2015/11/dragonballzkai_cc_044/hls/dragonballzkai_cc_044_stream_tv.m3u8" --add-headers "X-Forwarded-For: 143.231.249.138"
A custom script for splitting the manifest still seems to be better suited for this site in the end since you can't do it like that for all videos.--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
Are you saying you can't get Common Side Effects to rip? I was working on a script for something else and found that rips easy. Just let yt-dlp do all the work:
Code:yt-dlp.exe "https://www.adultswim.com/videos/common-side-effects/pilot" -o "Common_Side_Effects_S01E01.mp4"
Edit: If your provider is supported, you can look up the ap_mso withCode:yt-dlp.exe --ap-list-mso
Code:--ap-mso MSO --ap-username USERNAME --ap-password PASSWORD
Last edited by doctorm; 12th Mar 2025 at 19:01.
-
Sorry to double post, but found something interesting. With these streams, yt-dlp can download them properly, but can't decrypt if your cable provider isn't supported. N_m3u8dl-RE can decrypt them, but can't download them properly (it cuts off at the first commercial break).
Is it possible to get n_m3u8dl-re.exe to use yt-dlp to perform the download? Or have yt-dlp.exe download but get n_m3u8dl-re to decrypt? -
yt-dlp is not a suitable program for adultswim drm content. You can see for yourself
Code:yt-dlp -f 1110 "https://vod-media-aka.warnermediacdn.com/adultswim/cenc/19d98c54340a04225722750ab11016f400000000/master_wv_de.m3u8?playername=top-2.15.0"
Code:mp4decrypt --key 7883dc804772f614d235809d00000000:f8d5c5c5840e9e888b584a1f3b5fcfde video.mp4 video_decrypted.mp4
Code:shaka-packager in=video.mp4,stream=video,output=video_decrypted.mp4 --enable_raw_key_decryption --keys key_id=7883dc804772f614d235809d00000000:key=f8d5c5c5840e9e888b584a1f3b5fcfde
https://github.com/pratikpatel8982/yt-dlp-mp4decrypt
or
https://github.com/aarubui/yt-dlp-mp4decrypt
If you're curious, you can give it a shot
Edit: in your case it seems it found a drm free stream, that's why it worked. I don't think it's guaranteed that you'll find one for all videos thoughLast edited by 2nHxWW6GkN1l916N3ayz8HQoi; 13th Mar 2025 at 04:40.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
Similar Threads
-
Successfully cracked DRM of DMMVRPlayer, a Japanese VR adult video player
By moco in forum Video Streaming DownloadingReplies: 5Last Post: 28th Apr 2024, 07:48 -
Anybody Know of a Good Program To Organize A Large Adult Video Collection??
By DJboutit in forum Newbie / General discussionsReplies: 2Last Post: 27th Nov 2021, 12:15