YouTube 下载器

发布于 2024-08-24 09:08:57 字数 552 浏览 7 评论 0原文

                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();

工作正常,但稍后我将运行 flv/video 这给了我这个错误>

An error occurred when the file plays in Windows Media Player

为什么,我做错了什么?

                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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蔚蓝源自深海 2024-08-31 09:08:57

这是一个 FLV(Flash 视频)文件。并非所有版本的 Windows Media Player 都可以播放 FLV 文件。如果您没有正确设置,您将需要一个 FLV 播放器。要在 WMP 中播放,您可以尝试:WMP FLV 播放

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

就像说晚安 2024-08-31 09:08:57

VLC ( http://www.videolan.org/vlc/ ) 在以下方面也做得很好玩几乎所有东西。

作为额外的好处,您可以在下载过程中开始观看,因为 vlc 不会尝试锁定文件

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

寄居人 2024-08-31 09:08:57

您需要使用 FLV 播放器。默认情况下,Windows Media Player 不会播放 FLV 文件。

我自己没有尝试过,而是基于 Google 快速搜索,但如果您绝对需要使用 Windows Media Player,您可以尝试安装 FLV 编解码器(只需搜索 google,您就会找到一些)。我相信 VLC 也可以直接播放 FLV。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文