UWP Windows 10 app - Smooth Streaming support - c#

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.

Related

Get image from webcam

I'm trying to find the way for getting image (only image, not video stream) from webcam in managed C#.
Usually people suggesting libraries, but they are old or commercial or under gpl.
How get image from webcam without third-party libraries?
upd.: thanks for Media Foundation, I shall use that.
Web cameras are supposed to deliver video feeds, not stills. So the native API you might be interested in is the one for video capture, which are DirectShow and Media Foundation.
The one you would most likely want is DirectShow, but it is not well suited to be interfaced from managed code, so you will need a DirectShow.NET which is open source wrapper. You typically start video streaming there and once you have a good image you stop the activity.
Or instead you might keep looking for a ready to use library which does the mentioned above for you.
One of DirectShow.NET samples does what you look for.
DxSnap – Use DirectShow to take snapshots from the Still pin of a
capture device. Note the MS encourages you to use WIA for this, but if
you want to do in with DirectShow and C#, here's how.
It mentions WIA, however WIA API is not available for all (or any in recent OSes?) web cameras, WIA more targets device like scanners.
Other APIs are perhaps less suitable.
VFW ("avicap32.dll") limits you to a subset of devices, is simple yet not well interfaced into managed code
Media Foundation is not well available in earlier OS versions
I wrote this many years ago
http://www.vbforums.com/showthread.php?344471-Vb.Net-WebCam-Class-(ICam)) in VB.net
You could easily port it to c#?
Is avicap32.dll out of the question?
Otherwise I think this is a simple and straightforward way:
http://www.creativecodedesign.com/node/66
http://www.c-sharpcorner.com/uploadfile/yougerthen/integrate-the-web-webcam-functionality-using-C-Sharp-net-and-com-part-viii/

Streaming Static/Live media online smoothly in ASP.NET/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.

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.

.NET Options Stream Video Files as WebCam Image

I am interested in developing an application that will allow me to build a list of videos from xml (containing video title, duration, etc) and play that list as my webcam stream. Meaning, if I were to visit ustream.tv, or activate my webcam on live messenger my video playlist would register as my active webcam.
Does anybody have experience in this area, and perhaps have some advice to offer?
If you want this to work so that third party apps see your video as a standard webcam stream (and is sounds very much like you do) then the only way to do it is to write a virtual webcam driver. You will then then be able to "play" your video content as your webcam's streaming output. This will involve writing code to decode the video content - probably using DirectShow - and then copying the raw video stream to the webcam's output stream. You'll need to either write a custom DirectShow renderer filter or use the sample grabber to access the raw, decoded frames.
It's certainly an achievable goal, but not particularly easy given that both DirectShow and driver development have fairly steep learning curves. There are a variety of different driver models you could use for this, depending on exactly what your aims are. The easiest thing would be to create a Video for Windows (VfW) virtual camera driver. The huge benefit of this approach is that the driver will be entirely user mode code - much easier to debug and to write in general.
I don't have a lot of experience in this area, but I would start by looking at the MSDN docs for the DirectShow API.
A couple of .NET wrapper libraries exist as well:
Managed DirectShow
DirectShow.NET
Another DirectShow.NET

How to implement live video broadcasting in C#?

I want to plug a live video broadcasting facility to a website. I'm planning to use silverlight and C# but I'm very newbie in this topic.
What is the best way to do this?
Thanks in advance.
Update:
I have a camera. I want it to capture it and show on my website. Live. But I have no idea about what I must do inside. Tell me everything about the capturing, streams, api's, dll's, whatever else I need to know. Thanks.
If you're on Windows, you may want to consider the free Windows Media Encoder 9 SDK (http://www.microsoft.com/windows/windowsmedia/forpros/encoder/features.aspx). The idea is that Windows Media Encoder allows you to use any device as a media source (say, a video capture card or a streaming-enabled camcorder) and to push it out as an ASF stream, or even to multicast/broadcast it via Windows Media Services.
The WME SDK is simply a programmatic (COM) interface to WME. In principle you can automate the encoder and instruct it to use your camera as a source, and push it out to a specified UDP port or publishing point (for the latter you'll need Windows Server 2003/2008 with Windows Media Services installed).
A newer alternative is Microsoft Expression Encoder SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=9A077A3D-58CE-454C-B486-153F0578BE4A&displaylang=en), which "talks" to Expression Encoder and allows you to stream out to Silverlight clients (among others), but the caveat here is that EE is not free (WME is).
do you have a live stream? Or is that the part you need? If you already have a live stream with a URI, then you could use Silverlight to display it as all you need is a player and a URI (you can get a player anywhere, here's one http://sl2videoplayer.codeplex.com).
If you don't have the stream, then what you will need is some mechanism to capture video and stream it. You can use Windows Media Server to do the streaming.
Can you clarify what pieces you have and what you need?

Categories