How to play stream mms streaming in ASP NET?

2

I use Microsoft Encoder to stream a video via MMS protocol.

The video is streamed. It is the filming of an event being transmitted synchronously to the network (so far locally).

It is not a video that is on the server but a transmission that clients will capture from the point they connect on the page.

I have seen examples of using HTML 5 in Razor for playback, but only for server videos not for receiving network mms resources.

<video controls="controls" height="320" width="480">
        <source src="/api/videos/mp4/OMundoUmMoinho" type="video/mp4">
    </video>

This example I saw in ASP.NET Web API / HTML5 - Streaming from audio and video asynchronously

The resource is being streamed continuously, the address for now is mms://localhost:8080

Until then I capture the transmission using the program VLC Media Player through the function Abrir Fluxo de Rede in the file menu.

Since then I thank you.

    
asked by anonymous 09.11.2015 / 19:16

1 answer

1

In your case there are different paths to follow, one of them would be to abandon the native player of html5 and to use some plugin like VLC, particularly I do not like this alternative.

    <embed type="application/x-vlc-plugin" 
       pluginspage="http://www.videolan.org" 
       autoplay="yes" loop="no" 
       width="480" height="320" 
       target="/api/videos/mp4/OMundoUmMoinho" />

You can also change your encoder, depending on your control over the server environment, to use ffserver . This way you can change the way you deliver the content without leaving the Html5 settings.

I can not test here, but maybe if you can change the endpoint of your stream in the encoder to expose the address with a file extension, it might work, too.

/api/videos/mp4/OMundoUmMoinho/video.mp4

However, you also need to be aware of content type compatibility with the <Video> element implementation across multiple browsers and supported media types. ( Reference )

I hope I have helped in some way.

    
10.12.2015 / 14:16