0

I'm looking for a simple way to grab thumbnails of FLVs in ASP.NET, without having to change any permissions/settings on the server. Ideally, nothing is installed on the server machine, but if necessary, small tools such as FFmpeg are fine.

I've tried FFmpeg using the command-line tool with Process.Start, but the same command that works in a Windows Forms application and from the command prompt does not work in ASP.NET (presumably because of permissions).

I've also tried using TAO.FFmpeg, and it seems to be working most of the time, but fails randomly, and does not start working again until the machine is restarted. Even when I use the sample code (decoder.cs), it sometimes fails when I try to open multiple videos in a single request.

If this isn't possible in a clean/straightforward way, I'm open to other suggestions.

4

2 回答 2

1

如果可以在页面上嵌入 Flash,显示 FLV 缩略图的最简单方法是将视频对象放在舞台上,通过动作脚本中的 NetStream 将视频附加到它,然后放入事件处理程序以暂停开始播放后立即移动。

例如,如果您在舞台上有一个名为“myVideo”的视频对象,并且您正在尝试显示“someVideo.flv”的缩略图,请尝试使用此 actionscript (2.0) 代码,

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
myVideo.attachVideo(stream_ns);
stream_ns.play("someVideo.flv");
stream_ns.seek(0);

stream_ns.onStatus = 函数(信息)
{
    if(info.code = "NetStream.Play.Start")
    {

        stream_ns.pause();
    }
}

在您的 ASPX 与您的 Flash 对话方面,您可以通过 FlashVars 将 FLV 视频名称传递给 Flash,以便您的 SWF 知道要显示什么缩略图。

于 2008-10-14T14:55:05.913 回答
0

在http://www.all4dotnet.com/上试用 Media Manager Pro

于 2009-04-12T15:36:28.820 回答