英文/English
基於Node.js 和Electron 開發的Bilibili 影片、彈幕下載器。
目前實現的功能:
cid
取得視訊彈幕的內容並支援轉換下載格式( .xml
或.ass
).mp4
及.m4a
),支援斷點續傳目前的限制:
ffmpeg
等工具進行合併你需要安裝Git 和Node.js(以及npm)來執行本程式。
本程式的一個重要依賴是Electron,如果你所在的網路環境受到限制,請先設定如下環境變量,再執行後面的指令,以透過鏡像安裝之:
export ELECTRON_MIRROR= " https://npmmirror.com/mirrors/electron/ " # 一般的 *NIX 命令行
set ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ # 使用 Windows CMD 命令行
$env :ELECTRON_MIRROR= " https://npmmirror.com/mirrors/electron/ " # Windows PowerShell
在命令列輸入:
# 克隆这个仓库
git clone https://github.com/stevenjoezhang/bilibili-downloader.git
# 进入目录
cd bilibili-downloader
# 安装依赖
npm install
# 启动!
npm start
如果一切正常,會開啟一個名為「Mimi Downloader」的新視窗。輸入影片連結(例如https://www.bilibili.com/video/BV1z4411p7Lq ),依照指示即可下載影片。
下載完成後,可以使用ffmpeg 將視訊和音訊合併為一個檔案:
ffmpeg -i input_video.mp4 -i input_audio.m4a -c:v copy -c:a aac output_file.mp4
請參閱https://trac.ffmpeg.org/wiki/Concatenate
嗶哩下載姬及其跨平台版本也是不錯的選擇,能夠在掃碼登入後下載高清影片。
如果你需要更強大的命令列工具,那麼以下倉庫或許有幫助。如果需要下載高清視頻,可能需要手動設定Cookie。
這裡還有一些其它的庫和瀏覽器插件供參考。
GNU General Public License v3
http://www.gnu.org/licenses/gpl-3.0.html
This software is distributed under the GPL-3.0 license.
In particular, please be aware that
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "ASUSN WITHOUT RANEA. BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM ISLDEF YSU. SHOU REPAIR OR CORRECTION.
Translated to human words:
In case your use of the software forms the basis of copyright infringement, or you use the software for any other illegal purposes, the authors cannot take any responsibility for you.
We only ship the code here, and how you are going to use it is left to your own discretion.