AminBhst / brisk

Fast, multithreaded, cross-platform download manager
GNU General Public License v3.0
126 stars 13 forks source link

Add video streaming capability #43

Open trimechee opened 3 months ago

trimechee commented 3 months ago

Hello, thank you so much for this awesome great fantastic new download manager !! 💯 🥇

I discovered while downloading from streaming sites that in some streaming video players, like in this site :

https://v5.voiranime.com/anime/boku-dake-ga-inai-machi/

and even if I choose "1" for the number of threads, the downloaded video is divided into very small parts which prevents us from watching the video while it is downloading and I have to wait for the download to finish to watch the donwloaded video, so please we hope our beloved Brisk Download Manager will add an option to preview/watch the video while downloading, I tried with coc coc browser which can download streamig videos and thus we can play file while it's still downloading and preview/watch while downloading the video, thank you !

EDIT :

Yes we can think this option request is a niche feature 👍 but personnaly i think it is an important and the most important feature of a donwload manager, already it allows us to avoid the possible banning of our IP address by setting the number of threads to "1" if for example when downloading episodes of anime which have 700 episodes!

in addition the wifi can become unstable very weak when a lot of family members connect, and if we watch streaming, the viewing will be jerky lag interrupted if the video is in HD if our internet connection is weak, in addition the downloaded video can be very long and waiting for the download to finish can be annoying...plus I have done tests and downloading videos from streaming sites with number of threads "1" is very fast, stable and it is more ecological and saves our battery resources!

Coc coc browser says that its internal downloader has 8 threads to speed up the downloads however we can preview the downloaded video so I think coc coc browser downloads first part of the video first then increase the number of threads to increase the speed....

Thank you very much :)

EDIT :

Hello, I talked to the developer of FileCentipede about this probleme and this is his answer....maybe it cOULD help to add the great video streaming capability :

"For streaming media, the use of a single thread or multiple threads for downloading makes no difference. During the download process, the downloader creates independent files for each segment locally, which are then merged into a single file after downloading. This is why the file cannot be played. To resolve this, I can add an option in the future to enable sequential downloading using only one connection and creating a single file, allowing the player to function properly. However, the player's fast-forward and rewind functions may not be available. While many players support direct playback of m3u8 files, they may not bypass certain download restrictions or decrypt content like FileCentipede does, unless I make a new video player. In the absence of a perfect solution, I will work on addressing this issue in the future.

Thank you for your feedback, and I will strive to resolve this problem in subsequent updates."

and this was my response :

"Mr Filecxx , you explained to us : "unless I make a new video player.", oh we thank you very much ! we know it's a very difficult and complicated and complex task and we don't want to tire you out, so if potplayer or vlc player doesn't cannot "bypass certain download restrictions or decrypt content", perhaps the source code of these open source and powerful video players could help to find a solution or add patches or fix evental bugs with playback.....:

https://github.com/KikoPlayProject/KikoPlay

https://github.com/zaps166/QMPlay2

https://github.com/coslyk/moonplayer

https://github.com/vzhd1701/gridplayer

https://github.com/tsl0922/ImPlay

https://github.com/mpc-qt/mpc-qt

https://github.com/mpvnet-player/mpv.net

https://github.com/smplayer-dev/smplayer

https://github.com/422658476/MPV-EASY-Player

AminBhst commented 3 months ago

https://github.com/AminBhst/brisk/issues/42#issuecomment-2034422293

trimechee commented 3 months ago

Hello Mr @AminBhst , i talked to the developer of FileCentipede about this probleme and this is his answer....maybe it can help to add the great video streaming capability :

"For streaming media, the use of a single thread or multiple threads for downloading makes no difference. During the download process, the downloader creates independent files for each segment locally, which are then merged into a single file after downloading. This is why the file cannot be played. To resolve this, I can add an option in the future to enable sequential downloading using only one connection and creating a single file, allowing the player to function properly. However, the player's fast-forward and rewind functions may not be available. While many players support direct playback of m3u8 files, they may not bypass certain download restrictions or decrypt content like FileCentipede does, unless I make a new video player. In the absence of a perfect solution, I will work on addressing this issue in the future.

Thank you for your feedback, and I will strive to resolve this problem in subsequent updates."

and this was my response :

"Mr Filecxx , you explained to us : "unless I make a new video player.", oh we thank you very much ! we know it's a very difficult and complicated and complex task and we don't want to tire you out, so if potplayer or vlc player doesn't cannot "bypass certain download restrictions or decrypt content", perhaps the source code of these open source and powerful video players could help to find a solution or add patches or fix evental bugs with playback.....:

https://github.com/KikoPlayProject/KikoPlay

https://github.com/zaps166/QMPlay2

https://github.com/coslyk/moonplayer

https://github.com/vzhd1701/gridplayer

https://github.com/tsl0922/ImPlay

https://github.com/mpc-qt/mpc-qt

https://github.com/mpvnet-player/mpv.net

https://github.com/smplayer-dev/smplayer

https://github.com/422658476/MPV-EASY-Player

AminBhst commented 3 months ago

Ah I now understand what you mean by streaming. This is also how brisk works btw. If by streaming you mean playing the file as its downloading using its temp files, it's not gonna work with the current design of the download core. I will also need to implement a sequential writing mode for it to work properly. I didn't quite understand what the developer meant by "they may not bypass certain download restrictions or decrypt content like FileCentipede does". I don't know what decryption and restrictions he is referring to but aside from that, it is possible. The only problem is that I'm not sure if brisk will be able to append new bytes to the main file as it's being played (I don't know if the file will be locked by a video player). I will have to investigate that to ensure that it can be achieved. But writing an embedded video player is out of the question lol. It's way too much work for a feature that is typically not expected of a download manager.

trimechee commented 3 months ago

We understand, thank you :) I just talked about that just as suggestion filecentped code could maybe be a source of inspiration if this functionality is planned to be implemented in the future....i think the mos important feature is to able to detect videos because with the download speed, the downloading happens faster and faster so yes sequential donwload is not a very important function :)

trimechee commented 3 months ago

I just say "maybe it can help to add the great video streaming capability " just to copy paste the title of the issue as is, apparently the title of the issue was changed, the old title was play files while downloading.... and FDM (free download manager) added this function of sequentiel download in its very latest version so this function seems more and more popular among users because FDM has put a vote on its forum where users vote for the features they want to be added to FDM.....

given the download speed and improvement of the internal download managers of browsers, it seems people mainly use the donwload managers to download video streaming....

trimechee commented 3 months ago

"streaming capability", means often websites or web browsers limit the quality of the video buffer to 30 seconds, 60 seconds even if the video is in high quality and the internet connection is weak which leads to jerky lag....except on YouTube which has optimized its codecs AV1, vp9..... I cannot playback HD or 1080 p videos on streaming sites and sometimes only HD quality is offered and not standard quality....so a download manager with sequential downloading would perhaps allow to have the comfort of viewing 1080p streaming video even with a weak internet connection without waiting for the download to finish and without needing to take out an expensive internet package....but we understand it's complicated and that's not the hardly if it's tiring :) people say the famous extension videodonwloadhelper adds a qr code on the downloaded video so it becomes more and more difficult to download videos via free program....and we thank you for having planned this function to download the videos! 💯 🥇

AminBhst commented 3 months ago

Actually it's not that difficult to implement. It takes some adjustments to create a modified version of the download core to write files sequentially which could be used later on based on the app settings. If video players don't lock the file, it should hopefully go smoothly. But if it requires modifications to an existing video player or writing a video player myself, it's not gonna be planned.

trimechee commented 3 months ago

Ohh interesting ! Thank you so much :) yes we use already our favourite video players like qmplay2 and potplayler and moonplayer.....and we hope there will be not need to use other media players to play the files donwloaded by download managers ! 👍 💯