Opened 5 years ago

Last modified 6 weeks ago

#7503 new enhancement

Support Dash Encrypted

Reported by: gorilla.maguila Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: dash encrypt
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi,

Would be a nice feature to support playing dash encrypted:

$ ffplay https://pliventvuso-a.akamaihd.net/live/ntvhomelive/ntvhomelive.isml/.mpd
ffplay version N-92204-gbf5bdbdb92 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180831
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 19.101 / 56. 19.101
  libavcodec     58. 33.101 / 58. 33.101
  libavformat    58. 19.100 / 58. 19.100
  libavdevice    58.  4.105 / 58.  4.105
  libavfilter     7. 33.101 /  7. 33.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed94648540] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed940797c0] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed94697500] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed94606ac0] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed9409d780] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed9470f840] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed94702c00] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed947136c0] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fed9467be40] Failed to seek for auxiliary info, will only parse senc atoms for encryption info
[h264 @ 0x7fed94079340] top block unavailable for requested intra mode
[h264 @ 0x7fed94079340] error while decoding MB 5 0
[h264 @ 0x7fed94079340] concealing 144 DC, 144 AC, 144 MV errors in I frame
[h264 @ 0x7fed94697080] mb_type 59 in I slice too large at 4 0
[h264 @ 0x7fed94697080] error while decoding MB 4 0
[h264 @ 0x7fed94697080] concealing 144 DC, 144 AC, 144 MV errors in I frame
[h264 @ 0x7fed94606640] top block unavailable for requested intra mode -1
[h264 @ 0x7fed94606640] error while decoding MB 2 0
[h264 @ 0x7fed94606640] concealing 350 DC, 350 AC, 350 MV errors in I frame
[h264 @ 0x7fed9409d300] top block unavailable for requested intra mode -1
[h264 @ 0x7fed9409d300] error while decoding MB 7 0
[h264 @ 0x7fed9409d300] concealing 920 DC, 920 AC, 920 MV errors in I frame
[h264 @ 0x7fed9470f3c0] top block unavailable for requested intra mode
[h264 @ 0x7fed9470f3c0] error while decoding MB 19 0
[h264 @ 0x7fed9470f3c0] concealing 2040 DC, 2040 AC, 2040 MV errors in I frame
[aac @ 0x7fed94702780] Prediction is not allowed in AAC-LC.
[aac @ 0x7fed94713240] Multiple frames in a packet.

Change History (3)

comment:1 by intermediary, 3 years ago

The problem should be split into sub issues imho.

FFMpeg should be able to parse manifests with encryption schemes without spilling out various errors and if possible save the file in an encrypted state so everything is close to what you expect for streams without any form of encryption.

If you are testing your own streaming solution and are in the posession of the correct key for the stream, the -decryption_key parameter should work on MPD/M3u8 manifests too instead of just local .mp4 files and a clear parameter order should be given in the manual.
I've seen a lot of errors with the -decryption_key parameter not being a valid option.

comment:2 by Balling, 20 months ago

The link is gone now.

comment:3 by gorilla.maguila, 6 weeks ago

Another link example:

https://cdn.bitmovin.com/content/assets/art-of-motion_drm/mpds/11331.mpd

Ideally we should come up with a patch that parses ContentProtection tag, and decrypt if key is present in the manifest as hls parser does.

<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="eb676abb-cb34-5e96-bbcf-616630f1a3da" xmlns:cenc="urn:mpeg:cenc:2013"/>
                <ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
                    <cenc:pssh xmlns:cenc="urn:mpeg:cenc:2013">AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==</cenc:pssh>
                </ContentProtection>
Last edited 6 weeks ago by gorilla.maguila (previous) (diff)
Note: See TracTickets for help on using tickets.