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 (윈도우)

다운로드 목록

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-05-06 14:35:51 — 송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB

항목결과비고
동영상 (mp4/webm) 성공 mp4 생성됨
한글 자막 성공 한글 자막 파일(.ko / .ko-KR 등 .srt) 생성됨
영문 자막 실패/없음 영문 자막 파일 없음. 업로더 자막·자동 생성 유무에 따라 en / en-US 등 코드가 다를 수 있음. 429는 속도 제한일 수 있음. (로그에 HTTP 429가 보이면 요청 한도일 수 있음) (로그에 영문 자막 관련 경고 참고)

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/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.%(ext)s' 'https://www.youtube.com/watch?v=xKRuSkwdy7g' 2>&1

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

  • 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': HTTP Error 429: Too Many Requests
  • WARNING: Skipping embedding en subtitle because the file is missing

출력 끝부분 (참고)

[youtube] Extracting URL: https://www.youtube.com/watch?v=xKRuSkwdy7g
[youtube] xKRuSkwdy7g: Downloading webpage
[youtube] Sleeping 2.0 seconds ...
[youtube] xKRuSkwdy7g: Downloading android vr player API JSON
[youtube] Sleeping 2.0 seconds ...
[youtube] xKRuSkwdy7g: Downloading player cb017549-main
[youtube] [jsc:node] Solving JS challenges using node
[youtube] Sleeping 2.0 seconds ...
[youtube] xKRuSkwdy7g: Downloading m3u8 information
[info] xKRuSkwdy7g: Downloading subtitles: ko-orig, ko, en
[info] xKRuSkwdy7g: Downloading 1 format(s): 398+251
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.ko-orig.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/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.ko-orig.vtt

[download]    1.00KiB at  Unknown B/s (00:00:10)
[download]    3.00KiB at    2.06MiB/s (00:00:10)
[download]    7.00KiB at    2.91MiB/s (00:00:10)
[download]   15.00KiB at    4.50MiB/s (00:00:10)
[download]   21.82KiB at    5.02MiB/s (00:00:10)
[download] 100% of   21.82KiB in 00:00:10 at 2.16KiB/s
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.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
[download] Destination: /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.ko.vtt

[download]    1.00KiB at  Unknown B/s (00:00:00)
[download]    3.00KiB at    2.54MiB/s (00:00:00)
[download]    7.00KiB at    3.40MiB/s (00:00:00)
[download]   15.00KiB at    4.96MiB/s (00:00:00)
[download]   21.82KiB at    5.43MiB/s (00:00:00)
[download] 100% of   21.82KiB in 00:00:00 at 145.43KiB/s
[info] Writing video subtitles to: /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.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
WARNING: Unable to download video subtitles for 'en': HTTP Error 429: Too Many Requests
[SubtitlesConvertor] Converting subtitles
WARNING: Skipping embedding en subtitle because the file is missing
Deleting original file /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.ko.vtt (pass -k to keep)
Deleting original file /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.ko-orig.vtt (pass -k to keep)
[download] Destination: /var/sites/youtube.oreolab.co.kr/down/20260506_143446-송성문, MLB 선발 데뷔전에서 제대로 사고쳤다! 역전 적시타 맹활약! #SPOTIME #MLB.f398.mp4

[download]   0.0% of   29.99MiB at  Unknown B/s ETA Unknown
[download]   0.0% of   29.99MiB at    1.88MiB/s ETA 00:16  
[download]   0.0% of   29.99MiB at    2.95MiB/s ETA 00:10
[download]   0.0% of   29.99MiB at    4.76MiB/s ETA 00:06
[download]   0.1% of   29.99MiB at    7.68MiB/s ETA 00:03
[download]   0.2% of   29.99MiB at   10.26MiB/s ETA 00:02
[download]   0.4% of   29.99MiB at    7.29MiB/s ETA 00:04
[download]   0.8% of   29.99MiB at    5.94MiB/s ETA 00:05
[download]   1.7% of   29.99MiB at    4.70MiB/s ETA 00:06
[download]   3.3% of   29.99MiB at    4.62MiB/s ETA 00:06
[download]   6.7% of   29.99MiB at    4.63MiB/s ETA 00:06
[download]  13.3% of   29.99MiB at    ...[truncated 3966 bytes]