kkdai / youtube

Download Youtube Video in Golang
MIT License
3.37k stars 433 forks source link

How to download 1080p with audio? #273

Open atsushinee opened 1 year ago

atsushinee commented 1 year ago
.\youtubedr.exe info -v ZDfeSgVc9Hs

2022/11/19 19:07:24 GET https://youtube.com/embed/ZDfeSgVc9Hs?hl=en
2022/11/19 19:07:26 200 OK
2022/11/19 19:07:26 GET https://youtube.com/s/player/041a7965/player_ias.vflset/en_US/base.js
2022/11/19 19:07:26 200 OK
2022/11/19 19:07:26 POST https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
2022/11/19 19:07:26 200 OK
Title:       [Steven]价格行为是什么? 如何正确学习价格行为? 总览先导课 Price Action
Author:      罗晟Criss的交易工作室
Duration:    9m56s

+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
| ITAG | FPS |  VIDEO  |  AUDIO  |  AUDIO   | SIZE [MB] | BITRATE |                  MIMETYPE                  |
|      |     | QUALITY | QUALITY | CHANNELS |           |         |                                            |
+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
|  299 |  60 | 1080p60 |         |        0 |      18.6 |  262548 | video/mp4; codecs="avc1.64002a"            |
|  298 |  60 | 720p60  |         |        0 |      12.2 |  172077 | video/mp4; codecs="avc1.640020"            |
|  303 |  60 | 1080p60 |         |        0 |      14.7 |  207463 | video/webm; codecs="vp9"                   |
|  136 |  30 | 720p    |         |        0 |      10.2 |  143796 | video/mp4; codecs="avc1.64001f"            |
|  302 |  60 | 720p60  |         |        0 |      10.7 |  150730 | video/webm; codecs="vp9"                   |
|  247 |  30 | 720p    |         |        0 |       9.1 |  128502 | video/webm; codecs="vp9"                   |
|  135 |  30 | 480p    |         |        0 |       5.8 |   81676 | video/mp4; codecs="avc1.4d401f"            |
|   22 |  30 | 720p    | medium  |        2 |      19.3 |  272040 | video/mp4; codecs="avc1.64001F, mp4a.40.2" |
|  134 |  30 | 360p    |         |        0 |       3.8 |   53692 | video/mp4; codecs="avc1.4d401e"            |
|  244 |  30 | 480p    |         |        0 |       4.7 |   66516 | video/webm; codecs="vp9"                   |
|   18 |  30 | 360p    | low     |        2 |      12.9 |  181744 | video/mp4; codecs="avc1.42001E, mp4a.40.2" |
|  140 |   0 |         | medium  |        2 |       9.2 |  129480 | audio/mp4; codecs="mp4a.40.2"              |
|  243 |  30 | 360p    |         |        0 |       3.1 |   43288 | video/webm; codecs="vp9"                   |
|  133 |  30 | 240p    |         |        0 |       2.2 |   31016 | video/mp4; codecs="avc1.4d4015"            |
|  251 |   0 |         | medium  |        2 |       6.6 |   92410 | audio/webm; codecs="opus"                  |
|  242 |  30 | 240p    |         |        0 |       1.9 |   26248 | video/webm; codecs="vp9"                   |
|  250 |   0 |         | low     |        2 |       3.6 |   51004 | audio/webm; codecs="opus"                  |
|  160 |  30 | 144p    |         |        0 |       1.2 |   16456 | video/mp4; codecs="avc1.4d400c"            |
|  249 |   0 |         | low     |        2 |       3.6 |   50045 | audio/webm; codecs="opus"                  |
|  278 |  30 | 144p    |         |        0 |       1.3 |   17769 | video/webm; codecs="vp9"                   |
+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
.\youtubedr.exe download -q 299 ZDfeSgVc9Hs

the mp4 loss audio when use itag How to download 1080p with audio?

QingsiLiu commented 1 year ago

+1

kurerid commented 9 months ago
.\youtubedr.exe info -v ZDfeSgVc9Hs

