VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Sep 2025
    Location
    prague
    Search PM
    I have downloaded a video with yt-dlp. It downloaded a webm and m4a file. Both of which are encrypted.
    The only flags used were --cookies-from-browser and --alow-u.
    I am running Alpine linux and have either installed or compiled all utilities needed to decrypt it.
    The shaka-packager and mp4decrypt seem to be what I need, but neither are working correctly.

    I have tried
    packager input="in.webm",stream=video,output=output.webm --enable_raw_key_decryption --keys key_id=KEYID:key=KEY --keys key_id=KEYID:key=KEY
    but I get
    I0914 06:47:26.901414 3804 demuxer.cc:94] Demuxer::Run() on file 'in.webm'.
    I0914 06:47:26.901464 3804 demuxer.cc:160] Initialize Demuxer for file 'in.webm'.
    E0914 06:47:26.907265 3804 decryptor_source.cc:57] Error retrieving decryption key: 14 (INTERNAL_ERROR): Key for key_id=794706025e335afc9c2c879a9d28c371 was not found.
    E0914 06:47:26.907299 3804 webm_cluster_parser.cc:402] Cannot decrypt samples
    E0914 06:47:26.907340 3803 packager_main.cc:629] Packaging Error: 8 (PARSER_FAILURE): Cannot parse media file in.webm
    I then tried mp4decrypt, which appeared to work but the resulting file did not.
    mp4decrypt --key KEYID:KEY --key KEYID:KEY in.webm out.webm
    mplayer crashes immediately trying to open it, but strangely VLC opens the file and shows the correct duration of the file, but there is no video.
    ffprobe of this file shows
    [vp9 @ 0x7fbbe0c5c8c0] Invalid frame marker
    Last message repeated 40 times
    [vp9 @ 0x7fbbe0c5c8c0] Invalid sync code
    [vp9 @ 0x7fbbe0c5c8c0] Invalid frame marker
    Last message repeated 22 times
    [vp9 @ 0x7fbbe0c5c8c0] Requested reference 6 not available
    [vp9 @ 0x7fbbe0c5c8c0] Invalid frame marker
    Last message repeated 53 times
    [matroska,webm @ 0x7fbbe5d36600] Could not find codec parameters for stream 0 (Video: vp9 (Profile 0), none(tv, bt709), 1920x1080): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    Input #0, matroska,webm, from 'out.webm':
    Metadata:
    encoder : google/video-file
    Duration: 01:37:20.84, start: 0.000000, bitrate: 603 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), none(tv, bt709), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
    enc_key_id : eUcGAl4zWvycLIeanSjDcQ==
    Trying to remux it with setting pix_fmt to yuv420p and a codec copy produces an 11m 27s file (original is 1hr 37m).

    I downloaded this file twice to make sure there was no corruptions and both md5sums match.

    I originally was using WideVineProxy2 in Librewolf (firefox) but switched to Vineless (looks like a UI update to WVP2).
    Both of them were giving me the same keys. And yt-dlp is using cookies specifically from this browser and profile.
    I'm using a google aosp cdm.

    It seems as though shaka-packager can see what key_id's are present in the encrypted file, but widevineproxy2 and vineless are not providing those keys.

    Can someone help me out? Thanks

    EDIT: I fixed it. A different cdm gave me the key I needed, but only sometimes? I don't know. it's working now with shaka-packager. And I learned you cannot specify more than one set of keyid/key pairs.
    I wasn't sure if this was related to me using musl because that's typically the problem and i had to compile shaka.
    Last edited by knuxyl; 14th Sep 2025 at 11:57.
    Quote Quote  
  2. Originally Posted by knuxyl View Post
    it's working now with shaka-packager. And I learned you cannot specify more than one set of keyid/key pairs.
    I think you can

    Code:
    shaka-packager.exe input="enc_vid.mp4",stream=video,output=dec_vid.mp4 input="enc_aud.m4a",stream=audio,output=dec_aud.mp4 --enable_raw_key_decryption --keys label=0:key_id=c8a347ecfedffce25a9cec93c1034be3:key=767773380dc861637b1f0c8f12725d8d,label=1:key_id=66bc8d034f21ecabb2832d598e684002:key= aa79ee0e5cc00a91969d54e6361569cd,label=2:key_id=e4ad417b39f66f1039c2c6ebfdfc4cbe:key=277a3b034582f105060f5d6ccc4f4ddc
    discord=notaghost9997
    Quote Quote  
  3. Member
    Join Date
    Sep 2025
    Location
    prague
    Search PM
    yeah maybe, it was giving errors about duplicate label names, since they were all null, so they might've been overwriting each other. setting an arbitrary name might work, ill test it. thanks
    edit: tested and yeah, i just needed to set label names for each one. i just wrote a script to parse the exported json to loop through it setting a different label name for each and it works.
    Last edited by knuxyl; 14th Sep 2025 at 11:57.
    Quote Quote  



Similar Threads

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