All Projects → ForgQi → Bilibiliupload

ForgQi / Bilibiliupload

Licence: mit
Stream download and upload, not only for bilibili.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Bilibiliupload

Annie
👾 Fast and simple video download library and CLI tool written in Go
Stars: ✭ 16,369 (+6955.6%)
Mutual labels:  bilibili, download
Telegram Upload
Upload and download files from Telegram up to 2GiB using your account
Stars: ✭ 223 (-3.88%)
Mutual labels:  download, upload
Httptransfertasks
Cross Platform HTTP Transfers for downloading and uploading (supports background operations)
Stars: ✭ 87 (-62.5%)
Mutual labels:  download, upload
Dropbox Stream
Upload & Download streams for Dropbox
Stars: ✭ 35 (-84.91%)
Mutual labels:  download, upload
Pccold
douyu斗鱼 自动化工具 主播上线通知 & 直播视频自动录制 & 弹幕抓取
Stars: ✭ 152 (-34.48%)
Mutual labels:  douyu, download
Danmaku
live video comments protocol and platform api
Stars: ✭ 70 (-69.83%)
Mutual labels:  douyu, bilibili
Sjnetwork
SJNetwork is a high level network request tool based on AFNetworking and inspired on YTKNetwork.
Stars: ✭ 231 (-0.43%)
Mutual labels:  download, upload
Danmu
Python 弹幕包 A live danmu package for python
Stars: ✭ 661 (+184.91%)
Mutual labels:  douyu, bilibili
Fgdownloader
用于断点下载、任务队列、上传进度、下载进度
Stars: ✭ 143 (-38.36%)
Mutual labels:  download, upload
Bilibiliupload
Upload video to bilibili under command-line interface
Stars: ✭ 141 (-39.22%)
Mutual labels:  bilibili, upload
Flickrsync
A command line tool to synchronise, upload, download, pictures between the local file system and Flickr. Image hash signature of the picture is used to uniquely identify the image.
Stars: ✭ 14 (-93.97%)
Mutual labels:  download, upload
Bilibililiverecorder
pure-java B站/Acfun/斗鱼/虎牙/快手/抖音/YY/战旗/花椒 直播视频录制。仅需Java环境即可运行
Stars: ✭ 195 (-15.95%)
Mutual labels:  douyu, bilibili
Casync
Content-Addressable Data Synchronization Tool
Stars: ✭ 890 (+283.62%)
Mutual labels:  download, upload
Nodestream
Storage-agnostic streaming library for binary data transfers
Stars: ✭ 70 (-69.83%)
Mutual labels:  download, upload
Transit
Easy file uploading and downloading for Laravel 5.
Stars: ✭ 5 (-97.84%)
Mutual labels:  download, upload
Okhttps
如艺术一般优雅,像 1、2、3 一样简单,前后端通用,轻量却强大的 HTTP 客户端(同时支持 WebSocket 与 Stomp 协议)
Stars: ✭ 92 (-60.34%)
Mutual labels:  download, upload
Iina Plus
Extra danmaku support for iina. (iina 弹幕支持
Stars: ✭ 451 (+94.4%)
Mutual labels:  douyu, bilibili
Bililive Go
一个直播录制工具
Stars: ✭ 529 (+128.02%)
Mutual labels:  douyu, bilibili
Qliveplayer
A cute and useful Live Stream Player with danmaku support.
Stars: ✭ 105 (-54.74%)
Mutual labels:  douyu, bilibili
Ounotes
An Application built for students to access Notes , Question Papers , Syllabus and Resources for all Subjects of O.U (Osmania University) 📘👨‍🎓
Stars: ✭ 173 (-25.43%)
Mutual labels:  download, upload

bilibiliupload

GitHub

支持自动录制各大直播平台,上传直播录像到bilibili。

  • 自动选择上传线路,保证国内外vps上传质量
  • 可分别控制下载与上传并发量
  • 支持通过API上传与selenium操作浏览器上传两种方式

相关设置在config.yaml文件中,如直播间地址,b站账号密码

演示视频:BV1ip4y1x7Gi

使用准备

  1. 创建配置文件config.yaml,内容参照config(demo).yaml(或可调整配置后直接修改文件名)
  2. 下载 FFmpeg

1. Linux系统下使用方法:

方式一

  1. 安装pip
  2. 安装biliup:pip3 install git+https://github.com/ForgQi/[email protected]
  3. 启动:biliup start

方式二

依赖安装pip3 install -r requirements.txt

启动: ./Bilibili.py start

退出: ./Bilibili.py stop

重启: ./Bilibili.py restart

ps -A | grep .py 查看进程是否启动成功

2. docker使用 🔨

方式一

vim /host/path/config.yaml
docker run --name biliup -v /host/path:/opt -d docker.pkg.github.com/forgqi/bilibiliupload/caution

方式二

cd bilibiliupload
sudo docker build . -t sc2
sudo docker run -d sc2

进入容器 📦

sudo docker ps (找到你的imageId)
sudo docker exec -it imageId /bin/bash     

3. Windows系统下使用方法:

方式一

  1. 安装pip
  2. 安装biliup:pip3 install git+https://github.com/ForgQi/[email protected]
  3. 启动:biliup

方式二

图形界面版在release中下载AutoTool.msi进行安装
依赖安装pip3 install -r requirements.txt

命令行版
   启动:    python Bilibili.py

QQ群:837362626

使用建议

关于B站为什么不能多p上传
目前bilibili网页端是根据用户权重来限制分p数量的,权重不够的用户自动切换到客户端的提交接口。

用户等级大于3,且粉丝数>100,web端投稿不限制分p数量

国内vps网络费用较高,建议使用国外vps,根据机器的硬盘等资源设置合理并发量。

b站上传目前有两种模式,分别为bup和bupfetch模式。

  • bup:国内常用模式,视频直接上传到b站投稿系统。
  • bupfetch:目前见于国外网络环境,视频首先上传至第三方文件系统,上传结束后通知bilibili投稿系统,再由b站投稿系统从第三方系统拉取视频,以保证某些地区用户的上传体验。

bup模式支持的上传方式为upos,其线路有:

  • ws(网宿)
  • qn(七牛)
  • bda2(百度)

bupfetch模式支持的上传方式及线路有:

  1. kodo(七牛)
  2. gcs(谷歌)
  3. bos(百度)

国内基本选择upos模式的bda2线路。国外多为upos模式的ws和qn线路,也有bupfetch模式的kodo、gcs线路。bilibili采用客户端和服务器端线路探测相结合的方式,服务器会返回可选线路,客户端上传前会先发包测试选择一条延迟最低的线路,保证各个地区的上传质量。


Linux下以daemon进程启动,程序执行过程可查看日志文件。

登录有两种方案:

  • 操作浏览器模拟登录

  • 通过b站的OAuth2接口

对于滑动验证码可进行二值化、灰度处理找缺口计算移动像素,系统会上传分析你的拖动行为,模拟人操作轨迹,提供加速度、抖动等,如直接拖动到目标位置不能通过验证,提示:“拼图被怪物吃了”。滑动验证码系统会学习,需不断更新轨迹策略保证通过验证的成功率。
OAuth2接口要提供key,需逆向分析各端

线程池限制并发数,减少磁盘占满的可能性。检测下载情况卡死或者下载超时,重试三次保证可用性。代码更新后将在空闲时自动重启。

下载整合了ykdl、youtube-dl、streamlink,不支持或者支持的不够好的网站可自行拓展。 下载和上传模块插件化,如果有上传或下载目前不支持平台的需求便于拓展。

下载基类在engine/plugins/base_adapter.py中,拓展其他网站,需要继承下载模块的基类,加装饰器@Plugin.download

拓展上传平台,继承engine/plugins/upload/__init__.py文件中上传基类,加装饰器@Plugin.upload

实现了一套基于装饰器的事件驱动框架。增加其他功能监听对应事件即可,比如下载后转码:

# e.p.给函数注册事件
# 如果操作耗时请指定block=True, 否则会卡住事件循环
@event_manager.register("download_finish", block=True)
def transcoding(data):
    pass

Credits

  • Thanks ykdl, youtube-dl, streamlink provides downloader.

类似项目:
ZhangMingZhao1 :StreamerHelper

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].