How to play a stream streaming mms on ASP NET?

Asked

Viewed 465 times

2

I use the Microsoft Encoder to transmit a video via protocol MMS.

The video is streamed by streaming. It is the footage of an event being streamed synchronously to the network (for the time being locally).

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

I saw some examples of the use of HTML 5 in Razor for playback, but only for videos from the server not for receiving mms resources from the network.

<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 audio and video asynchronously

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

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

Since then I thank.

  • The example is for Web API, which in theory is almost the same as in ASP.NET MVC. What would be the doubt?

  • Instead of playing a video stored in the server, as in the example; I want to play a streaming stream that is being streamed by the mms protocol

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 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 Meeting, depending on your control over the server environment, to use the ffserver. This way you can change how you deliver content without leaving the Html5 settings.

I can’t test here, but maybe if you can change the endpoint of your stream on Encoder to expose the address with a file extension, it might work as well.

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

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

I hope I’ve helped in some way.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.