snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.37k stars 439 forks source link

Saving video when network disconnects ... #120

Closed chiragdkothari closed 4 years ago

chiragdkothari commented 4 years ago

hello, forgot to mention in the last issue , but really appreciate Destreamer and has saved a lot of time and energy for me .... one thing i noticed was while downloading a video, if the network disconnects the progress jumps to 100% in the console and the video is saved with whatever was downloaded before disconnecting and the console displays the video is downloaded and no error message is displayed.... i tried using the -v but not information was displayed in the console ....

snobu commented 4 years ago

Thanks for reporting this. Will look into it.

chiragdkothari commented 4 years ago

also the new version is lot more CPU intensive than the previous one ... is it supposed to be lite that?

lukaarma commented 4 years ago

With new version what do you mean? 2.0 or the aria2c branch?

chiragdkothari commented 4 years ago

2.0... what i mean is that earlier in the previous version i was able to run 4 instances simultaneously with CPU usage hardly over 5% and now 4 instances are using ~50% CPu .. making it a bit difficult when there are other intense cpu usage apps are running ...

snobu commented 4 years ago

Are you getting .mkv files as output? If you're getting mp4, do a git pull as we just merged a PR a few days ago that fixes the re-encoding problem (you now get exactly what MS Stream has in terms of codec and bitrate).

chiragdkothari commented 4 years ago

oh ok .... i am using the forked one which is optimised for polimi .... also the code give .mkv by default right? but i am getting mp4...

snobu commented 4 years ago

Use our project instead and copy over the password filling logic from the Polimi fork. Should be easy it's just the few lines after puppeteer auto fills the username.

chiragdkothari commented 4 years ago

thanks a lot, the cpu usage has become very low now....

snobu commented 4 years ago

I am able to reproduce this by switching on Airplane mode mid-download. We need to check if the error event is raised by Fessonia, but it's probably not, else we would not have a partial download.

lukaarma commented 4 years ago

@snobu can I close this? I was not able to reproduce even using Airplane mode and is such a rare occurrence that we can safely ignore it, no?

snobu commented 4 years ago

Strange. I am able to consistently repro this bug. I kick off a download, 5% or so in i tap on Airplane Mode, progress bar goes to 100% and the download finishes with error code 0, so nobody raises any error event.

image

What happens in your case?

lukaarma commented 4 years ago

I get an Unknown FFmpeg error but if i disconnect my router mid-download I get the same behaviour as you do!

I say we can safely ignore this until I finish working on the aria2c branch when it wont be a problem anymore

snobu commented 4 years ago

Agreed.