VideoHelp Forum


Try DVD-Fab Video Downloader and rip Netflix video! Or Try DVD-Fab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. I'm trying to download a demo video from https://bitmovin.com/demos/drm

    and I found https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd

    The known key:
    Code:
      kid: 'eb676abbcb345e96bbcf616630f1a3da',
      key: '100b6c20940f779a4589152b57d2dacb'
    I've tried to download the video by using:
    Code:
    ffmpeg -i https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd -codec copy e1.mp4
    streamlink https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd best -o e1.mp4
    
    youtube-dl https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd e1.mp4
    youtube-dl download failed, showing:
    Code:
    [generic] 11331: Requesting header
    WARNING: Falling back on generic information extractor.
    [generic] 11331: Downloading webpage
    [generic] 11331: Extracting information
    ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type
    youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    ffmpeg and streamlink successfully downloaded the file, but the decrypted video is wrong.
    Here is what I've tried:
    Code:
    mp4decrypt --key eb676abbcb345e96bbcf616630f1a3da:100b6c20940f779a4589152b57d2dacb "e1.mp4" "d1.mp4"
    mp4decrypt --key 100b6c20940f779a4589152b57d2dacb:eb676abbcb345e96bbcf616630f1a3da "e1.mp4" "d1.mp4"
    
    ffmpeg -decryption_key 100b6c20940f779a4589152b57d2dacb -i e1.mp4 -codec copy d1.mp4
    1. mp4decrypt decrypt streamlink download version produces 0 bytes video files.
    2. mp4decrypt decrypt ffmpeg download version, didn't work as expected. Cannot watch video content.
    3. ffmpeg decrypt showing "Option decryption_key not found."


    Any idea how to download and decrypt the video, any help would be much appreciated
    Quote Quote  
  2. Member
    Join Date
    Jan 2019
    Location
    hawai
    Search PM
    Code:
    ffmpeg -decryption_key 100b6c20940f779a4589152b57d2dacb -i encrypted_media.mp4 -codec copy decrypted_media.mp4
    Quote Quote  
  3. I think you just need a build of ffmpeg with the -decryption_key option enabled.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    I think you just need a build of ffmpeg with the -decryption_key option enabled.
    I'm using full build version of ffmpeg, please try to download the demo video from https://bitmovin.com/demos/drm and decrypt it with provided key. I have tried many times with different of method to decrypt the video content.
    Quote Quote  
  5. Member
    Join Date
    Mar 2019
    Location
    Germany
    Search PM
    The key is correct and it decrypts the stream.
    ffmpeg and streamlink successfully downloaded the file
    No they didn't. That's where the error is. The file you download is corrupt.

    Download this file and decrypt with: mp4decrypt --key 1:100b6c20940f779a4589152b57d2dacb 11331-11331.mp4 decrypted.mp4
    Last edited by hvq; 23rd Jan 2021 at 05:36.
    Quote Quote  
  6. The file decrypted properly using mp4decrypt.exe. But using the latest build of ffmpeg (from VideoHelp.com) I got an error:

    Code:
    G:\Program Files\Bento4 Examples>"G:\Program Files\ffmpeg64\bin\ffmpeg" -decryption_key 100b6c20940f779a4589152b57d2dacb -i encrypted.mp4 -c copy ffmpeg_decrypted.mp4
    ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
      built with gcc 10.2.1 (GCC) 20200726
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
      libavutil      56. 51.100 / 56. 51.100
      libavcodec     58. 91.100 / 58. 91.100
      libavformat    58. 45.100 / 58. 45.100
      libavdevice    58. 10.100 / 58. 10.100
      libavfilter     7. 85.100 /  7. 85.100
      libswscale      5.  7.100 /  5.  7.100
      libswresample   3.  7.100 /  3.  7.100
      libpostproc    55.  7.100 / 55.  7.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001fac494d680] Incorrect number of samples in encryption info
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001fac494d680] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 4851 kb/s): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'encrypted.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1iso5iso6
      Duration: 00:03:30.28, bitrate: 4860 kb/s
        Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 4851 kb/s, 25 fps, 25k tbr, 25k tbn, 50k tbc (default)
        Metadata:
          handler_name    : Bento4 Video Handler
        Side data:
          unknown side data type 24 (897 bytes)
    Output #0, mp4, to 'ffmpeg_decrypted.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 1
        compatible_brands: isomavc1iso5iso6
        encoder         : Lavf58.45.100
        Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, q=2-31, 4851 kb/s, 25 fps, 25k tbr, 25k tbn, 25k tbc (default)
        Metadata:
          handler_name    : Bento4 Video Handler
        Side data:
          unknown side data type 24 (897 bytes)
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001fac494d680] Incorrect number of samples in encryption info
    encrypted.mp4: Invalid data found when processing input
    frame=    0 fps=0.0 q=-1.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
    video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Any ideas?
    Quote Quote  
  7. Member
    Join Date
    Jan 2019
    Location
    hawai
    Search PM
    try with ffmpeg full version from this site: https://www.gyan.dev/ffmpeg/builds/
    Quote Quote  
  8. Originally Posted by lomero View Post
    try with ffmpeg full version from this site: https://www.gyan.dev/ffmpeg/builds/
    Will do. But I think I see what's wrong with the version I have -- it only supports aes 128 (16 byte key), not aes 256 (32 byte key).

    <edit>
    I get the same error with the latest gyan full build.
    </edit>
    Last edited by jagabo; 23rd Jan 2021 at 08:36.
    Quote Quote  
  9. Member
    Join Date
    Jan 2019
    Location
    hawai
    Search PM
    ok. try with bento decrypt
    Quote Quote  
  10. Yes, I already tried with bento4's mp4decrypt as mentioned in post #6 -- that worked as expected. But I'd prefer to use ffmpeg. Does your ffmpeg command line work for you with that particular video and key?
    Quote Quote  
  11. Originally Posted by fvh78870 View Post
    3. ffmpeg decrypt showing "Option decryption_key not found."
    https://www.codesd.com/item/ffmpeg-how-to-produce-mp4-videos-cenc-common-encryption.html

    These options and their values should be placed after all the inputs and before the output filename.
    try

    Code:
    ffmpeg -i e1.mp4 -decryption_key 100b6c20940f779a4589152b57d2dacb -codec copy d1.mp4
    Quote Quote  
  12. I've been experimenting with encrypting and decrypting videos with ffmpeg. Here's a batch file that encrypts a video file with ffmpeg, plays the encrypted video file with ffplay, then creates an unencrypted version of the file from the encrypted version:

    Code:
    ffmpeg -y -i Sample.mp4 -vcodec copy -acodec copy -encryption_scheme cenc-aes-ctr -encryption_key 76a6c65c5ea762046bd749a2e632ccbb -encryption_kid ffffffffffffffffffffffffffffffff Sample_encrypted.mp4
    
    ffplay -decryption_key 76a6c65c5ea762046bd749a2e632ccbb Sample_encrypted.mp4
    
    ffmpeg -y -decryption_key 76a6c65c5ea762046bd749a2e632ccbb -i Sample_encrypted.mp4 -codec copy Sample_decrypted.mp4
    
    pause
    Sample.mp4 is a normal mp4 file with no encryption. It only contains an AVC video stream. The encrypted file made by ffmpeg, Sample_encrypted.mp4, does not play with a normal player -- it has successfully been encrypted. Using ffplay.exe with the decryption key works, the video plays normally. The decrypted video created by ffmpeg, Sample_decrypted.mp4, plays normally in any player -- it has successfully been decrypted.

    Notes:

    The value of -encryption_key can be any valid 32 byte hexadecimal number.

    ffplay accepts the -decryption_key both before and after the filename.

    The ffmpeg decryption command line must have the -decryption key before the -i filename.


    I still have not figured out why the same command line doesn't work for the encrypted sample in post #5. We know that the given key is valid because bento4's mp4decrypt works with that key.

    <edit>

    Another hint: mp4decrypt gave no complaints but it did not successfully decrypt the encrypted file created by ffmpeg.

    Code:
    mp4decrypt --key 1:76a6c65c5ea762046bd749a2e632ccbb Sample_encrypted.mp4 Sample_decrypted_by_mp4decrypt.mp4
    A file is created that's the right size but it doesn't play properly (messed up image). So there appears to be some difference in the encryption.

    </edit>
    Last edited by jagabo; 24th Jan 2021 at 19:44.
    Quote Quote  
  13. Originally Posted by hvq View Post
    The key is correct and it decrypts the stream.
    ffmpeg and streamlink successfully downloaded the file
    No they didn't. That's where the error is. The file you download is corrupt.

    Download this file and decrypt with: mp4decrypt --key 1:100b6c20940f779a4589152b57d2dacb 11331-11331.mp4 decrypted.mp4
    oh, your file works perfectly, I think the problem should be my download method.

    May I know how did you download the 11331.mpd file?

    I using the following software and commands, which downloaded a corrupted file...

    Code:
    ffmpeg -i https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd -codec copy e1.mp4
    streamlink https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd best -o e1.mp4
    youtube-dl https://bitmovin-a.akamaihd.net/content/art-of-motion_drm/mpds/11331.mpd e1.mp4
    Quote Quote  
  14. I've managed to see DRM protected video keys with well known chrome extension. But don't know what to do next? How to download the protected video after finding keys (at least I think so)

    It shows like this:

    Image
    [Attachment 57207 - Click to enlarge]


    I think it's done through ffmpeg but I don't have any experience or knowledge about this issue except I a few days ago learned about youtube-dl and I used it in non protected videos.

    Please could you explain what to do next after finding these keys one by one.
    Quote Quote  



Similar Threads