snobu / destreamer

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

FFmpeg returned an error: Invalid data found when processing input #233

Closed fadyayad7 closed 3 years ago

fadyayad7 commented 3 years ago

Hi, I am getting this error when I try to download a video, I have tried also to execute (after getting cookies) separately the ffmpeg command and it turns out that the problem is in the ffmpeg command, it seems like the ffmpeg can't read an input file

lukaarma commented 3 years ago

If you are getting the error I suspect it's not Destreamer fault and you should try again later. Oh and make sure you have the latest release possible of FFmpeg

fadyayad7 commented 3 years ago

The problem is in the ffmpeg input passed by desreamer, I have tried to use FFmpeg(latest version) and the problem is in the input parameter which is -i I think, so if the problem is in the ffmpeg command, is there another way to download the video using youtube-dl ?

lukaarma commented 3 years ago

Could you please paste here the error you are getting?

Youtube-dl uses ffmpeg under the hood so I don't think it would solve your problems

fadyayad7 commented 3 years ago

Ok, when I execute destreamer -i "video link", after login I get this output Launching headless Chrome to perform the OpenID Connect dance... Navigating to login page... We are logged in. Wrote access token to token cache. At this point Chromium's job is done, shutting it down...

Parsing video/group urls Fetching videos info...

Fresh access token dropped into .token_cachen

Downloading Video: Lezione del 24 Settembre 2020

Spawning ffmpeg with access token and HLS URL. This may take a few seconds... progress [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%

and stops here for a while and it gives me this:

FFmpeg returned an error: {a link to a file called manifest}: Invalid data found when processing input

Then I added to the script this line so I can see the ffmpeg command : logger.info(ffmpegCmd);

and the value of the ffmpegCmd was like this :

ffmpeg -headers "MyCookies" -i "a link to a file called manifest" -c:a "copy" -c:v "copy" -n "path and file ext"

When I try the ffmpeg command separately it gives me this error:

[tls @ 000002054ba00440] A TLS fatal alert has been received. [crypto @ 000002054b6fcc40] Unable to open resource: https://streameuwe1su021.az ureedge.net/bf779175-acb0-4af2-8b97-f58ec61217d4/1-2crwnqiymwnza6bgnghe6xsqde.is m/QualityLevels(64000)/Fragments(aac_eng_1_64_1_1=51617280000,format=m3u8-aapl) [hls @ 000002054b04e800] Failed to open segment 858 of playlist 0 [hls @ 000002054b04e800] Error when loading first segment 'https://streameuwe1su 021.azureedge.net/bf779175-acb0-4af2-8b97-f58ec61217d4/1-2crwnqiymwnza6bgnghe6xs qde.ism/QualityLevels(64000)/Fragments(aac_eng_1_64_1_1=0,format=m3u8-aapl)' https://euwe-1.api.microsoftstream.com/api/videos/manifest?api-version=1.0&playb ackurl=https://streameuwe1su021.azureedge.net/bf779175-acb0-4af2-8b97-f58ec61217 d4/1-2crwnqiymwnza6bgnghe6xsqde.ism/manifest(format=m3u8-aapl): Invalid data found when processing input

fadyayad7 commented 3 years ago

Fixed when I changed my network, Thanks anyway 🧡