VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 16 of 16
  1. Hi guys, I'd really appreciate some help downloading videos from this site: https://www.pianogroove.com/jazz-piano-lessons/12-major-scales/

    I've tried everything I can think of but I'm stuck... Tried yt-dlp, hlsdl, streamlink and N_m3u8DL-RE but decryption always fail.

    Code:
    #EXTM3U
    
    # Media Playlists
    #EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=926286,BANDWIDTH=1578848,CODECS="avc1.64001F,mp4a.40.2",RESOLUTION=854x480
    https://www.pianogroove.com/?stream_loader=241&pl=2&expire=1715431364&signature=4d62896efd4acf09987a66c2f0f0c17d
    #EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=4305020,BANDWIDTH=8402496,CODECS="avc1.64001F,mp4a.40.2",RESOLUTION=1280x720
    https://www.pianogroove.com/?stream_loader=241&pl=3&expire=1715431364&signature=794096a1181f192f3bd7ddeb8acd45cd
    #EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=6360088,BANDWIDTH=15153184,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080
    https://www.pianogroove.com/?stream_loader=241&pl=4&expire=1715431364&signature=47e5481629922027ff3e41d643819b6c
    I'm trying to grab the 1080p stream using the key downloaded from the key URI in the stream URL and converted to hex.

    Code:
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-PLAYLIST-TYPE:VOD
    #EXT-X-INDEPENDENT-SEGMENTS
    #EXT-X-TARGETDURATION:4
    #EXT-X-MEDIA-SEQUENCE:0
    #EXT-X-KEY:METHOD=AES-128,URI="https://www.pianogroove.com/?stream_optim=%2FJazz-Piano-Foundations%2F1-Major-Scales%2Findex"
    #EXTINF:4.000000,
    https://pianogroove-com-encoded-vids-coconut.nyc3.cdn.digitaloceanspaces.com/Jazz-Piano-Foundations/1-Major-Scales/media-4/segment-0.ts?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=KBGW2JT4XWKQ3NFEXFIX%2F20240509%2Fams3%2Fs3%2Faws4_request&X-Amz-Date=20240509T124245Z&X-Amz-Expires=14400&X-Amz-SignedHeaders=host&X-Amz-Signature=c5257953106f6393c5e717d5926adb3ff5db0589bfa5b092e04ac7debd275c24
    ...
    ...
    But doing something like:

    hlsdl -K "D0B59E8585D2AF969E9190D2B9908A91" "https://www.pianogroove.com/?stream_loader=241&pl=4&expire=1715431364&signatur e=47e5481629922027ff3e41d643819b6c"

    Just returns a bunch of 'AES128_CBC_DecryptUpdate failed' or 'Padding is invalid and cannot be removed' errors depending on the tool used. So something's wrong with my key apparently, but not sure what. I've tried adding headers, cookies. Nothing sticks. Any help would be great!
    Quote Quote  
  2. Code:
    yt-dlp --allow-u "https://www.pianogroove.com/?stream_loader=241&pl=4&expire=1715435465&signature=957d1569ef910a9d1bb34d194fba808d"
    maybe you download the stream and decrypt
    Quote Quote  
  3. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Code:
    0a502b3daa741f7903b12d0547b64f8f
    Edit: Interesting. The key may be tied to specific query parameter values. Just to be safe, here's a link to the full 16 minute video.

    https://www.transfernow.net/dl/20240509AqEWZvKS
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 9th May 2024 at 13:02.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  4. Member aqzs's Avatar
    Join Date
    Mar 2024
    Location
    Paris
    Search Comp PM
    Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Code:
    0a502b3daa741f7903b12d0547b64f8f
    Hey Pepe ! How did you decoded the key ?
    With
    Code:
    response = requests.get('https://www.pianogroove.com/?stream_optim=%2FJazz-Piano-Foundations%2F1-Major-Scales%2Findex', headers=headers)
    
    print(response.content.hex())
    Or with
    Code:
    curl "https://www.pianogroove.com/?stream_optim=%2FJazz-Piano-Foundations%2F1-Major-Scales%2Findex" | od -A n -t x1 | sed 's/ //g'
    I'm getting d0b59e8585d2af969e9190d2b9908a91 which isn't the right key..
    Last edited by aqzs; 9th May 2024 at 10:23.
    Quote Quote  
  5. Originally Posted by ujipoh View Post
    Hi guys, I'd really appreciate some help downloading videos from this site: https://www.pianogroove.com/jazz-piano-lessons/12-major-scales/
    This issue has already been discussed on the forum

    UPD
    Code:
    ClArPap0H3kDsS0FR7ZPjw==
    Image
    [Attachment 78971 - Click to enlarge]
    Last edited by mister_ nex; 9th May 2024 at 15:26.
    Quote Quote  
  6. Appreciate it y'all!

    Originally Posted by peekaboo
    maybe you download the stream and decrypt
    I tried that but still need the key.

    Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi
    0a502b3daa741f7903b12d0547b64f8f
    Thanks for uploading the video! But how did you get the key? I'm only getting the same key as @aqzs... I'd like to get some more videos from that site so would be great to know how to get the keys.

    Originally Posted by mister_ nex
    This issue has already been discussed on the forum
    Thanks! Believe me, I've searched. But haven't find anything specific to this... Do you know of a thread where this is discussed? Where is the key 'xubnTLXFrj4yx3VAsOuV8g==' coming from?
    Quote Quote  
  7. Originally Posted by ujipoh View Post
    Do you know of a thread where this is discussed?
    https://forum.videohelp.com/threads/414047-Help-with-downloading-encrypted-HLS-video-f...ffline-viewing
    Code:
    ClArPap0H3kDsS0FR7ZPjw==

    Code:
    Complete name               : piano.mp4
    Format                      : MPEG-4
    Format profile              : Base Media
    Codec ID                    : isom (isom/iso2/avc1/mp41)
    File size                   : 715 MiB
    Duration                    : 16 min 14 s
    Overall bit rate            : 6 155 kb/s
    Sorry previous key is for another link,tested a shorter video.
    Last edited by mister_ nex; 9th May 2024 at 16:06.
    Quote Quote  
  8. Aaah, found it! Thanks again, man!
    Quote Quote  
  9. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Was kinda fun implementing this service. Should be able to handle private vimeo embedded videos as well for that site.

    Code:
    import json
    import re
    from html import unescape
    
    import requests
    from bs4 import BeautifulSoup
    
    BASE_URL = 'https://www.pianogroove.com/'
    ADMIN_PHP_URL = f'{BASE_URL}wp-admin/admin-ajax.php'
    
    
    def get_key_url(manifest):
        response = requests.get(manifest).content.decode()
        response = re.findall(r'(https?://\S+)', response)[-1]
    
        response = requests.get(response).content.decode()
        response = re.findall(r',URI="([^"]+)"', response)
    
        if len(response) == 0:
            return None
        return response[0]
    
    
    def get_video_data(source_url):
        response = requests.get(source_url).content.decode()
        response = re.findall(r'data-item="([^"]+)"', response)
        if len(response) == 0:
            return None, None
    
        response = json.loads(unescape(response[0]))
        manifest = None
        for source in response["sources"]:
            if source.get("src", None) is None:
                continue
            manifest = source
            break
    
        key = None
        if "mp4" in manifest["type"].lower():
            response = requests.post(
                ADMIN_PHP_URL, headers={'Referer': source_url},
                data={
                    'action': 'fv_fp_get_vimeo',
                    'sources[0][src]': manifest["src"]
                }
            ).content.decode()
    
            response = re.findall(r'<FVFLOWPLAYER>(.+)</FVFLOWPLAYER>', response)[0]
            response = json.loads(response)["request"]["files"]
            for file in response:
                stream = response[file]
                manifest = stream["cdns"][stream["default_cdn"]]["url"]
                manifest = manifest.replace("master.json", "master.mpd")
                break
        else:
            manifest = manifest["src"]
    
            key_url = get_key_url(manifest)
            if key_url is not None:
                requests.post(
                    ADMIN_PHP_URL,
                    data={'action': 'fv_player_performance', 'summary': manifest}
                )
                response = requests.get(key_url)
                key = response.content.hex()
    
        return manifest, key
    
    
    def get_download_command(source_url):
        manifest, key = get_video_data(source_url)
        if manifest is None:
            return f"No video found for: {source_url}"
    
        if key is None:
            return f'N_m3u8DL-RE.exe "{manifest}" -M format=mkv'
        return f'N_m3u8DL-RE.exe "{manifest}" --custom-hls-key {key} -M format=mkv'
    
    
    def get_all_videos(lessons_url):
        lessons = [lessons_url]
        response = requests.get(lessons_url).content.decode()
        soup = BeautifulSoup(response, 'html.parser')
    
        for li in soup.find_all('li'):
            node = li.find('div', class_=True)
            if not node:
                continue
            node = node.find('input', {'data-course_name': True})
            if not node:
                continue
            node = li.find('a')
            if not node:
                continue
    
            lessons += [node["href"]]
    
        return lessons
    
    
    LESSONS_URL = [
        "https://www.pianogroove.com/jazz-piano-lessons/jazz-piano-foundations/",
    ]
    
    for lesson_url in LESSONS_URL:
        for src_url in get_all_videos(lesson_url):
            print(get_download_command(src_url))
    Output:
    Code:
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666639&expire=1715493617&signature=0b7cff89dac60cf0270140f91c5f9a8f" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=241&expire=1715496002&signature=cb38d56de550ee53b5d398c75a7e2599" --custom-hls-key 0a502b3daa741f7903b12d0547b64f8f -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666468&expire=1715503088&signature=261ce00db77d98a7821d16b157c18482" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666458&expire=1715521266&signature=1f53367fb482cc10ea38114117fbc61a" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666460&expire=1715521273&signature=62c4f497dc7be0eb778327dece4900df" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=237&expire=1715517601&signature=e507a4380db466b52a2a803747b3a6f7" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666464&expire=1715492324&signature=d4483cbb9f77d5608c852f395508dee6" --custom-hls-key 9f8152db842ae1bb15d475401c42dd2e -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666466&expire=1715499653&signature=51f51fda021470ce878f35be26e1399b" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666529&expire=1715506799&signature=42a5c443142def0c6f7f4c542fb2f1e9" -M format=mkv
    No video found for: https://www.pianogroove.com/jazz-piano-lessons/reading-lead-sheets-moon-river/
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=667237&expire=1715506779&signature=81ec96415374447aa1367acd80261e44" --custom-hls-key 3efb0490f563b1e4b895b733f3801432 -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=667597&expire=1715513985&signature=d61174d70f68035e7250aaffa35d232c" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666636&expire=1715503160&signature=1a11587caf2c4793f4c7b4a1a3eccbe1" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666544&expire=1715510333&signature=d6fe0e5aad03c1936f850dbfa375bfa3" --custom-hls-key 622920142c2c99d82da4b9464955be81 -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=243&expire=1715506768&signature=56fda94f5aa1c79a2eb23c05f432d0d2" -M format=mkv
    Edit: This script has been added and extended in the widefrog tool so I won't maintain it here. Any relevant updates will take place in the support thread.
    Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 21st May 2024 at 04:25.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  10. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Was kinda fun implementing this service. Should be able to handle private vimeo embedded videos as well for that site.

    Code:
    import json
    import re
    from html import unescape
    
    import requests
    from bs4 import BeautifulSoup
    
    BASE_URL = 'https://www.pianogroove.com/'
    ADMIN_PHP_URL = f'{BASE_URL}wp-admin/admin-ajax.php'
    
    
    def get_key_url(manifest):
        response = requests.get(manifest).content.decode()
        response = re.findall(r'(https?://\S+)', response)[-1]
    
        response = requests.get(response).content.decode()
        response = re.findall(r',URI="([^"]+)"', response)
    
        if len(response) == 0:
            return None
        return response[0]
    
    
    def get_video_data(source_url):
        response = requests.get(source_url).content.decode()
        response = re.findall(r'data-item="([^"]+)"', response)
        if len(response) == 0:
            return None, None
    
        response = json.loads(unescape(response[0]))
        manifest = None
        for source in response["sources"]:
            if source.get("src", None) is None:
                continue
            manifest = source
            break
    
        key = None
        if "mp4" in manifest["type"].lower():
            response = requests.post(
                ADMIN_PHP_URL, headers={'Referer': source_url},
                data={
                    'action': 'fv_fp_get_vimeo',
                    'sources[0][src]': manifest["src"]
                }
            ).content.decode()
    
            response = re.findall(r'<FVFLOWPLAYER>(.+)</FVFLOWPLAYER>', response)[0]
            response = json.loads(response)["request"]["files"]
            for file in response:
                stream = response[file]
                manifest = stream["cdns"][stream["default_cdn"]]["url"]
                manifest = manifest.replace("master.json", "master.mpd")
                break
        else:
            manifest = manifest["src"]
    
            key_url = get_key_url(manifest)
            if key_url is not None:
                requests.post(
                    ADMIN_PHP_URL,
                    data={'action': 'fv_player_performance', 'summary': manifest}
                )
                response = requests.get(key_url)
                key = response.content.hex()
    
        return manifest, key
    
    
    def get_download_command(source_url):
        manifest, key = get_video_data(source_url)
        if manifest is None:
            return f"No video found for: {source_url}"
    
        if key is None:
            return f'N_m3u8DL-RE.exe "{manifest}" -M format=mkv'
        return f'N_m3u8DL-RE.exe "{manifest}" --custom-hls-key {key} -M format=mkv'
    
    
    def get_all_videos(lessons_url):
        lessons = [lessons_url]
        response = requests.get(lessons_url).content.decode()
        soup = BeautifulSoup(response, 'html.parser')
    
        for li in soup.find_all('li'):
            node = li.find('div', class_=True)
            if not node:
                continue
            node = node.find('input', {'data-course_name': True})
            if not node:
                continue
            node = li.find('a')
            if not node:
                continue
    
            lessons += [node["href"]]
    
        return lessons
    
    
    LESSONS_URL = [
        "https://www.pianogroove.com/jazz-piano-lessons/jazz-piano-foundations/",
    ]
    
    for lesson_url in LESSONS_URL:
        for src_url in get_all_videos(lesson_url):
            print(get_download_command(src_url))
    Output:
    Code:
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666639&expire=1715493617&signature=0b7cff89dac60cf0270140f91c5f9a8f" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=241&expire=1715496002&signature=cb38d56de550ee53b5d398c75a7e2599" --custom-hls-key 0a502b3daa741f7903b12d0547b64f8f -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666468&expire=1715503088&signature=261ce00db77d98a7821d16b157c18482" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666458&expire=1715521266&signature=1f53367fb482cc10ea38114117fbc61a" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666460&expire=1715521273&signature=62c4f497dc7be0eb778327dece4900df" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=237&expire=1715517601&signature=e507a4380db466b52a2a803747b3a6f7" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666464&expire=1715492324&signature=d4483cbb9f77d5608c852f395508dee6" --custom-hls-key 9f8152db842ae1bb15d475401c42dd2e -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666466&expire=1715499653&signature=51f51fda021470ce878f35be26e1399b" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666529&expire=1715506799&signature=42a5c443142def0c6f7f4c542fb2f1e9" -M format=mkv
    No video found for: https://www.pianogroove.com/jazz-piano-lessons/reading-lead-sheets-moon-river/
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=667237&expire=1715506779&signature=81ec96415374447aa1367acd80261e44" --custom-hls-key 3efb0490f563b1e4b895b733f3801432 -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=667597&expire=1715513985&signature=d61174d70f68035e7250aaffa35d232c" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666636&expire=1715503160&signature=1a11587caf2c4793f4c7b4a1a3eccbe1" -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=666544&expire=1715510333&signature=d6fe0e5aad03c1936f850dbfa375bfa3" --custom-hls-key 622920142c2c99d82da4b9464955be81 -M format=mkv
    N_m3u8DL-RE.exe "https://www.pianogroove.com/?stream_loader=243&expire=1715506768&signature=56fda94f5aa1c79a2eb23c05f432d0d2" -M format=mkv
    This is really good. Can you help me do something similar for https://maang.in/learn I am trying to download a free available course from here at this link https://maang.in/playlists/undefined?resourceUrl=rs7784 and this video uses encryption which I am not able to figure out at all. The keys cannot be obtained by any method so let me know if you can help me with it.
    Quote Quote  
  11. Holy shit dude!! That's awesome! Thanks!

    I'll try it out later today and let you know how it goes.
    Quote Quote  
  12. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Originally Posted by TatsP View Post
    Can you help me do something similar for...
    Nope.

    Originally Posted by TatsP View Post
    this video uses encryption which I am not able to figure out at all
    vdocipher. There's a post around, you can ask there for keys.
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  13. Originally Posted by TatsP View Post
    I am trying to download a free available course from here at this link https://maang.in/playlists/undefined?resourceUrl=rs7784 and this video uses encryption which I am not able to figure out at all.
    Something doesn't add up here.
    Why, exactly, would you want to download a course that's already available for free?
    Quote Quote  
  14. Originally Posted by pram0dm View Post
    Originally Posted by TatsP View Post
    I am trying to download a free available course from here at this link https://maang.in/playlists/undefined?resourceUrl=rs7784 and this video uses encryption which I am not able to figure out at all.
    Something doesn't add up here.
    Why, exactly, would you want to download a course that's already available for free?
    The site only makes the courses available for free for a limited time then removes them and makes them paid which is an issue because it can't be used again for revision or for referring later.
    Quote Quote  
  15. Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Originally Posted by TatsP View Post
    Can you help me do something similar for...
    Nope.

    Originally Posted by TatsP View Post
    this video uses encryption which I am not able to figure out at all
    vdocipher. There's a post around, you can ask there for keys.
    No tool currently available can decrypt vdocipher. I tried everything and got like 5 CDM banned. Where are the decryption keys being given?
    Quote Quote  
  16. @mister_nex

    I have tried following steps in this post to download from p….g…… but not had any luck successfully downloading and decrypting . The error is “input not supported”. I am not sure whether the decrypting is failing because of the downloading , or the downloading failing because of the decrypting.

    I understand that these urls are what yield the m3u8 "https://www.pianogroove.com/?stream_loader=241&expire=1715431364&signature=47e 5481629922027ff3e41d643819b6c" and that within the m3u8 is the url to request the key , which is returned binary, and has to be converted to uint8array and from there to plain text / base64

    Would you be able to answer a few of my questions which would help me narrow down my problem?

    1. I am presuming that this will work on content behind paywall? Not just free not logged in content. I currently have access with a seven day trial.
    2. If the wrong key or no key is supplied , will it fail to detect the stream , or just means it fails to decrypt after stream downloaded ?
    3. Does the key have to be supplied as base 64 , and if not will that cause command to fail.
    4. Would I expect just the first segment to be decryptable and playable in isolation . Obviously if it did work , it would only contain a short part of overall video, but would be helpful for troubleshooting

    The only time I’ve found N_m3u8dl to actually detect a stream is when I’ve used a different url which contains the index.m3u8. However it failed to download stream complaining about padding

    I’ve used chat gpt to write various scripts to pull the m3u8, pull the key and even download the segments in browser ( I tried this to see if after joining segments I could decrypt file. I tried using mp4decrypt also to decrypt the file. The decrypted file is either 0kb or not playable in VLC etc.

    I am using chrome and on Mac OS .
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!