Please write the program for me
See original GitHub issueHey, first of all i would thank you for such a great work! So i used VideoLibrary but since i faced some trouble with downloading exact video i came here… Please can u edit the following code to download only the sound as mp3 and to save it on desktop, i want to download a video in the fastest way to play it’s sound (i would prefer to download it at 480p quality or something near) Thanks in advance!
var url = "https://www.youtube.com/watch?v=Euz1F0MG494"; var id = YoutubeClient.ParseVideoId(url); // "bnsUkE8i0tU" var client = new YoutubeClient(); var streamInfoSet = await client.GetVideoMediaStreamInfosAsync("bnsUkE8i0tU"); var streamInfo = streamInfoSet.Muxed.WithHighestVideoQuality(); var ext = streamInfo.Container.GetFileExtension(); await client.DownloadMediaStreamAsync(streamInfo, $"downloaded_video.{ext}"); MessageBox.Show("Done");
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
One last thing, how can i save it on desktop (it would be better if i can play it without any need to wait for that), i nearly figured that but it says access to path is denied!
I’m working on this project for 3 hours, and I haven’t tried to change the quality of the video. But this Issue seems to be interesting, I want to know how to change quality too…