* fix(stream-gears): write the cached GOP on disconnect, flush before the segment hook The httpflv loop kept the current GOP in `flv_tags_cache` and only wrote it when the next keyframe arrived. On EOF, a 30 s read timeout or a parse error the function returned and the cache was dropped, so every disconnect, reconnect and stream end lost the last 1-10 s. The loop now runs in an inner function; whatever way it exits, the complete tags in the cache are written before the original result (including the error) is returned. `FlvFile` / `TsFile` renamed the `.part` file and ran the segment hook before the old `BufWriter` was flushed, so the hook (FileValidator, upload) could see a truncated file, and a failed final flush (disk full) was swallowed. Both now go through `finish()`: flush and check the error, then rename, then run the hook. `create_new` returns the flush error; `Drop` logs it with `error!`. Tests: the rolling-segment test now expects 120 keyframes on disk (was 119) and checks the size seen by the hook equals the final size; new cases for a stream that ends cleanly, a read that times out and a parse error; a TS hook size test; a failed-flush test. Ref #1726 * feat(recorder): default to mesio when no downloader is configured Rooms without a `downloader` setting followed the plugin hint, which is stream-gears for almost every platform. They now use mesio: its FLV output carries `onMetaData.keyframes` and every segment starts at timestamp 0, so players can seek; it also records HEVC / Enhanced-FLV and HLS fMP4, which stream-gears cannot. Only the hint mapping in `core/live.rs` changes; an explicit `stream-gears` keeps using stream-gears, and plugins that hint streamlink / yt-dlp are unaffected. `DownloaderRuntime::from_type` no longer has a catch-all arm. `ffmpeg-external` and `ffmpeg-internal` used to fall into it and silently run stream-gears; both now run ffmpeg (external segmenting, same as `ffmpeg`). The arm for streamlink / yt-dlp / ytarchive, which need the live stream and are built in `downloader_runtime`, is listed explicitly and logs a warning. WebUI, README, sample configs and CHANGELOG now say mesio is the default and list the behaviour differences: the container follows the source (HLS fMP4 is saved as .mp4), files are written under their final name without `.part`, and Douyu Wangsu reconnects leave a 2.6-5.8 s overlap between segments. Ref #1726 * feat(mesio): pass segment duration and size to the segment callback mesio's segment-complete callback reports the duration and byte size of each closed file, but biliup only logged them and built `SegmentInfo` with the path and index. `SegmentInfo` gains `duration_secs` / `size_bytes` (None for the other downloaders) and mesio fills them in. The end-to-end mesio test checks the reported size equals the file size on disk. Ref #1726 * fix(recorder): parse segment_time the same way in every downloader `segment_time` was read three different ways. stream-gears indexed `parts[1]` / `parts[2]` directly, so "3600" or "01:00" panicked the download task (and an unparsable hour silently became 1); mesio returned 0 for anything that was not HH:MM:SS and silently recorded without time splits; ffmpeg got the raw string and accepted both forms. `parse_segment_time` follows ffmpeg's duration syntax (`[HH:]MM:SS[.frac]` or plain seconds; minutes and seconds below 60 when colons are used), so all three downloaders now agree. stream-gears and mesio share `DownloadConfig::segment_time_limit`: 0 means no time split for both (mesio already did this; stream-gears used to split at every keyframe), and a value that still cannot be parsed logs a warning and records without time splits instead of panicking or being ignored silently. The time-range clamp uses the same parser, so "3600" is shortened near the window end like "01:00:00". Ref #1726 * feat(webui): enter file_size as a number with an MB/GB unit The config still stores bytes. The control converts with 1024 (the same sizes Windows Explorer shows), keeps an untouched value byte-exact even when it is not a round MB/GB, and re-picks the unit when the form value is replaced from outside. In the streamer override, clearing a value that was already set now saves null (no size split for that streamer); before, Semi dropped the emptied key and the old value stayed. Clearing something typed in the same session still falls back to inheriting the global setting. * fix(webui): keep the file_size unit beside the number in narrow modals
349 lines
23 KiB
YAML
349 lines
23 KiB
YAML
######### 全局录播与上传设置 #########
|
||
#------录制与下载------#
|
||
### 选择全局默认的下载插件,默认为mesio。可选:
|
||
### 1.streamlink(streamlink配合ffmpeg混合下载模式,适合用于下载hls_fmp4与hls_ts流,因为streamlink支持多线程拉取)。
|
||
### 使用该模式下载flv流时,将会仅使用ffmpeg。请手动安装streamlink以及ffmpeg。
|
||
### 2.ffmpeg(纯ffmpeg下载),请手动安装ffmpeg。
|
||
### 3.stream-gears(不支持 HEVC 与 hls_fmp4,FLV 时间戳沿用源站原值)
|
||
### 4.mesio(默认。内置 rust-srec 引擎,进程内下载 FLV/HLS 并修复时间戳、注入关键帧索引,支持按大小/时长分段,无需额外安装)
|
||
#downloader: ffmpeg
|
||
### 录像单文件大小限制,单位Byte,超过此大小分段下载,下载回放时无法使用
|
||
file_size: 2621440000
|
||
### 录像单文件时间限制,格式'00:00:00'(时分秒),超过此大小分段下载,如需使用大小分段请注释此字段
|
||
#segment_time: '01:00:00'
|
||
### 小于此大小的视频文件将会被过滤删除,单位MB
|
||
filtering_threshold: 20
|
||
### 自定义录播文件名模板, 支持变量 {streamer}:你在配置里设置的直播间名 %Y-%m-%d %H_%M_%S:创建文件的时间, {title}:当场直播间标题
|
||
### 如果上传文件,文件名必须包含设定的模板名。其次,如果没有定义时间,文件分片可能会互相覆盖,所以推荐设置时间来避免分段文件名重复。
|
||
#filename_prefix: '{streamer}%Y-%m-%d %H_%M_%S{title}'
|
||
### 视频分段后处理并行
|
||
### 开启后无法保证分段后处理先后执行顺序
|
||
#segment_processor_parallel: false
|
||
|
||
#------上传------#
|
||
### 选择全局默认上传插件,Noop为不上传,但会执行后处理,可选bili_web,biliup-rs(默认值)
|
||
#uploader: Noop
|
||
### b站提交接口,默认自动选择,可选web,client
|
||
#submit_api: client
|
||
### b站上传线路选择,默认自动选择最优线路。目前可手动切换为alia(海外), bda2(大陆), bldsa(大陆), tx(大陆), txa(海外), estx(大陆), akbd(大陆)
|
||
lines: AUTO
|
||
### 单文件并发上传数,未达到带宽上限时,增大此值可提高上传速度(不要设置过大,部分线路限制为8,如速度不佳优先调整上传线路)
|
||
threads: 3
|
||
|
||
#------杂项------#
|
||
### 检测到主播下播后延迟再次检测,单位:秒,避免特殊情况提早启动上传导致漏录
|
||
### 当delay不存在时,默认延迟时间为0秒,没有快速上传的需求推荐设置5分钟(300秒)或按需设置。若设置的延迟时间超过60秒,则会启用分段检测机制,每隔60秒进行一次开播状态的检测。
|
||
delay: 300
|
||
### 平台检测间隔时间,单位:秒。比如虎牙所有主播检测完后会等待30秒 再去从新检测
|
||
event_loop_interval: 30
|
||
### 单个主播检测间隔时间,单位:秒。比如虎牙有10个主播,每个主播会间隔10秒检测
|
||
checker_sleep: 10
|
||
### 线程池1大小,负责下载事件。应设置为比主播数量略大,如不确定请设置为999。
|
||
pool1_size: 3
|
||
### 线程池2大小,负责上传事件。应设置为比主播数量略大,如不确定请设置为999。
|
||
pool2_size: 3
|
||
### 检测源码文件变化间隔,单位:秒,检测源码到变化后,程序会在空闲时自动重启
|
||
check_sourcecode: 15
|
||
|
||
|
||
|
||
######### 各平台录播设置 #########
|
||
### 使用直播间封面作为投稿封面。此封面优先级低于单个主播指定的自定义封面。(目前支持bilibili,twitch,youtube。直播封面将会保存于cover文件夹下,上传后自动删除)
|
||
#use_live_cover: true
|
||
|
||
#------斗鱼------#
|
||
### 如遇到斗鱼录制卡顿可以尝试切换线路。可选以下线路
|
||
### tctc-h5(备用线路4), tct-h5(备用线路5), ali-h5(备用线路6), hw-h5(备用线路7), hs-h5(备用线路13)
|
||
#douyu_cdn: tct-h5
|
||
### 强制hs流使用构造链接,防止部分海外机器遇到频繁断流。使用时需修改douyu_cdn为hs-h5
|
||
#douyu_force_hs: true
|
||
### 录制斗鱼弹幕,默认关闭
|
||
#douyu_danmaku: false
|
||
### 斗鱼自选画质
|
||
### 刚开播可能没有除了原画之外的画质 会先录制原画 后续视频分段(仅ffmpeg streamlink)时录制设置的画质
|
||
### 0 原画,4 蓝光4m,3 超清,2 高清
|
||
#douyu_rate: 0
|
||
|
||
#------虎牙------#
|
||
### 如遇到虎牙录制卡顿可以尝试切换线路。可选以下线路
|
||
### AL(阿里云 - 直播线路3), TX(腾讯云 - 直播线路5), HW(华为云 - 直播线路6), WS(网宿), HS(火山引擎 - 直播线路14), AL13(阿里云), HW16(华为云), HY(星域云 - 直播线路66)
|
||
#huya_cdn: AL
|
||
#huya_cdn_fallback: false
|
||
### 录制虎牙弹幕,默认关闭
|
||
#huya_danmaku: false
|
||
### 虎牙自选录制码率
|
||
### 可以避免录制如20M的码率,每小时8G左右大小,上传及转码耗时过长。
|
||
### 20000(蓝光20M), 10000(蓝光10M), 8000(蓝光8M), 2000(超清), 500(流畅)
|
||
### 设置为10000则录制小于等于蓝光10M的画质
|
||
#huya_max_ratio: 10000
|
||
|
||
#------抖音------#
|
||
### 录制抖音弹幕,默认关闭
|
||
#douyin_danmaku: false
|
||
### 抖音自选画质
|
||
### 刚开播可能没有除了原画之外的画质 会先录制原画 后续视频分段(仅ffmpeg streamlink)时录制设置的画质
|
||
### origin 原画,uhd 蓝光,hd 超清,sd 高清,ld 标清,md 流畅
|
||
### 没有选中的画质则会自动选择相近的画质优先低清晰度
|
||
#douyin_quality: origin
|
||
|
||
|
||
#------哔哩哔哩------#
|
||
### 录制BILIBILI弹幕,下载器为ffmpeg,streamlink时效果最优,默认关闭
|
||
# bilibili_danmaku: false
|
||
### 录制的弹幕信息中包含发送者昵称、用户UID,同时保存醒目留言、上舰、礼物信息。仅 bilibili_danmaku 开启时生效,默认关闭(实验性质:可能与弹幕转ass工具不兼容)
|
||
# bilibili_danmaku_detail: false
|
||
### 录制B站服务器返回的原始弹幕信息,方便有技术能力的用户对主播弹幕数据进行统计。仅 bilibili_danmaku 开启时生效,默认关闭,开启后弹幕文件会每隔5分钟写入一次(实验性质:可能导致弹幕文件巨大)
|
||
# bilibili_danmaku_raw: false
|
||
### 哔哩哔哩直播流协议.可选 stream(flv流),hls_ts(ts流)与hls_fmp4(fmp4流),默认为stream
|
||
### 仅国内IP可以解析到fmp4流。海外IP只能获取到flv流(ov05与ov07)和ts流(ov105)
|
||
### 由于fmp4出现需要一定时间,或者某些小主播(大部分只有原画选项的主播)无fmp4流。
|
||
### 目前的策略是,如果开播时间小于60s,将会反复尝试获取fmp4流,如果没获取到就回退到flv流。
|
||
### 由于ffmpeg只能单线程下载,并且stream-gears录制有问题,所以目前fmp4流只能使用streamlink+ffmpeg混合模式。
|
||
#bili_protocol: stream
|
||
### 哔哩哔哩直播优选CDN,默认无,支持同时填入多个CDN节点。
|
||
#bili_cdn: [cn-gotcha204, ov-gotcha05]
|
||
### 哔哩哔哩强制真原画(仅限TS与FMP4流的 cn-gotcha01 CDN,且 bili_qn >= 10000),默认为关闭
|
||
### 不保证可用性。当无法强制获取到真原画时,将会自动回退到二压原画。
|
||
#bili_force_source: false
|
||
### 自定义哔哩哔哩直播API,用于获取指定区域(大陆或者海外)的直播流链接,默认使用官方API。
|
||
#bili_liveapi: 'https://api.live.bilibili.com'
|
||
### 自定义fmp4流获取不到时,重新获取一遍flv直播流的api,默认不重新使用其他api重新获取一遍。
|
||
### 海外机器玩法:bili_liveapi设置为能获取大陆直播流的API,并将bili_fallback_api设置为官方API,然后优选fmp4流并使用streamlink下载器,最后设置优选cn-gotcha208,ov-gotcha05两个节点。
|
||
### 大陆机器玩法:bili_liveapi取消注释保持默认使用官方API,并将bili_fallback_api设置为能获取到海外节点API,然后优选fmp4流并使用streamlink下载器,最后设置优选cn-gotcha208,ov-gotcha05两个节点。
|
||
### 这样大主播可以使用cn208的fmp4流稳定录制(海外机如需可以通过自建dns优选指定线路的cn208节点),没有fmp4流的小主播也可以会退到ov05录制flv流。
|
||
#bili_fallback_api: 'https://api.live.bilibili.com'
|
||
### CDN自动Fallback开关,默认为关闭,例如海外机器优选ov05之后,如果ov05流一直无法下载,将会自动fallback到ov07进行下载。
|
||
#bili_cdn_fallback: false
|
||
### 强制替换cn-gotcha01(叔叔自建)为指定的自选域名组(可多个域名,请用逗号分隔)
|
||
### 完整CDN列表请参考 https://rec.danmuji.org/dev/bilibili-cdn/ 中"B站视频云"的部分
|
||
### 如果海外机器需要使用此功能,需要在bili_liveapi中指定国内的反代API来获取cn-gotcha01的节点信息。
|
||
### 海外机的玩法:配合一个国内的机器(例如便宜的腾讯云,阿里云等等)自建反代api.live.bilibili.com。或者使用https://docs.qq.com/doc/DV2dvbXBrckNscU9x 此处提供的公用反代API。
|
||
### 如果海外机到联通或者移动网络线路还不错,就可以参考***完整CDN列表***选取一些联通或者移动的节点并填入下面
|
||
### 每次会随机返回填入的其中一个线路,并且会自动判断所填入的节点是否可用
|
||
#bili_replace_cn01: [cn-tj-cm-01-03, cn-gddg-cm-01-03, cn-fjqz-cm-01-03, cn-jssz-cm-02-26, cn-gdfs-ct-01-12]
|
||
### 哔哩哔哩自选画质
|
||
### 刚开播可能没有除了原画之外的画质 会先录制原画 后续视频分段(仅ffmpeg streamlink)时录制设置的画质
|
||
### 30000 杜比,20000 4K,10000 原画,401 蓝光(杜比),400 蓝光,250 超清,150 高清,80 流畅,0 B站默认(多数情况下是蓝光 400)
|
||
### 没有选中的画质则会自动选择相近的画质
|
||
#bili_qn: 10000
|
||
|
||
#------YouTube------#
|
||
### 设置偏好的YouTube下载封装格式
|
||
### 默认不限制
|
||
### 请务必记得安装ffmpeg
|
||
### 如无特殊需求不建议筛选封装格式 特别是录制直播时 多数直播mp4都是不可用的
|
||
### bilibili支持 mp4 mkv webm 无需筛选也能上传
|
||
### 支持同时添加多个编码,自动优选指定编码格式里最好的画质/音质版本。
|
||
### 视频:其中avc编码最高可以下载到1080p的内容,vp9最高可以下载到4k以及很少部分8k内容,av01画质不是所有视频都有,但是大部分8k视频的8k画质只有av01编码。
|
||
### 音频:其中opus编码最高48KHz采样,mp4a(AAC)最高44.1KHz采样,理论上来说opus音质会更好一些。
|
||
### 如需指定封装格式,请按以下推荐设置。mp4:avc+mp4a;av01+mp4a. mkv:vp9+mp4a,avc+opus. webm:av01+opus;vp9+opus.
|
||
#youtube_prefer_vcodec: "av01|vp9|avc" ### 可用av01,vp9,avc
|
||
#youtube_prefer_acodec: "opus|mp4a" ### 可用opus,mp4a
|
||
### 设置偏好的YouTube下载最高纵向分辨率
|
||
### 默认不限制
|
||
### 可以用此限制画质
|
||
### 例如设置为1080最高只会下载1080P画质
|
||
#youtube_max_resolution: 1080
|
||
### 限制单个视频的最大大小
|
||
### 默认不限制
|
||
### 直播无此功能
|
||
### 注意:此参数优先级高于分辨率设置,并且不包括音频部分的大小,仅仅只是视频部分的大小。
|
||
### 此功能在一部分视频上无法使用 推荐使用画质限制不开启此功能
|
||
#youtube_max_videosize: "10G" ###参考格式,例如100M,5G,10G。
|
||
### 仅下载该日期之后的视频
|
||
### 默认不限制
|
||
#youtube_after_date: '20220201'
|
||
### 仅下载该日期之前的视频(可与上面的youtube_after_date配合使用,构成指定下载范围区间)
|
||
### 默认不限制
|
||
#youtube_before_date: '20230501'
|
||
### 是否下载直播 默认开启
|
||
### 关闭后将忽略直播下载(可以下载回放) 避免网络被风控(有些网络只能下载回放无法下载直播)的时候还会尝试下载直播
|
||
### 大量下载时极易风控 如对实时性要求不高推荐关闭
|
||
### 一个人同时开启多个直播只能录制最新录制的那个
|
||
### 如果正在录制直播将无法下载回放
|
||
### 例如录制https://www.youtube.com/@NeneAmanoCh/streams,关闭后将忽略正在直播
|
||
#youtube_enable_download_live: true
|
||
### 是否下载直播回放 默认开启
|
||
### 关闭后将忽略直播下载回放(不会影响正常的视频下载) 只想录制直播的可以开启
|
||
### 如果正在下载回放将无法录制直播
|
||
### 例如录制https://www.youtube.com/@NeneAmanoCh/streams,关闭后将忽略直播回放
|
||
#youtube_enable_download_playback: true
|
||
|
||
#------Twitch直播录制------#
|
||
### 录制Twitch弹幕,默认关闭
|
||
#twitch_danmaku: false
|
||
### 去除Twitch广告功能,默认开启
|
||
### 这个功能会导致Twitch录播分段,因为遇到广告就自动断开了,这就是去广告。若需要录播完整一整段可以关闭这个,但是关了之后就会有紫色屏幕的CommercialTime
|
||
### 还有一个不想视频分段的办法是去花钱开一个Turbo会员,能不看广告,然后下面的user里把twitch的cookie填上,也能不看广告,自然就不会分段了
|
||
#twitch_disable_ads: true
|
||
|
||
#------TwitCasting------#
|
||
### 录制Twitch弹幕,默认关闭
|
||
#twitcasting_danmaku: false
|
||
### TwitCasting直播间密码 (可在录制主播设置中为主播单独配置)
|
||
#twitcasting_password:
|
||
|
||
######### 录制主播设置 #########
|
||
streamers:
|
||
### 最小配置示例
|
||
星际2Stats拔本神族天梯第一视角:
|
||
url:
|
||
- https://www.twitch.tv/kimdaeyeob3
|
||
### 完整可选配置示例
|
||
星际2INnoVation吕布卫星人族天梯第一视角:
|
||
url:
|
||
- https://www.twitch.tv/innovation_s2
|
||
- https://www.panda.tv/1160340 #填写多个url时只能同时下载一个,如需多个同时下载请单独配置
|
||
title: "{title}第一视角%Y-%m-%d{streamer}{url}" ### 自定义标题的时间格式, {title}代表当场直播间标题 {streamer}代表在本config里面设置的主播名称 {url}代表设置的该主播的第一条直播间链接
|
||
tid: 171 ### 投稿分区码,171为电子竞技分区
|
||
#tid_v2: 2102 ### 新版投稿分区码 tid_v2(可选;例如摄影摄像二级分区)
|
||
copyright: 2 ### 1为自制
|
||
#cover_path: /cover/up.jpg ###封面
|
||
description: |- ### 支持strftime, {title}, {streamer}, {url}占位符。注:此处请注意缩进,确保所有文字的缩进都与"视频简介"相同或者更多。
|
||
视频简介: {title} %Y-%m-%d %H:%M:%S
|
||
{streamer}主播直播间地址:{url}
|
||
---
|
||
Powered By biliup - Github: https://github.com/biliup/biliup
|
||
### 如需在简介中@别人 请使用以下模版
|
||
# credits:
|
||
# - username: 需要@的用户名
|
||
# uid: 需要@的uid
|
||
#description: |-
|
||
# 视频简介: {title} %Y-%m-%d %H:%M:%S
|
||
# {streamer}主播直播间地址:{url}
|
||
# 【@credit】
|
||
# ---
|
||
# Powered By biliup - Github: https://github.com/biliup/biliup
|
||
dynamic: '#空间动态#'
|
||
#dtime: 14_400 ### 设置延时发布时间,距离提交大于2小时,格式为时间戳
|
||
#dolby: 0 ### 是否开启杜比音效, 1为开启
|
||
#hires: 0 ### 是否开启Hi-Res, 1为开启
|
||
#charging_pay: 0 ### 是否开启充电面板, 1为开启
|
||
#no_reprint: 0 ### 自制声明, 1为未经允许禁止转载
|
||
#is_only_self: 0 ### 可见范围, 1为仅自己可见
|
||
#extra_fields: '<json 字符串>' ### 实现添加自定义提交参数,示例:extra_fields: '{"watermark": {"state": 0}}'自制稿件关闭水印,参数自抓 @https://github.com/biliup/biliup-rs/pull/171
|
||
uploader: biliup-rs ### 覆盖全局默认上传插件,Noop为不上传,但会执行后处理
|
||
#filename_prefix: '{streamer}%Y-%m-%d %H_%M_%S{title}' ### 覆盖全局自定义录播文件命名规则
|
||
user_cookie: cookies.json ### 使用指定的账号上传
|
||
#use_live_cover: true ### 获取BILIBILI直播间封面并作为投稿封面。此封面优先级低于单个主播指定的自定义封面。
|
||
tags:
|
||
- biliup
|
||
- 视频标签
|
||
#time_range: "[\"2025-03-26T16:00:00.000Z\",\"2025-03-27T15:59:59.000Z\"]" ### 录制时间范围 ISO 8601 格式的时间数组字符串
|
||
#excluded_keywords: ### 如果房间名包含关键词,则停止或不录制该场直播,每个关键词需单独一行
|
||
#preprocessor: ### 开始下载直播时触发,将按自定义顺序执行自定义操作 注:preprocessor仅支持shell指令
|
||
#- run: sh ./run.sh, ### 执行任意命令,等同于在shell中运行,preprocessor输出的数据为JSON格式,包含主播名字(name)、开播地址(url)和开播时间(start_time)(时间戳)
|
||
### 分段时触发 返回当前生成的文件
|
||
#segment_processor:
|
||
# - run: sh ./run.sh, ### 执行任意命令,等同于在shell中运行
|
||
### 准备上传直播时触发,将按自定义顺序执行自定义操作 注:downloaded_processor仅支持shell指令
|
||
### room_title 在重启后会丢失 默认为当前配置名称
|
||
### start_time end_time在重启后会丢失时间 默认为当前时间
|
||
### 如果对上传的视频进行修改需要保证和filename_prefix命名规则一致 会自动检测上传
|
||
### 上传顺序会按照文件创建时间排序
|
||
#downloaded_processor:
|
||
# - run: sh ./run.sh, ### 执行任意命令,等同于在shell中运行,downloaded_processor输出的数据为JSON格式,包含主播名字(name)、直播间地址(url)、直播间标题(room_title)、开播时间(start_time)(时间戳)、下播时间(end_time)(时间戳)和视频列表(file_list)
|
||
#postprocessor: ### 上传完成后触发,将按自定义顺序执行自定义操作 当postprocessor不存在时 默认执行删除文件操作
|
||
# - run: echo hello! ### 执行任意命令,等同于在shell中运行,视频文件路径作为标准输入传入
|
||
# - mv: backup/ ### 移动文件到backup目录下
|
||
# - run: python3 path/to/mail.py ### 执行一个 Python 脚本,可以用来发送邮件等。自动发信通知脚本示例 https://biliup.github.io/biliup/Guide.html#%E4%B8%8A%E4%BC%A0%E5%AE%8C%E6%88%90%E5%90%8E%E5%8F%91%E9%80%81%E9%82%AE%E4%BB%B6%E9%80%9A%E7%9F%A5
|
||
# - run: sh ./run.sh ### 执行一个shell脚本,用途多样,主要调用系统内的cli工具。自动上传网盘脚本示例 https://gist.github.com/UVJkiNTQ/ae4282e8f9fe4e45b3144b57605b4178
|
||
#- rm ### 删除文件,为默认操作
|
||
#format: mp4 ### 视频保存格式。如需使用mp4格式,必须切换downloader为ffmpeg或者streamlink,youtube不支持。
|
||
#opt_args: ### ffmpeg参数
|
||
# - '-ss'
|
||
# - '00:00:16' # 跳过开始的16秒
|
||
override: # 覆盖全局配置
|
||
downloader: 'sync-downloader'
|
||
bili_qn: 30000
|
||
|
||
|
||
|
||
################### 用户cookie ###################
|
||
### 在使用下方配置时,请确认下方第一行(user:)取消了注释。
|
||
#user:
|
||
#------哔哩哔哩------#
|
||
#------哔哩哔哩获取直播流用COOKIE------#
|
||
### 请至少填入以下项目。推荐使用 biliup-rs(https://github.com/biliup/biliup-rs) 来获取。
|
||
#bili_cookie: 'SESSDATA=none;bili_jct=none;DedeUserID__ckMd5=none;DedeUserID=123;'
|
||
### 同时存在时,优先使用文件。只支持 biliup-rs 生成的文件。
|
||
#bili_cookie_file: 'cookies.json'
|
||
### 重要!!!
|
||
### 因 哔哩哔哩 修改画质策略,不使用 Cookie 只返回最低画质,故不再控制 Cookie 使用与否。
|
||
### 将 Cookie 传入不信任的第三方API可能会导致账号被盗,自行斟酌使用。
|
||
|
||
#------抖音------#
|
||
### 如需要录制抖音www.douyin.com/user/类型链接或被风控
|
||
### 请在此填入cookie需要__ac_nonce、__ac_signature、sessionid的值请不要将所有cookie填入
|
||
#douyin_cookie: '__ac_nonce=123456; __ac_signature=123456; sessionid=123456;'
|
||
|
||
#------Twitch直播录制------#
|
||
### 只在录制twitch直播时才生效
|
||
### 如录制Twitch时遇见视频流中广告过多的情况,可尝试在此填入cookie,可以大幅减少视频流中的twitch广告(经测试需要在该Cookie所属账号开了TwitchTurbo会员才有用)
|
||
### 该cookie有过期风险,cookie过期后会在日志输出警告请及时更换cookie,cookie失效的情况下后续录制将忽略cookie(我个人用了四个月都没过期)
|
||
### twitch_cookie获取方式:在浏览器中打开Twitch.tv,F12调出控制台,在控制台中执行:document.cookie.split("; ").find(item=>item.startsWith("auth-token="))?.split("=")[1]
|
||
### twitch_cookie需要在downloader= "ffmpeg"时候才会生效
|
||
#twitch_cookie: 'aisjdoiuasdoihansdoh3ooi209'
|
||
|
||
#------YouTube------#
|
||
### 使用Cookies登陆YouTube帐号,可用于下载会限,私享等未登录账号无法访问的内容。请使用Netscape 格式的 Cookies 文本路径。
|
||
### 可以使用Chrome插件Get cookies.txt来生成txt文件。
|
||
#youtube_cookie: 'cookiejar.txt'
|
||
|
||
#------NICO------#
|
||
### The email or phone number associated with your Niconico account
|
||
### 【翻译:与您的Niconico账户相关的电子邮件或电话号码】
|
||
#niconico-email: xxxxxxxxxxx
|
||
### The password of your Niconico account
|
||
### 【翻译:您的Niconico账户的密码】
|
||
#niconico-password: xxxxxxxxxxxx
|
||
### Value of the user-session token. Can be used as an alternative to providing a password.
|
||
### 【翻译:用户会话令牌的值。可作为提供密码的替代方法。】
|
||
#niconico-user-session: xxxxxxxxxxx
|
||
### Purge cached Niconico credentials to initiate a new session and reauthenticate.
|
||
### 【翻译:清除缓存的 Niconico 凭证,以启动一个新的会话并重新认证。】
|
||
#niconico-purge-credentials: xxxxxxxxxxxx
|
||
|
||
#------AfreecaTV------#
|
||
### 录制部分直播时需要登陆
|
||
### AfreecaTV 用户名
|
||
#afreecatv_username: xxxxxxxxxxx
|
||
### AfreecaTV 密码
|
||
#afreecatv_password: xxxxxxxxxxxx
|
||
|
||
|
||
|
||
######### 日志输出配置 #########
|
||
LOGGING:
|
||
formatters:
|
||
verbose:
|
||
format: '%(asctime)s %(filename)s[line:%(lineno)d](Pid:%(process)d Tname:%(threadName)s) %(levelname)s %(message)s'
|
||
datefmt: '%Y-%m-%d %H:%M:%S'
|
||
simple:
|
||
format: '%(filename)s%(lineno)d[%(levelname)s]Tname:%(threadName)s %(message)s'
|
||
handlers:
|
||
console:
|
||
level: DEBUG
|
||
class: logging.StreamHandler
|
||
formatter: simple
|
||
stream: ext://sys.stdout
|
||
file:
|
||
level: DEBUG
|
||
class: biliup.common.log.SafeRotatingFileHandler
|
||
when: W0
|
||
interval: 1
|
||
backupCount: 1
|
||
filename: ds_update.log
|
||
formatter: verbose
|
||
encoding: utf-8
|
||
root:
|
||
handlers: [ console ]
|
||
level: INFO
|
||
loggers:
|
||
biliup:
|
||
handlers: [ file ]
|
||
level: INFO
|
||
|
||
### 默认通过网页接口上传,可选通过操作chrome上传,此时需要填写chromedriver路径
|
||
#chromedriver_path: /usr/local/bin/chromedriver
|