@youmixx

Как скачать видео с ютуб (музыку)?

Добрый вечер.

Мне нужно иметь возможность скачивать видео с ютуб.
Я могу сделать это не сложным путем, просто получить url на скачивание через
https://www.youtube.com/get_video_info?video_id=I6...

В ответ на это я получу вот что:
Array
(
[0] => Array
(
[itag] => 18
[url] => https://r2---sn-pivhx-n8vs.googlevideo.com/videoplayback?expire=1612918297&ei=udkiYI3_KMLoyAXF3q2QCg&ip=2a03%3Ac980%3Adead%3A1009%3A91%3A218%3A228%3A19&id=o-AJ7dkLYFYNYEqZFp4TA8_721q-h7fBBgQcUe2b4TDeq5&itag=18&source=youtube&requiressl=yes&mh=GP&mm=31%2C29&mn=sn-pivhx-n8vs%2Csn-n8v7kn7e&ms=au%2Crdu&mv=u&mvi=2&pl=48&vprv=1&mime=video%2Fmp4&ns=bVBIbhkVee0LHnoZaQXM_oYF&gir=yes&clen=75844420&ratebypass=yes&dur=1042.924&lmt=1608871121827338&mt=1612895510&fvip=12&c=WEB&txp=5530434&n=RcPJaPSw7z3Ek9X&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAI_e_1DFTin7i2x7Hm0tqOBZZbqKmdukC5ZM4sHRSmDgAiEApO6PkQNJvgDj1qPAvXVTXWbmq4ZLeuvAAhZNyR-UWjo%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRQIhAL5ecRcfQbyvmXO5Llp_acKWvQVG1fwZ-vOfNz1B60EeAiBGEQObs1JXJNr7ZkLToDR_RRV2X5gj4_s-inDB2ctH5Q%3D%3D
[bitrate] => 581810
[width] => 640
[height] => 360
[lastModified] => 1608871121827338
[contentLength] => 75844420
[quality] => medium
[fps] => 30
[qualityLabel] => 360p
[projectionType] => RECTANGULAR
[averageBitrate] => 581782
[audioQuality] => AUDIO_QUALITY_LOW
[approxDurationMs] => 1042924
[audioSampleRate] => 44100
[audioChannels] => 2
[title] => Минусы Бизнеса в США / Погряз В Бюрократии
[mime] => video/mp4
[format] => mp4
)

[1] => Array
(
[itag] => 22
[url] => https://r2---sn-pivhx-n8vs.googlevideo.com/videoplayback?expire=1612918297&ei=udkiYI3_KMLoyAXF3q2QCg&ip=2a03%3Ac980%3Adead%3A1009%3A91%3A218%3A228%3A19&id=o-AJ7dkLYFYNYEqZFp4TA8_721q-h7fBBgQcUe2b4TDeq5&itag=22&source=youtube&requiressl=yes&mh=GP&mm=31%2C29&mn=sn-pivhx-n8vs%2Csn-n8v7kn7e&ms=au%2Crdu&mv=u&mvi=2&pl=48&vprv=1&mime=video%2Fmp4&ns=bVBIbhkVee0LHnoZaQXM_oYF&ratebypass=yes&dur=1042.924&lmt=1608871145181017&mt=1612895510&fvip=12&c=WEB&txp=5532434&n=RcPJaPSw7z3Ek9X&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRAIgYGOmUToS9ZhfV_tkElz_oHk_yvUcZkwniH55B5boAJsCIErOH_g8ltnMXvYMYO7OUIsdrLaZocP47FuhCe6M_-yO&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AG3C_xAwRQIhAL5ecRcfQbyvmXO5Llp_acKWvQVG1fwZ-vOfNz1B60EeAiBGEQObs1JXJNr7ZkLToDR_RRV2X5gj4_s-inDB2ctH5Q%3D%3D
[bitrate] => 2169962
[width] => 1280
[height] => 720
[lastModified] => 1608871145181017
[quality] => hd720
[fps] => 30
[qualityLabel] => 720p
[projectionType] => RECTANGULAR
[audioQuality] => AUDIO_QUALITY_MEDIUM
[approxDurationMs] => 1042924
[audioSampleRate] => 44100
[audioChannels] => 2
[title] => Минусы Бизнеса в США / Погряз В Бюрократии
[mime] => video/mp4
[format] => mp4
)

)


Как-бы все хорошо, но если я попробую сделать тоже самое, но например с этим видео:
https://www.youtube.com/watch?v=DXGelmwqfm4

То уже получу такой ответ:
Array
(
[0] => Array
(
[itag] => 18
[bitrate] => 689985
[width] => 586
[height] => 360
[lastModified] => 1611090297798193
[contentLength] => 16980119
[quality] => medium
[fps] => 24
[qualityLabel] => 360p
[projectionType] => RECTANGULAR
[averageBitrate] => 689800
[audioQuality] => AUDIO_QUALITY_LOW
[approxDurationMs] => 196928
[audioSampleRate] => 44100
[audioChannels] => 2
[signatureCipher] =>
  • Вопрос задан
  • 128 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы