← 返回
未分类 Key

video-to-md

视频转文字转换器。 该工具利用 使用 yt-dlp 下载其他网站视频,随后通过 faster-whisper 对音频进行转录。 适用场景: 当你需要将视频内容(B站/YouTube/本地文件)转换为文字稿或字幕时,请使用此工具。
Moncy
未分类 community v1.0.0 1 版本 99337.7 Key: 需要
★ 0
Stars
📥 150
下载
💾 15
安装
1
版本
#latest

概述

Video to Text

Convert video URLs or local files to text transcripts.

Usage

python3 scripts/video_to_text.py <video_url_or_local_file> [options]

Arguments

ArgumentDescriptionDefault
--------------------------------
urlVideo URL or local file path (required)-
-m, --modelWhisper model sizebase
-l, --languageSpecify language codeAuto-detect
-o, --outputOutput file pathPrint to terminal
--keep-filesKeep downloaded audio/video filesNo
--sessdataBilibili SESSDATAFrom config
--bili-jctBilibili bili_jctFrom config
--buvid3Bilibili buvid3From config

Model Selection

ModelSizeSpeedAccuracy
------------------------------
tiny~75MBFastestLowest
base~150MBFastBasic
small~500MBMediumGood
medium~1.5GBSlowVery Good
large~3GBSlowestBest

Examples

# Bilibili video (requires auth)
python3 scripts/video_to_text.py "https://www.bilibili.com/video/BVxxx"

# Specify Chinese language
python3 scripts/video_to_text.py "https://www.bilibili.com/video/BVxxx" -l zh

# Local file
python3 scripts/video_to_text.py "/path/to/video.mp4" -m small

# Save to file
python3 scripts/video_to_text.py "https://www.bilibili.com/video/BVxxx" -o result.txt

Supported Platforms

  • Bilibili (bilibili.com) - Requires auth
  • YouTube - via yt-dlp
  • TikTok/Douyin - via yt-dlp
  • Twitter/X - via yt-dlp
  • Any site supported by yt-dlp
  • Local files - supports mp4, wav, m4a, webm, mkv, etc.

Bilibili Auth Setup

Method 1: Config File

Edit BILIBILI_CREDENTIALS dict in the script:

BILIBILI_CREDENTIALS = {
    "sessdata": "your_sessdata",
    "bili_jct": "your_bili_jct",
    "buvid3": "your_buvid3"
}

Method 2: Command Line

python3 scripts/video_to_text.py "https://www.bilibili.com/video/BVxxx" \
    --sessdata "xxx" \
    --bili-jct "xxx" \
    --buvid3 "xxx"

How to Get Auth Info

  1. Login to Bilibili web (bilibili.com)
  2. Press F12 to open Developer Tools
  3. Application -> Cookies -> bilibili.com
  4. Copy these values:
    • SESSDATA
    • bili_jct
    • buvid3

WARNING: These are your login credentials. Don't share with others!

Installation

# Install dependencies
pip3 install bilibili-api-python yt-dlp faster-whisper aiohttp requests

# Ensure ffmpeg is installed
# Ubuntu/Debian: sudo apt install ffmpeg
# CentOS: sudo yum install ffmpeg

Dependencies

  • bilibili-api-python - Bilibili API
  • yt-dlp - Video download
  • ffmpeg - Audio/video processing
  • faster-whisper - Speech transcription
  • aiohttp - Async HTTP
  • requests - HTTP requests

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-04-11 22:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

bilibili-video-md

user_fe8721be
当用户提供哔哩哔哩(B站)视频链接时使用此技能(URL 包含 bilibili.com/video/ 或 BV 开头加字母数字)。自动化完整流程:从 B 站视频下载音频、使用 Coli ASR(sensevoice 模型)将音频转录为中文文
★ 0 📥 290

Get-note-md

user_fe8721be
|biji-note — B站视频链接转Markdown笔记 功能:给一个B站视频链接,自动完成AI分析并生成笔记,保存为Markdown文件到 F:\Open 使用方式: /biji-note https://www.bi
★ 0 📥 142

拆书

user_fe8721be
拆书技能,根据提供的书名+作者,使用多引擎搜索获取书籍信息,然后按照拆书模板进行内容拆解,并写入 Obsidian vault
★ 0 📥 251