Download only audio file with fixed bitrate #617
Unanswered
asteria121
asked this question in
Q&A
Replies: 1 comment
-
Are you downloading it as |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`
IReadOnlyList infoList;
var streamManifest = await youtube.Videos.Streams.GetManifestAsync(videoID);
var streamInfo = streamManifest
.GetAudioOnlyStreams()
.OrderByDescending(s => s.Container == Container.Mp4)
.ThenByDescending(s => s.Bitrate).FirstOrDefault();
I want to stream it by NAudio. But if I download sound file like this code, bitrate is not constant (moves 100Kbps~150Kbps) and NAudio throws exception like "Mp3FileReader does not support samplerate changes". Is there any way to download only audio and fix bitrate like 192Kbps?
Beta Was this translation helpful? Give feedback.
All reactions