Streaming Static/Live media online smoothly in ASP.NET/C# - c#

I am currently working on a project that requires live video streaming, in
realtime which could be from a file or a webcam cast just like a video chat or ustream.tv. I am not getting exactly how that works and how it changes the bitrate dynamically depending upon the bandwidth of the viewer and the device type.
For example: if i am using a 2mbps connection then the video is streamed to me at a high bitrate and otherwise for mobile devices with a lower bandwidth support.
And I have gone thru examples and searched for softwares like Microsoft's SmoothSTreaming, but I want that to be totally custom made.
If you have used the streaming option in VLC media player, that supports online streaming of videos and also live streaming.
Please help.

Look at the Microsoft Media Platform: Player Framework.

Related

UWP Windows 10 app - Smooth Streaming support

I am looking to port Silverlight app to UWP Windows 10 app. I read a lot of blogs saying it is possible to play Smooth Streaming videos in UWP, but as long as I can see - MediaElement and MediaPlayerElement support adaptive streaming but not Smooth Streaming (Microsoft implementation of adaptive streaming).
This article: https://learn.microsoft.com/en-us/azure/media-services/media-services-deliver-content-overview lists variations of adaptive streaming video formats.
(in practical terms) - Smooth Streaming video can be accessed by url like http://server/video.ism/manifest - and this throws exception when I use it in AdaptiveMediaSource.CreateFromUriAsync while other formats like Apple HLS (http://server/video.ism/manifest(format=m3u8-aapl-v3)) works fine.
So my question - is there a simple way to play reliably Microsoft Smooth Streaming in UWP app? [I have thousands of videos encoded in SS format and there will be no go for it unless we can play them]
is there a simple way to play reliably Microsoft Smooth Streaming in UWP app
According to Adaptive streaming with PlayReady,
Smooth streaming is also currently not supported natively; however, PlayReady is extensible and by using additional code or libraries, PlayReady-protected Smooth streaming can be supported, leveraging software or even hardware DRM (digital rights management).
It seems like smooth stream is currently not supported, if you want to play the smooth stream you may need the additional library Microsoft Universal Smooth Streaming Client SDK. And there is a sample you can reference.
Additionally, we recommend you to upgrade your smooth stream videos to DASH.

How to reduce Microsoft HoloLens Live preview latency

I am currently working with the Microsoft Hololens. It provides a Webinterface where you can see a live video in 720p at 30 fps including holograms and audio. But the video stream has a 2-3 seconds delay. Even if I reduce everything at it's minimum, without audio and holos, it barely changes nothing. The hololens uses a http restful API. I've tested it with vlc player and a selfmade C# app using the windows media player. Still no changes. Any ideas?
To reduce lag for live video stream from a hololens, make sure the wireless network the hololens is connected to is capable of high speed transfer. We use one of these TP Link Routers http://www.tp-link.com/us/products/details/cat-5506_AD7200.html which works very well for doing demo presentations and reduces the latency to almost real time.

How to stream multimedia files using C# and ASP.NET in P2P manner?

so what I want to do is build up a custom web player that should have the facility to allow any user to select a file from his local hard disk and the play that, so that some other person can view it in real time, just like doing a video chat, but instead of a webcam, there would be a video clip that is being streamed.
so far, what I've come across is Microsoft's SmoothStreaming Framework, but it did not help much. Please help.
Regards.
See following posts, hopefully it might be helpful.
Streaming with Windows Media Services and ASP.NET
Microsoft Media Platform: Player Framework

Simulating Screen capturing as a webcam?

Do we have a way to simulate a webcam driver, that will provide realtime captured screen (30 frames per sec) as it's output?
This is one of several features of ManyCam (free). It is a virtual webcam driver through which you can stream your real webcam video (with optional real-time video effects), video or image files, or your full/partial desktop.
Yes, just google video2webcam. It works quite well and will loop a video or picture as output.
The driver's job is to provide a level of abstraction between the software and hardware. The driver is supposed to issue commands to the hardware. It's not responsible for taking pictures and turning it into an animated GIF for instance. It's going to do low level stuff like, turn the device on and off, send raw data to a socket.
That being said, if you need to create a virtual device driver. Here's an overview of VDD's. Windows Programming/Device Driver Introduction
Generally these are not written in higher-level languages such as C#. Rather, they are written in languages such as C/C++. You will need the KMDF, or Kernel-Mode Driver Framework.
If you just need to access a webcam from a .NET application on a system with a webcam, you just need an API.
Open your browser.. go to google.com and type ".NET webcam API"
You will see something like this:
Webcam in your own application
It appears that this is a wrapper for the DirectShow class.

c# webcam controls?

I am looking to put a camera on top of a my lab in the process of being built and stream it to a website.
How can I be doing this with only c# ? How to get stream of video & send it live on server PC from there he can take instant photos?
Modern web cameras would supports WIA and DirectShow. WIA has a scripting interface which is more friendly to C#, however it is designed for cameras and scanners and is not that fast for streaming. But if you just need to push the image to a server, you don't need to write code, kist use Windows Media Encoder to push to a Windows Media Server's publishing point. You can then get image from the server's publishing point using DirectShow or Windows Media Format SDK. None of these are easy in C# though, you are better off using COM class libraries like ATL for extensive COM programming like this.
If you really want to write this in C#, I've had a lot of success with Egmu.
Capturing images is very straightforward - see this question. After that, it'd be FTP to the server as usual.
I'm curious about Sheng Jiang's Media Encoder solution though. Let me know how you get on.

Categories