I am trying to download Youtube Video from embed url using WebClient (videos only channel owner allowed me).
Here is an example from StackOverflow's youtube channel (https://www.youtube.com/embed/HJtJXMKpl2g)
But the problems starts here. I use the code below to download some img or mp4 files normally in C#.
using (WebClient wc = new WebClient()){ wc.DownloadFileAsync( new System.Uri("https://www.youtube.com/embed/HJtJXMKpl2g"),"C:\\YoutubeTest\\yttestvideo.mp4" );}
It actually downloads some file (probably broken cuz file is 87 KB.) however it gives me error when I run it.
Windows Media Player cannot play. The player may not support the file content or the codec used to compress its files.
So is it possible to download a video from this link using WebClient or is there any option to download it from C# side?
Note: I am not seeking a library etc.