开发者

Youtube downloader

                string host = "http://youtube.com/v/";
        string end = ".flv";
        WebClient Client = new WebClient ();
        StreamReader sr = new StreamReader(@"ids.txt");
        string line;
        do
         {
         line = sr.ReadLine();
         Client.DownloadFile(host+line+end,line+end);

         }
         while (line !=null);
         sr.Close();

Works fine but later than i shall run the flv/video开发者_运维技巧 this gives me this error >

An error occurred when the file plays in Windows Media Player

Why, What i'm doing wrong?


It's a FLV (Flash Video) file. Not all versions of Windows Media Player can play FLV Files. You would need an FLV player if you do not have it setup properly. To play it in WMP you can try: WMP FLV Playing


VLC ( http://www.videolan.org/vlc/ ) also does a good job at playing just about everything.

As an added bonus you can start watching while the download is in progress since vlc doesn't try to lock the file


You need to use an FLV player. By default, Windows Media Player will not play FLV files.

I haven't tried this myself and am basing it on a quick Google search, but if you absolutely need to use Windows Media Player you can try installing an FLV codec (just search google and you'll find some). I believe VLC will also play FLVs out of the box.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