ffmpeg $(youtube-dl -g 'https://www.youtube.com/watch?v=zSyNOO_gvUY' | sed "s/.*/-ss 02:04 -i &/") -t 02:18 - c .mkv 복사
~에서youtube-dl 명령을 사용하여 비디오의 일부를 다운로드하는 방법은 무엇입니까?
저는 Windows, 우분투 앱, Shell Bash를 사용합니다.
모든 것이 정상입니다. bash에서 ffmpeg 및 youtube-dl을 업데이트하고, win에서 이전 경로의 환경 경로를 삭제하고, 컴퓨터를 다시 시작했습니다.
답변1
명령 은 youtube-dl
두 줄, 두 개의 URL을 인쇄합니다.
$ youtube-dl -g 'https://www.youtube.com/watch?v=zSyNOO_gvUY'
https://r2---sn-vuxbavcx-5uik.googlevideo.com/videoplayback?expire=1607567417&ei=2TPRX-SuI8T9gAeIyZLQCQ&ip=2a02%3A587%3A2842%3A6400%3Ab699%3Afa7c%3A31d8%3A6cc1&id=o-AAcjRTgUT2T-n1BD565dtHH13_Xk-rO4Y2wTc2RccIYd&itag=299&aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303&source=youtube&requiressl=yes&mh=UA&mm=31%2C29&mn=sn-vuxbavcx-5uik%2Csn-4g5e6nsz&ms=au%2Crdu&mv=m&mvi=2&pl=36&initcwndbps=561250&vprv=1&mime=video%2Fmp4&ns=PEzwRrxyZjziBZla7m7o0IkF&gir=yes&clen=74141495&dur=355.499&lmt=1587833453663441&mt=1607545489&fvip=2&keepalive=yes&c=WEB&txp=5432432&n=b2QaOqTbS7KW643y&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhANg2PZbMdOJ_jxHP9wg4wWgv0XuTMLYG0580c5iND6reAiEAya8-pi3kNi9x-Wrn9OUxgxjMkigiAQs5SPqXltstnKg%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgHwvGqlKR2YhHl4yuUKgGvBppwVqycYkM5nceha8moZcCIFmZOzbLeha7kZZiHgVPoAd3J5fAEeP7uoQs9v0oFoaR&ratebypass=yes
https://r2---sn-vuxbavcx-5uik.googlevideo.com/videoplayback?expire=1607567417&ei=2TPRX-SuI8T9gAeIyZLQCQ&ip=2a02%3A587%3A2842%3A6400%3Ab699%3Afa7c%3A31d8%3A6cc1&id=o-AAcjRTgUT2T-n1BD565dtHH13_Xk-rO4Y2wTc2RccIYd&itag=251&source=youtube&requiressl=yes&mh=UA&mm=31%2C29&mn=sn-vuxbavcx-5uik%2Csn-4g5e6nsz&ms=au%2Crdu&mv=m&mvi=2&pl=36&initcwndbps=561250&vprv=1&mime=audio%2Fwebm&ns=PEzwRrxyZjziBZla7m7o0IkF&gir=yes&clen=4768230&dur=355.601&lmt=1587833261724868&mt=1607545489&fvip=2&keepalive=yes&c=WEB&txp=5431432&n=b2QaOqTbS7KW643y&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAMsIKPks0_5GLe3qFb-_W1BUX-nhaRNE5LwusgGeEBW9AiEAnVmnSL6hsH5TGdelWPXn7SbreG0rHCj9jx9Rzutk6Ko%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgHwvGqlKR2YhHl4yuUKgGvBppwVqycYkM5nceha8moZcCIFmZOzbLeha7kZZiHgVPoAd3J5fAEeP7uoQs9v0oFoaR&ratebypass=yes
~처럼닉 D비디오와 오디오 모두 다음과 같이 두 개의 URL이 필요하다는 점을 지적했습니다.답변. 따라서 다음이 작동합니다(대신 참고하세요 .mkv
) .mp4
.
ffmpeg $(youtube-dl -g 'https://www.youtube.com/watch?v=zSyNOO_gvUY' | sed 's/.*/-ss 02:04 -i &/') -to 02:18 -c copy out.mkv
또한 이를 인용해서는 안 $()
됩니다. 왜냐하면 이것으로부터 두 가지 주장이 형성될 것이기 때문입니다.