微软的解决办法你可以直接这么写
{-----------------------------------------------------------------------------
Unit Name: EncodeUnit
Author: Administrator
Purpose: 视频压缩,可以是Avi文件也可以是实时的视频,前提是要有MediaServer
和Media编码器。asd文件是网上媒体流ASF文件的表述文件,用Media编码器
软件可以编辑此文件,来说明ASF文件的传播方式等。
History:
-----------------------------------------------------------------------------}
unit EncodeUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, COMObj, StdCtrls;
type
TMediaEncodeFrm = class(TForm)
BtnStart: TButton;
BtnStop: TButton;
BtnUseASD: TButton;
procedure BtnStartClick(Sender: TObject);
procedure BtnStopClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MediaEncodeFrm: TMediaEncodeFrm;
MSVod: Variant;
implementation
{$R *.dfm}
procedure TMediaEncodeFrm.BtnStartClick(Sender: TObject);
begin
MSVod := CreateOleObject('Asf.RealTimeEncoder');
MSVod.LoadASD('C:/EncoderASD.asd');
MSVod.Start;
end;
procedure TMediaEncodeFrm.BtnStopClick(Sender: TObject);
begin
MSVod.Stop;
MSVod := Unassigned;
end;
end.
MediaServer和Media编码器在2000Server里面都有