YouTube 영상 & 자막 다운로드

로그
실행 경로·버전 (PHP가 실제로 쓰는 풀 경로)

shell_exec: 사용 가능

Python
/usr/bin/python3.14
Python 3.14.4

ffmpeg (yt-dlp --ffmpeg-location)
/usr/bin/ffmpeg
ffmpeg version 8.0.1-3ubuntu2 Copyright (c) 2000-2025 the FFmpeg developers

Node.js (yt-dlp YouTube용 --js-runtimes)
/usr/bin/node
v22.22.1

yt-dlp (python -m yt_dlp --version)
/usr/bin/python3.14: No module named yt_dlp

프로젝트 루트
/var/sites/youtube.oreolab.co.kr

Linux 서버: 윈도우에서 만든 venv 를 올리면 동작하지 않습니다. 서버에서 python3 -m venv venv && ./venv/bin/pip install -r requirements.txt 로 다시 만들고, 필요 시 chmod +x venv/bin/python venv/bin/python3 (실행 안 될 때만).

셸 테스트: ./test-ytdlp.sh 또는 test-ytdlp.bat (윈도우)

다운로드 목록

20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!
생성일: 2026-08-01 13:17:07
20260731_131601-NASA's engineer just revealed Starship Heat Shield is “Dead End”. Elon Musk LAUGH
생성일: 2026-07-31 13:16:38
20260626_133538-[#놀면뭐하니_] 좋다...🎧귀가 저절로 청소 되는 진주의 맑은 음색에 코러스까지 더해지니 여기가 무릉도원이세요... 💕 _#박진주 MBC240928방송
생성일: 2026-06-26 13:36:15
20260624_062521-2024 11 14 생일 케잌일반동영상
생성일: 2026-06-24 06:26:11
20260529_134640-Blue Origin's Rocket Explosion - How Bad Is It_
생성일: 2026-05-29 13:47:26
20260522_131339-SpaceX canceled Starship Flight 12 due to UNEXPECTED Issue! The Next Launch Date is…
생성일: 2026-05-22 13:14:28
20260512_125249-SpaceX Starship Full WDR Test Completed to Launch in Days! Here’s What Comes Next until Liftoff…
생성일: 2026-05-12 12:53:35
20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB
생성일: 2026-05-06 14:35:49
20260506_141259-Starship B19 Installed on Pad for Do-Over Static Fire Today...New Flight 12 Launch Date Delay!
생성일: 2026-05-06 14:13:47
20260506_133924-Starship Flight 12 New Trajectory to Do Something Never Done Before...It Made All Others Obsolete
생성일: 2026-05-06 13:40:13
화면의 마지막 다운로드 요약 · log/youtube_job.log
마지막 다운로드 결과 요약

2026-08-01 13:17:13 — Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!

항목결과비고
동영상 (mp4/webm) 성공 mp4 생성됨
한글 자막 실패/없음 한글 자막 파일 없음. 업로더 한글 자막이 없어도 유튜브 자동 번역(ko·ko-KR 등)은 받아질 수 있어야 하며, yt-dlp README 기준 youtube:skip=translated_subs 를 쓰지 않는 한 번역 자막 추출은 기본 활성입니다. 계속 실패 시 HTTP 429, 또는 자막 URL에 필요한 PO Token(youtube:po_token=클라이언트.subs+값 — Wiki PO-Token-Guide)을 환경변수 YOUTUBE_YTDLP_EXTRACTOR_ARGS 로 넘길 수 있습니다. (로그에 HTTP 429가 보이면 해당 언어가 없어서가 아니라 요청 한도일 가능성이 큼) (로그에 한글 자막 관련 경고 참고)
영문 자막 성공 영문 자막 파일(.en / .en-US 등 .srt) 생성됨

yt-dlp 실행 명령 (한 줄 · 환경 변수·바이너리·경로는 Ubuntu에서 그대로 실행 가능하도록 절대 경로 우선 · 다운로드 단계에서 실행한 명령입니다.)

SSL_CERT_FILE='/var/sites/youtube.oreolab.co.kr/venv/lib/python3.14/site-packages/certifi/cacert.pem' REQUESTS_CA_BUNDLE='/var/sites/youtube.oreolab.co.kr/venv/lib/python3.14/site-packages/certifi/cacert.pem' CURL_CA_BUNDLE='/var/sites/youtube.oreolab.co.kr/venv/lib/python3.14/site-packages/certifi/cacert.pem' '/var/sites/youtube.oreolab.co.kr/venv/bin/python' -m yt_dlp --ffmpeg-location '/usr/bin/ffmpeg' --js-runtimes 'node:/usr/bin/node' --remote-components ejs:github --cache-dir '/var/sites/youtube.oreolab.co.kr/.cache' --ignore-errors --sleep-requests 2 --sleep-subtitles 8 --merge-output-format mp4 --write-subs --write-auto-subs --sub-langs 'ko.*,en.*,-en-orig' --convert-subs srt -f 'bestvideo[height<=720]+bestaudio/best[height<=720]/best[height<=720]/best' -o '/var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.%(ext)s' 'https://youtu.be/KuhrQaLRf_Y?si=hQOkY9drMX7I2vd0' 2>&1

yt-dlp 메시지 (ERROR/WARNING 발췌)

  • WARNING: Your yt-dlp version (2026.03.17) is older than 90 days!
  • WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
  • WARNING: Unable to download video subtitles for 'ko': HTTP Error 429: Too Many Requests
  • WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
  • WARNING: Unable to download video subtitles for 'ko-en-US': HTTP Error 429: Too Many Requests
  • WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
  • WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
  • WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see https://github.com/yt-dlp/yt-dlp#impersonation for information on installing the required dependencies
  • WARNING: Unable to download video subtitles for 'en-en-US': HTTP Error 429: Too Many Requests
  • WARNING: Skipping embedding ko subtitle because the file is missing
  • WARNING: Skipping embedding ko-en-US subtitle because the file is missing
  • WARNING: Skipping embedding en-en-US subtitle because the file is missing

출력 끝부분 (참고)

WARNING: Your yt-dlp version (2026.03.17) is older than 90 days!
         It is strongly recommended to always use the latest version.
         You installed yt-dlp with pip or using the wheel from PyPi; Use that to update.
         To suppress this warning, add --no-update to your command/config.
[youtube] Extracting URL: https://youtu.be/KuhrQaLRf_Y?si=hQOkY9drMX7I2vd0
[youtube] KuhrQaLRf_Y: Downloading webpage
[youtube] Sleeping 2.0 seconds ...
[youtube] KuhrQaLRf_Y: Downloading android vr player API JSON
[info] KuhrQaLRf_Y: Downloading subtitles: ko, ko-en-US, en-US, en, en-en-US
[info] KuhrQaLRf_Y: Downloading 1 format(s): 398+251
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.ko.vtt
[download] Sleeping 8.00 seconds ...
WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see  https://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies
WARNING: Unable to download video subtitles for 'ko': HTTP Error 429: Too Many Requests
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.ko-en-US.vtt
[download] Sleeping 8.00 seconds ...
WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see  https://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies
WARNING: Unable to download video subtitles for 'ko-en-US': HTTP Error 429: Too Many Requests
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.en-US.vtt
[download] Sleeping 8.00 seconds ...
WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see  https://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies
[download] Destination: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.en-US.vtt

[download]    1.00KiB at  Unknown B/s (00:00:00)
[download]    3.00KiB at    2.32MiB/s (00:00:00)
[download]    7.00KiB at    3.11MiB/s (00:00:00)
[download]   15.00KiB at    1.98MiB/s (00:00:00)
[download]   31.00KiB at  637.01KiB/s (00:00:00)
[download]   34.93KiB at  678.15KiB/s (00:00:00)
[download] 100% of   34.93KiB in 00:00:00 at 154.77KiB/s
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.en.vtt
[download] Sleeping 8.00 seconds ...
WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see  https://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies
[download] Destination: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.en.vtt

[download]    1.00KiB at  970.90KiB/s (00:00:00)
[download]    3.00KiB at    1.57MiB/s (00:00:00)
[download]    7.00KiB at    2.46MiB/s (00:00:00)
[download]   15.00KiB at    1.92MiB/s (00:00:00)
[download]   31.00KiB at    1.66MiB/s (00:00:00)
[download]   63.00KiB at    1.53MiB/s (00:00:00)
[download]  127.00KiB at    1.60MiB/s (00:00:00)
[download]  204.37KiB at    2.06MiB/s (00:00:00)
[download] 100% of  204.37KiB in 00:00:00 at 840.82KiB/s
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260801_131601-Starship Rescue Mission! How SpaceX will save Ship 40 from the waves!.en-en-US.vtt
[download] Sleeping 8.00 seconds ...
WARNING: The extractor specified to use impersonation for this download, but no impersonate target is available. If you encounter errors, then see  https://github.com/yt-dlp/yt-dlp#impersonation  for information on installing the required dependencies
WARNING: Unable to download video subtitles for 'en-en-US': HTTP Error 429: Too Many Requests
[SubtitlesConvertor] Converting subtitles
WARNING: Skipping embedding ko subtitle because the file is missing
WARNING: Skipping embedding ko-en-US subtitle because the file is...[truncated 15144 bytes]