성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
Digital Stories
방명록
최근 덧글
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
[정성태] 만드실 수 있습니다. 단지, Unity 엔진 내의 스크립트와 W...
[공진영] 안녕하세요 좋은글 감사합니다. 현재 제가 wpf로 관제 모...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
기타
생각의 전환
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 ext='true' style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>youtube-dl을 파이썬으로 실행하는 방법</h1> <p> 오랜만에 실행했더니 오류가 발생하는군요. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\youtube-dl> <span style='color: blue; font-weight: bold'>youtube-dl.exe -F ...[생략]...</span> [youtube] ...: Downloading webpage [youtube] ...: Downloading player 6f20102c ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. </pre> <br /> 재미있는 건, youtube-dl.exe가 있는 c:\temp 디렉터리가 아닌, 다른 곳에서 PATH를 연결해 실행하면 아예 Windows Defender에 의해 오류가 발생한다는 점입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp2> youtube-dl Access is denied. This app can't run on your PC To find a version for your PC, check with the software publisher. </pre> <br /> 지난번에는 업데이트해서 해결(<a target='tab' href='https://www.sysnet.pe.kr/2/0/12907'>1</a>, <a target='tab' href='https://www.sysnet.pe.kr/0/0/519'>2</a>)했는데, 이번에는 저게 최신 버전이었고 해결이 안 됩니다. ^^;<br /> <br /> <hr style='width: 50%' /><br /> <br /> 그런데, github에 가보면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > ytdl-org/youtube-dl ; <a target='tab' href='https://github.com/ytdl-org/youtube-dl/issues'>https://github.com/ytdl-org/youtube-dl/issues</a> </pre> <br /> 딱히 이에 관한 이슈가 없습니다. 음... 저만 문제 있는 걸까요? ^^ 암튼, 문제가 있으니 일단 youtube-dl.exe는 포기하고 github에 있는 소스코드를 직접 다운로드해 실행해 볼까 하는데요,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> <span style='color: blue; font-weight: bold'>git clone https://github.com/ytdl-org/youtube-dl.git</span> </pre> <br /> 일단, 파이썬으로 해보면 실행은 되는데 <a target='tab' href='https://github.com/ytdl-org/youtube-dl/issues/30976'>찝찝한 경고</a> 하나가 남습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\youtube-dl> <span style='color: blue; font-weight: bold'>python -m youtube_dl -F [...영상_id...]</span> [youtube] ...: Downloading webpage [youtube] ...: Downloading player 6f20102c WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "E:\git_clone\youtube-dl\youtube_dl\extractor\youtube.py", line 1672, in _n_descramble raise ExtractorError('Unhandled exception in decode') youtube_dl.utils.ExtractorError: Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ) [info] Available formats for ...: format code extension resolution note 249 webm audio only tiny 54k , webm_dash container, opus (48000Hz), 1.56MiB 250 webm audio only tiny 71k , webm_dash container, opus (48000Hz), 2.06MiB 140 m4a audio only tiny 129k , m4a_dash container, mp4a.40.2 (44100Hz), 3.72MiB 251 webm audio only tiny 138k , webm_dash container, opus (48000Hz), 3.97MiB 278 webm 256x144 144p 23k , webm_dash container, vp9, 30fps, video only, 704.15KiB 160 mp4 256x144 144p 27k , mp4_dash container, avc1.4d400c, 30fps, video only, 803.63KiB 242 webm 426x240 240p 28k , webm_dash container, vp9, 30fps, video only, 825.20KiB 133 mp4 426x240 240p 49k , mp4_dash container, avc1.4d4015, 30fps, video only, 1.42MiB 243 webm 640x360 360p 39k , webm_dash container, vp9, 30fps, video only, 1.15MiB 134 mp4 640x360 360p 87k , mp4_dash container, avc1.4d401e, 30fps, video only, 2.51MiB 18 mp4 640x360 360p 215k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz) (best) </pre> <br /> 상관없습니다. 일단, 포맷은 구했으니 어쨌든 다운로드만 된다면 ^^ 우린 모든 걸 용서할 수 있습니다. 다행히 ^^ 아래와 같이 다운로드도 잘됩니다. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\youtube-dl> <span style='color: blue; font-weight: bold'>python -m youtube_dl [...영상_id...] -f 140</span> [youtube] ...: Downloading webpage WARNING: [youtube] Unable to decode n-parameter: download likely to be throttled (Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "E:\git_clone\youtube-dl\youtube_dl\extractor\youtube.py", line 1672, in _n_descramble raise ExtractorError('Unhandled exception in decode') youtube_dl.utils.ExtractorError: Unhandled exception in decode; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. ) [dashsegments] Total fragments: 1 [download] Destination: [...생략...].m4a [download] 100% of 3.72MiB in 01:19 WARNING: ...: writing DASH m4a. Only some players support this container. Install ffmpeg or avconv to fix this automatically. </pre> <br /> 위의 경우는 오디오만 받았기 때문에 마지막에 경고가 나왔는데요, 괜찮습니다. 요즘 m4a 재생 못하는 프로그램이 없기 때문인데, 뭣하면 <a target='tab' href='https://www.sysnet.pe.kr/2/0/12923'>ffmpeg를 이용해 그냥 mp3로</a> 바꿔도 됩니다. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> ffmpeg -i [...생략...].m4a [...생략...].mp3 // 시간 제어: 8초 전의 내용 삭제 c:\temp> ffmpeg -ss 8 -i [...생략...].m4a [...생략...].mp3 </pre> <br /> 언제까지 youtube-dl이 안정적으로 실행될지는 알 수 없으나, 일단 ^^ 오늘은 여기까지만.<br /> </p><br /> </div>
첨부파일
스팸 방지용 인증 번호
2415
(왼쪽의 숫자를 입력해야 합니다.)