Skip to content

Input a video web page url, transcribe the video without downloading it.

Notifications You must be signed in to change notification settings

YinlongDai/Web_Video2Text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

Web_Video2Text

Now supports videos on both Youtube and BiliBili

Input a video web page url, transcribe the video without downloading it.

Preparation

根据 https://github.com/openai/whisper 的指引下载 Whisper:

pip install -U openai-whisper

For Youtube:

Get yt-dlp from https://github.com/yt-dlp/yt-dlp. Guides for installation could be found on the same page, no more operation needed. This is only for fetching Youtube video urls.

For BiliBili:

在视频网页,查看网页代码F12 -> Network -> Name 并复制'user_agent'到'headers':

headers = {
    'user-agent': 'copy your user-agent here'}

以上步骤只需要进行一次。

Arguments

--model: Choose from the models provided by Whisper, tiny/base/small/medium/large. Notice this downloads any model that is not on your local device, and medium/large models are huge.

--language: Choose language to transcribe, by defualt it will be set to 'NULL', which auto-detects language. Check https://github.com/openai/whisper for supported languages.

--save: Choose whether to save the transcription as a file. It will be saved to the same directory where the code is located.

--stamp: Choose whether to include time stamps in transcribed files.

完成后直接运行并输入视频网址:

python video2text_public.py
video_url: 'your url'

The transcription will appear in terminal. output 有时候抓取b站会很久都没有响应,解决方案是多跑几遍。

About

Input a video web page url, transcribe the video without downloading it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages