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为什么,我做错了什么?
发布于 2010-03-05 23:48:24
它是FLV (Flash Video)文件。并非所有版本的Windows Media Player都可以播放FLV文件。如果没有正确设置,则需要FLV player。要在WMP中播放它,您可以尝试:WMP FLV Playing
发布于 2010-03-05 23:50:57
VLC ( http://www.videolan.org/vlc/ )在玩任何东西方面也做得很好。
作为一个额外的好处,你可以在下载过程中开始观看,因为vlc不会尝试锁定文件
发布于 2010-03-05 23:51:01
您需要使用FLV播放器。默认情况下,Windows Media Player不播放FLV文件。
我自己还没有试过,我是基于一个快速的谷歌搜索,但如果你绝对需要使用Windows Media Player,你可以尝试安装一个FLV编解码器(只需搜索谷歌,你会找到一些)。我相信VLC也会开箱即用。
https://stackoverflow.com/questions/2387944
复制相似问题