snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.36k stars 442 forks source link

Failed to download MS Teams video #372

Open realprocrastinator opened 3 years ago

realprocrastinator commented 3 years ago

OS: Ubuntu 20.04

Launch command used: ./destreamer.sh -i "https://web.microsoftstream.com/video/11732ae0-0d22-43ff-8e04-4865a971e823"

FFmpeg fail to obtain the HLS file When I was trying to download the video from the above URL. It threw an error saying

[ERROR] FFmpeg returned an error: Did you mean file:https://auea-1.api.microsoftstream.com/api/videos/manifest?api-version=1.0&playbackurl=https://streamauea1su011.azureedge.net/30a0dfd6-9a18-4d44-af3c-be2df2ecebfb/1-rbbh5jgefesgk6c2za2bcujlob.ism/manifest(format=m3u8-aapl)?

Then I downloaded the HLS manually. Here is the part of my HLS file

#EXTM3U #EXT-X-VERSION:4 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-ALLOW-CACHE:NO #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:6 #EXT-X-I-FRAMES-ONLY #EXT-X-KEY:METHOD=AES-128,URI="https://auea-1.api.microsoftstream.com/api/videos/11732ae0-0d22-43ff-8e04-4865a971e823/protectionKey?api-version=1.0",IV=0X99E8A471593E0ECC1D0BCEC7547263D6 #EXT-X-PROGRAM-DATE-TIME:1970-01-01T00:00:00Z #EXTINF:6.000000,no-desc KeyFrames(video=0,format=m3u8-aapl) #EXTINF:6.000000,no-desc KeyFrames(video=60000000,format=m3u8-aapl) #EXTINF:6.000000,no-desc KeyFrames(video=120000000,format=m3u8-aapl) ....

realprocrastinator commented 3 years ago

I think the problem might be because the TS chunks are encrypted using AES-CBC algorithm. But not quite sure. Does anyone know the issue here? Thanks in advance ;D.

snobu commented 3 years ago

Yes, your ffmpeg is too old to understand HLS+crypto. Upgrade to 4.3.1 or newer.