如何使用ffmpeg下载aes加密的m3u8?

如何使用ffmpeg下载aes加密的m3u8?

我尝试使用 ffmpeg 下载一个似乎是 AES 加密的 m3u8 视频。我尝试了几种方法,但不知道该如何下载,例如这种方法:

如何使用 ffmpeg 或 youtube-dl 下载 aes 加密的 m3u8?

以下是视频链接:

https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Manifest.m3u8?st=KO_rtDqbeFCHAofm5Vf39w&e=1614160174

这是我的意见:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i \
"https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Manifest.m3u8?st=KO_rtDqbeFCHAofm5Vf39w&e=1614160174" \
-c copy -bsf:a aac_adtstoasc video.mp4

结果如下:

ffmpeg version 4.3.2-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
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
[hls @ 0x7fb55c009400] Skip ('#EXT-X-VERSION:5')
[hls @ 0x7fb55c009400] Skip ('## Created with Unified Streaming Platform(version=1.9.6)')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-SESSION-KEY:METHOD=SAMPLE-AES,URI="skd://clip_12839379?keyId=28c2b4ec3f31bc332b569e98bf3f88e9",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"')
[hls @ 0x7fb55c009400] Skip ('# AUDIO groups')
[hls @ 0x7fb55c009400] Skip ('# variants')
[hls @ 0x7fb55c009400] Skip ('# keyframes')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=40000,CODECS="avc1.42001E",RESOLUTION=400x226,URI="keyframes/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-video_eng=301000.m3u8"')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=107000,CODECS="avc1.42001E",RESOLUTION=640x360,URI="keyframes/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-video_eng=801000.m3u8"')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=199000,CODECS="avc1.42001E",RESOLUTION=720x406,URI="keyframes/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-video_eng=1501000.m3u8"')
[hls @ 0x7fb55c009400] Opening 'https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-audio1=93468-video_eng=301000.m3u8' for reading
[hls @ 0x7fb55c009400] Skip ('#EXT-X-VERSION:5')
[hls @ 0x7fb55c009400] Skip ('## Created with Unified Streaming Platform(version=1.9.6)')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x7fb55c009400] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z')
[https @ 0x7fb55c030e00] Opening 'https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-audio1=93468-video_eng=801000.m3u8' for reading
[hls @ 0x7fb55c009400] Skip ('#EXT-X-VERSION:5')
[hls @ 0x7fb55c009400] Skip ('## Created with Unified Streaming Platform(version=1.9.6)')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x7fb55c009400] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z')
[https @ 0x7fb55c030e00] Opening 'https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-audio1=93468-video_eng=1501000.m3u8' for reading
[hls @ 0x7fb55c009400] Skip ('#EXT-X-VERSION:5')
[hls @ 0x7fb55c009400] Skip ('## Created with Unified Streaming Platform(version=1.9.6)')
[hls @ 0x7fb55c009400] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x7fb55c009400] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=900000,LOCAL=1970-01-01T00:00:00Z')
[hls @ 0x7fb55c009400] SAMPLE-AES encryption is not supported yet
[hls @ 0x7fb55c009400] Failed to open segment 1 of playlist 0
...
[hls @ 0x7fb55c009400] SAMPLE-AES encryption is not supported yet
[hls @ 0x7fb55c009400] Failed to open segment 1252 of playlist 0
[hls @ 0x7fb55c009400] Error when loading first segment 'https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Top-Chef_c12839379_Episode-2-Saison-12_drmnp-audio1=93468-video_eng=301000-1.ts'
https://e212.cdn.m6web.fr/usp/mb_sd3/7/2/9/Top-Chef_c12839379_Episode-2-Saison-12/Top-Chef_c12839379_Episode-2-Saison-12_drmnp.ism/Manifest.m3u8?st=KO_rtDqbeFCHAofm5Vf39w&e=1614160174: Invalid data found when processing input

相关内容