kkdai / youtube

Download Youtube Video in Golang
MIT License
3.3k stars 430 forks source link

Unable to distinguish audio tracks for different languages #314

Closed Wakeful-Cloud closed 8 months ago

Wakeful-Cloud commented 8 months ago

Description

Some videos (e.g.: this one) have audio tracks for different languages, but currently, there is no way of distinguishing them apart (i.e.: you may accidentally download an audio track for the wrong language).

Reproduction

Attempt to (programmatically) download a video (Such as https://www.youtube.com/watch?v=pU9sHwNKc2c).

Expected Behavior

There is some way of distinguishing audio tracks for different languages - such as the audioTrack metadata already returned by YouTube:

// ...
"projectionType": "RECTANGULAR",
"audioTrack": {
  "displayName": "Spanish (Latin America)",
  "id": "es-419.3",
  "audioIsDefault": false
},
"averageBitrate": 48796,
// ...
"projectionType": "RECTANGULAR",
"audioTrack": {
  "displayName": "English original",
  "id": "en.4",
  "audioIsDefault": true
},
// ...

Other Information