Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从 YouTube 影片中提取时间戳与字幕 #20

Open
antfu opened this issue Oct 9, 2024 · 5 comments
Open

从 YouTube 影片中提取时间戳与字幕 #20

antfu opened this issue Oct 9, 2024 · 5 comments
Assignees

Comments

@antfu
Copy link
Member

antfu commented Oct 9, 2024

也许我们可以利用 YouTube 影片的时间戳来对其与校对歌词的时间,同时也也许也可以提供自动汇入字幕

需要调研一下 YT 是否有提供此 API

@eepson123tw
Copy link
Collaborator

eepson123tw commented Oct 9, 2024

Youtube Api

You can no longer enable 3rd party caption contributions support.google.com/youtube/answer/6052538?hl=en. And without them you get a 403 "The permissions associated with the request are not sufficient to download the caption track.

so sad.
https://stackoverflow.com/questions/30653865/downloading-captions-always-returns-a-403#comment49414961_30660549

@antfu
Copy link
Member Author

antfu commented Oct 14, 2024

This is trickier than I thought. YT doesn't expose such information for us to consume easily. As this is a good-to-have additional feature, I'd say we close it for now to focus on other stuff. We could bring this back later if we found a better solution.

@antfu antfu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
@ilyaliao ilyaliao reopened this Oct 19, 2024
@ilyaliao ilyaliao self-assigned this Oct 19, 2024
@oliver139
Copy link
Collaborator

Saw a website can do so:
https://www.downloadyoutubesubtitles.com/

And it actually also tells that there is a native way to view the transcript:

Recently youtube has changed the transcript location. To get the transcript of a video, first of all go to the video page and look underneath the video where the description is. Expand the description section with "more" button and you will see the "show transcript" button. Click on it, and the transcript of the video will be shown right hand side of the video. You may also hide the timestamps with the 3 dots menu at the upper right side of the transcription. Now you can copy and paste the subtitles as text! Of course this process is much faster if you use our trusted subtitle downloader application.

May be we can take a look on this way?

@ilyaliao
Copy link
Member

I've actually already implemented a tool to extract captions from YouTube, but I'm currently unsure how to integrate it into maru. This might need to wait for further planning.

@oliver139
Copy link
Collaborator

I was just also thinking if using yt-dlp with youtube-dl-exec would also help as well lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants