Expression Encoder 4 live stream consumed by HTML 5 <video>

1.8k views Asked by At

I'm trying to serve up a live stream (ie. completely buffered in memory, cannot access the past) and am having trouble with Expression Encoder 4.

Ideally, I'd like to just stream a bare H.264 byte stream to the client consumed by:

 <video id="mainVideoWindow">
     <source src='http://localhost/path/to/my/stream.mp4' type='video/mp4' />
 </video>

I figured I could stream it to the client just like any other byte stream over HTTP. However, I'm having trouble figuring out the appropriate code required to do (first day with Expression Encoder, not sure how to go about getting the raw byte stream) so nor do I know if it would work in the first place.

An alternate was to use IIS Live Streaming server:

        var source = job.AddDeviceSource(device, null);
        job.ActivateSource(source);
        job.ApplyPreset(LivePresets.VC1IISSmoothStreaming720pWidescreen);

        var format = new PushBroadcastPublishFormat();
        format.PublishingPoint = new Uri("http://localhost/test.isml");

        job.PublishFormats.Add(format);
        job.StartEncoding();

        // Let's listen for a keypress or error message to know when to stop encoding
        while (Console.ReadKey(true).Key != ConsoleKey.X) ;

        // Stop our encoding
        Console.WriteLine("Encoding stopped.");
        job.StopEncoding();

However, I'm having trouble getting the client side markup to want to display the video on Chrome and I haven't seen anything to indicate that it'd work on Chrome (though http://learn.iis.net/page.aspx/854/apple-http-live-streaming-with-iis-media-services indicates how it would work with an iOS device).

Anyone have any insights?

2

There are 2 answers

0
Manuel On

You are trying to consume (with your sencond example) a Smooth Streaming feed (HTTP-Adaptive Streaming by Microsoft) through HTML5, which is not supported.

This could work on iOS devices if you enable the Apple HTTP Live Streaming to transmux the fragments into MPEG-2 Transport Stream. This will also generate an Apple HTTP Live Streaming manifest which than can be called though the video tag.

0
Manuel On

...I saw that you have the IIS link. The Apple HTTP Live Streaming needs to be enabled on the IIS Server (IIS Media Services). This will work for iOS devices. Quicktime will get into play...