Closed spoiledtechie closed 7 years ago
Hi. I don't get what's a "URL of the downloadable video"?
from only reviewing the code on Github, please correct me if I am wrong, but this url you use is defined here:
string url = streamDic.Get("url");
Is this the URL that is used to pull the video down?
Yes. And in fact that's an URL of one of the streams.
Also accessible from the output as mediaStreamInfo.Url
.
Oh, is it just the video stream? If thats the case, is there another url that has both the video and audio combined?
BTW, thanks for responding so quickly.
Yeah, MixedStreams are the ones that have both. You can read a bit more on the topic here.
oh, this is interesting. So on the new YT stuff, you can't actually use a single URL for their videos...
Yep. Most videos still have MixedStreams, but they are limited in quality to 720p30fps.
So, are you able to put the URL into one of the objects, passing it back out within the video, after received? If the video does have a mixed stream?
var client = new YoutubeClient();
var videoInfo = await client.GetVideoInfoAsync("your_video");
string url = videoInfo.MixedStreams.OrderBy(s => s.VideoQuality).Last().Url; // take the highest quality mixed stream
Is the question answered?
thanks, that greatly helps!
Hey, I won't mind pushing a PR myself, but wondering if you are still accepting them? Or you can do it yourself?
On this method, can you please return the URL of the downloadable video?
GetVideoInfoAsync
I don't want the streams, I simply want the URL to download it myself. Make sense? Just add it to the VideoInfo object. If you reply and let me know you can't or don't have time, Ill do it. Just wondering if you would be willing to do it first?