---
title: "#유튜브 #자막 #스크립트 #자동번역 §지식베이스 #학습"
url: "https://notes.junghanacs.com/notes/20230927T140000"
author: "Junghan Kim"
date: "2023-09-27T14:00:00+09:00"
lastmod: "2025-03-18T00:00:00+09:00"
tags: ["emacs","learning","packages","scripts","translation","youtube"]
description: "유튜브 자막과 스크립트를 자동 번역해 학습용 지식베이스로 활용하는 흐름을 구체적으로 모색한 기록."
---

> [!abstract] 이 노트에 대하여
> 
> 유튜브 자막과 스크립트를 가져와 자동 번역하고 학습 자료로 축적하는 흐름을 실험한다. 단순 시청을 넘어, 영상 내용을 텍스트 지식베이스로 전환하려는 학습 전략이 담겨 있다.

## BIBLIOGRAPHY

- “Jdepoix/Youtube-Transcript-Api.” 2025. <https://github.com/jdepoix/youtube-transcript-api>.
- “Yt-Dlp/Yt-Dlp.” 2025. <https://github.com/yt-dlp/yt-dlp>.

## 히스토리

-   [2025-03-18 Tue 11:01] 학습
-   [2023-09-27 Wed 17:19] 초기 Youtube script translation for learning

## 전체 그림을 만들어야 한다.

[2025-03-18 Tue 11:11]

<https://github.com/SqrtMinusOne/dotfiles/blob/master/Emacs.org?plain=1#L9052>

/home/junghan/sync/man/dotsamples/vanilla/sqrt-dotfiles-elfeed/Emacs.org

[|W11|2025-03-18 Tue|](https://notes.junghanacs.com/journal/20250317T000000#h-2025-03-18)를 보라.

## SRT / ASS VTT 자막 파일 다운로드 방법

[2023-09-27 Wed 17:19]

### youtube-transcript-api

([“Jdepoix/Youtube-Transcript-Api” 2025](https://notes.junghanacs.com/notes/20230927T140000#citeproc_bib_item_1))

-   youtube_transcript_api \_-G9EKaAyuI --languages en --format srt &gt; npm-en.srt
-   pip install youtube-transcript-api
-   <https://github.com/jdepoix/youtube-transcript-api>
    
    > This is a python API which allows you to get the transcript/subtitles for a given YouTube video. It also works for automatically generated subtitles and it does not require an API key nor a headless browser, like other selenium based solutions do!
    > 
    > 이것은 주어진 YouTube 동영상의 대본/자막을 가져올 수 있는 파이썬 API 입니다. 자동으로 생성된 자막에도 사용할 수 있으며 다른 셀레늄 기반 솔루션처럼 API 키나 헤드리스 브라우저가 필요하지 않습니다!

### yt-dlp

([“Yt-Dlp/Yt-Dlp” 2025](https://notes.junghanacs.com/notes/20230927T140000#citeproc_bib_item_2))

-   jj
-   yt-dlp --write-auto-sub --skip-download <https://www.youtube.com/watch%5C?v%5C=_-G9EKaAyuI>
-   yt-dlp --write-subs en <https://www.youtube.com/watch?v=HOBDzc1ME5M>
    ```text
    --write-subs                    Write subtitle file
    --no-write-subs                 Do not write subtitle file (default)
    --write-auto-subs               Write automatically generated subtitle file
                                    (Alias: --write-automatic-subs)
    --no-write-auto-subs            Do not write auto-generated subtitles
                                    (default) (Alias: --no-write-automatic-subs)
    --list-subs                     List available subtitles of each video.
                                    Simulate unless --no-simulate is used
    --sub-format FORMAT             Subtitle format; accepts formats preference,
                                    e.g. "srt" or "ass/srt/best"
    --sub-langs LANGS               Languages of the subtitles to download (can
                                    be regex) or "all" separated by commas, e.g.
                                    --sub-langs "en.*,ja". You can prefix the
                                    language code with a "-" to exclude it from
                                    the requested languages, e.g. --sub-langs
                                    all,-live_chat. Use --list-subs for a list
                                    of available language tags
    ```
-   

## 유튜브 스크립트 기반 지식 베이스 활용 방법 (with mpv, emacs)

Context: [2023-09-27 Wed 09:57]

[#학습](https://notes.junghanacs.com/meta/20231030T114800)을 중심에서 어떻게 방법을찾아봐야 하는가?

이렇게 하면 충분히 강력하다. 어떤가?!

번역은?! Immersive-Translate 에 파일을 넣고 돌리면 된다. 그러면 동작한다.

[2025-03-18 Tue 10:57] 스크린샷 읽어버림

-   Firefox Plugins : Enhancer for YouTube™
    -   채팅 숨기기, 관련 동영상 숨기기 등 불필요한 정보 차단
    -   광고 제거
-   Immersive-translate
    -   스크립트 번역 : 무제한 Deepl Chatgpt 등 커버

### mpv youtube subtitle

Context: [2023-09-26 Tue 17:47]

<~/mydotfiles/config-common/.config/mpv/mpv.conf>

-   O : time
-   J : sub

<https://youtu.be/_-G9EKaAyuI?si=JDKT_HzIwtTo35Wv>

youtube-sub-extractor-extract-subs

mpv-play-url

immersive-translate-auto-mode -- 이건 안된다.

`M-c 1` 타임 스템프랑 싱크가 된다.

### OFF 원하는 유튜브 검색해서 자막 영상 다운?!

Context: [2023-09-05 Tue 15:40]

이미 되는구나. 조금 더 나아간다면 좋긴 할텐데 욕심인가 싶다. 나의 데이타를 좀 더 모으자는 것이다.

-   youtube-dl 필수
