Havent는 아직 시도했지만 스트리밍을 지원해야하는 Microsoft.Expression.Encoder.Live.LiveJob이라는 클래스가 있습니다. 내가 샘플을 시도하고 내 하드 디스크에서 파일을 스트리밍. 나는 그것이 비디오 스트림을 인코딩하는 것을 지원해야한다고 생각한다. 다음은 샘플 코드입니다 (인코더 3.0 용)
using (LiveJob job = new LiveJob())
{
// Create a new file source from the file name we were passed in
LiveFileSource fileSource = job.AddFileSource(fileToEncode);
// Set this source to Loop when finished
fileSource.PlaybackMode = FileSourcePlaybackMode.Loop;
// Make this source the active one
job.ActivateSource(fileSource);
// Create a new windows media broadcast output format so we
// can broadcast this encoding on the current machine.
// We are going to use the default audio and video profiles
// that are created on this output format.
WindowsMediaBroadcastOutputFormat outputFormat = new WindowsMediaBroadcastOutputFormat();
// Let's broadcast on the local machine on port 8080
outputFormat.BroadcastPort = 8080;
// Set the output format on the job
job.OutputFormat = outputFormat;
// Start encoding
Console.Out.Write("Press 'x' to stop encoding...");
job.StartEncoding();
// Let's listen for a keypress to know when to stop encoding
while (Console.ReadKey(true).Key != ConsoleKey.X)
{
// We are waiting for the 'x' key
}
// Stop our encoding
Console.Out.WriteLine("Encoding stopped.");
job.StopEncoding();
}
LiveJob 클래스를 살펴보면 라이브 비디오 및 오디오 장치를 추가 할 수있는 여러 옵션이 있습니다. 그래서 이것은 분명히 당신이 찾고있는 클래스입니다 자세한 내용은이 게시물을보십시오 : http : //social.expression.microsoft.com/Forums/en-US/encoder/thread/c575c5be-99dc-4473-bdc8 -25e59f1a91b3 – shake
예, 3.0에서 스트리밍을위한 클래스가 있지만, 게시했을 때 3.0이 존재하지 않았습니다. 조금 늦었는데, 대신 WME를 사용했습니다. 그것은 관리되지 않지만 일을했습니다. – Bevin
어쨌든, 그것은 옳은 대답입니다. – Bevin