2022/11/19 19:07:24 GET https://youtube.com/embed/ZDfeSgVc9Hs?hl=en
2022/11/19 19:07:26 200 OK
2022/11/19 19:07:26 GET https://youtube.com/s/player/041a7965/player_ias.vflset/en_US/base.js
2022/11/19 19:07:26 200 OK
2022/11/19 19:07:26 POST https://www.youtube.com/youtubei/v1/player?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
2022/11/19 19:07:26 200 OK
Title:       [Steven]价格行为是什么? 如何正确学习价格行为? 总览先导课 Price Action
Author:      罗晟Criss的交易工作室
Duration:    9m56s

+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
| ITAG | FPS |  VIDEO  |  AUDIO  |  AUDIO   | SIZE [MB] | BITRATE |                  MIMETYPE                  |
|      |     | QUALITY | QUALITY | CHANNELS |           |         |                                            |
+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
|  299 |  60 | 1080p60 |         |        0 |      18.6 |  262548 | video/mp4; codecs="avc1.64002a"            |
|  298 |  60 | 720p60  |         |        0 |      12.2 |  172077 | video/mp4; codecs="avc1.640020"            |
|  303 |  60 | 1080p60 |         |        0 |      14.7 |  207463 | video/webm; codecs="vp9"                   |
|  136 |  30 | 720p    |         |        0 |      10.2 |  143796 | video/mp4; codecs="avc1.64001f"            |
|  302 |  60 | 720p60  |         |        0 |      10.7 |  150730 | video/webm; codecs="vp9"                   |
|  247 |  30 | 720p    |         |        0 |       9.1 |  128502 | video/webm; codecs="vp9"                   |
|  135 |  30 | 480p    |         |        0 |       5.8 |   81676 | video/mp4; codecs="avc1.4d401f"            |
|   22 |  30 | 720p    | medium  |        2 |      19.3 |  272040 | video/mp4; codecs="avc1.64001F, mp4a.40.2" |
|  134 |  30 | 360p    |         |        0 |       3.8 |   53692 | video/mp4; codecs="avc1.4d401e"            |
|  244 |  30 | 480p    |         |        0 |       4.7 |   66516 | video/webm; codecs="vp9"                   |
|   18 |  30 | 360p    | low     |        2 |      12.9 |  181744 | video/mp4; codecs="avc1.42001E, mp4a.40.2" |
|  140 |   0 |         | medium  |        2 |       9.2 |  129480 | audio/mp4; codecs="mp4a.40.2"              |
|  243 |  30 | 360p    |         |        0 |       3.1 |   43288 | video/webm; codecs="vp9"                   |
|  133 |  30 | 240p    |         |        0 |       2.2 |   31016 | video/mp4; codecs="avc1.4d4015"            |
|  251 |   0 |         | medium  |        2 |       6.6 |   92410 | audio/webm; codecs="opus"                  |
|  242 |  30 | 240p    |         |        0 |       1.9 |   26248 | video/webm; codecs="vp9"                   |
|  250 |   0 |         | low     |        2 |       3.6 |   51004 | audio/webm; codecs="opus"                  |
|  160 |  30 | 144p    |         |        0 |       1.2 |   16456 | video/mp4; codecs="avc1.4d400c"            |
|  249 |   0 |         | low     |        2 |       3.6 |   50045 | audio/webm; codecs="opus"                  |
|  278 |  30 | 144p    |         |        0 |       1.3 |   17769 | video/webm; codecs="vp9"                   |
+------+-----+---------+---------+----------+-----------+---------+--------------------------------------------+
.\youtubedr.exe download -q 299 ZDfeSgVc9Hs

the mp4 loss audio when use itag How to download 1080p with audio?

did you resolve this problem? >:)

clseibold commented 8 months ago

I believe you have to combine one of the audio downloads with the 1080p video download, because YouTube serves them separately. FFmpeg is one such way to do this. It would be cool if this library has some API call that can combine the audio with the video into one mp4 file to help simplify this.