Closed antonizoon closed 8 years ago
Thank you for your contribution!
But I'm sorry that BiliDan not initially designed for "downloading". For example, BiliDan does not plan to support multi-thread download or auto-resuming.
However you can try Biligrab to suit your need. It is capable to call aria2
, axel
, or wget
to download your video in high resolution.
Are you planning to isolate the downloader, so that we can make the downloader independent on MPV? If we stick on the existing architecture, it will be fairly hard to add some features such as auto-resuming, batch downloading, or parallel downloading.
By the way, do you have any knowledge on making a GUI? Many users asked about the GUI thing, but I am not good at it.
It is not hard: how about we start with refactoring Biligrab?
2015年12月20日星期日,Star Brilliant notifications@github.com 写道:
Are you plan to isolate the download function, so that we can make the downloader independent on MPV? If we stick on the existing architecture, it will be fairly hard to add some features such as auto-resuming, batch downloading, or parallel downloading.
By the way, do you have any knowledge on making a GUI? Many users asked about the GUI thing, but I am not good at it.
— Reply to this email directly or view it on GitHub https://github.com/m13253/BiliDan/pull/42#issuecomment-166135490.
For a GUI, I recommend trying out PySide/PyQt, or Kivy. These are good cross-platform GUI toolkits and can even be packed together to work on Windows. But that doesn't particularly address the mpv dependency.
Another method is to stream it to a quick python webserver at http://localhost:5000, from which an HTML5 webapp is generated to play the streaming video. This removes the mpv dependency, as the browser should already have good support for streaming.
I may not be able to spend much more time working on this myself though. I slapped the mod together in one night on request from one of my organization members, but he was too inept to figure out how to install it, as his system used avconv...
For running a webserver, refer to: https://github.com/cnbeining/ABPlayerHTML5-Py .
Since I am not in the Mainland, what I focused on is to maximize my connection with multiple threads(the more the better), which makes combining ABPlayerHTML5-Py
and Biligrab
impossible.
If we are using some single-thread downloader, it is possible that we can make a join: but we have had you-get
right now...
I've developed a new version of the Bilibili archiver that utilizes Biligrab instead. However, the work done in this fork was instrumental to understanding how to scrape Bilibili metadata for reupload in an item, so thanks a lot.
I noticed that while BiliDan is able to play videos with comments, it is also capable of recording them with comments. Thus, I have added a video/comment download feature to BiliDan.
mpv
has an argument called--stream-dump=<file>
, which can be used to record streaming video to a folder, so I added the argument-r/--record
that will set this onmpv
. Helpfully, the video will only download, not display, when this argument is used.I also save the BiliBili API's
video_metadata
inbilibili-av<AID>-<CID>.json
, with the original URL attached, just for the sake of archival.As a result, the user will get three files when using the
--record
argument:In fact, when you use
mpv
or VLC to play the video, since the.ass
file has the same filename, the player will automatically load the comments.One minor issue is that
mpv
shows an error even though the file was downloaded correctly. Somehow we need to catch and silence that error, because there is no problem at all.