H,
How do I stream my webcam through a webpage in c# using asp.net
Thanks
Sp
Depends what you want: streaming (more delay but better quality) or live view (like MSN, Skype Video, etc - less delay but lower quality).
For the first one, you need an encoder API as well as some media server to distribute the video for you. For the latter, you need Flash, Skype API, or similar API and users need direct access to (a port) on your PC.
Tell us a bit more about what you're trying to achieve. Since I've been in this business for years, I might be able to help you out if I get to understand what you want.
If this sponsored event happens only once, you can get a 2-week free trial from StreamZilla (http://www.streamzilla.eu/online-store/online-cdn-store) and use Flash Media Live Encoder (http://www.adobe.com/products/flashmediaserver/flashmediaencoder/) to stream via their network. This will make it 100% free (assuming that you provide the webcam and a powerful PC yourself).
Other providers (eg. UStream) might have trial periods as well, or you might even get it for free if you explain them about the charity part. I've got good experiences with StreamZilla and UStream's Watershed.
Contact me if you need more help.
If you are asp.net then silverlight 4.0 is way to do this. Silverlight is application framework to develop rich internet application and this now supports all webcam api also.
Here is the link to display how you can do this.
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/11/18/silverlight-4-rough-notes-camera-and-microphone-support.aspx
Related
I searched on Google, but I did not find much information about it. I was wondering if anyone had experience so that they knew a proper way to get data input from a microphone and also know how to play it. What I would like to do is a typical streaming app in C#, which takes audio from the microphone and sends it on the client application. I await advice, thank you.
There're many source codes available if you can use google and bing... If you want to build this application with C# programming language, then you need to know some basics of Network Programming in C#.
If you want build a program like voice chat. You will need grab the audio from the microphone using some technalogies like DirectSound, UDP packets and etc.
If you want build a video streaming application you can use several ways to get video streaming/conferencing with .net easily.
Use of plain Windows Media Encoder components, RTC Clients, voice/SIP, Sockets and etc.
So you have wide choice of managed technologies here. Another thing is Live Meeting at which you had no chance to take good look yet.
For those still interested I found the NAudio library really interesting: https://github.com/naudio/NAudio
I'm making a program for do a livestream of the XSplit Encoder (RTMP Server). I need to have a site to watch that stream, and this program, the player need to have a button to the spectator can choose your video quality, and the stream have to be fluid and have a good quality. Can someone explain this or send me a link to do that? Please
(C#)
This is a VERY large undertaking. And an impossible question to answer unless you narrow the scope. You need a ingest server that takes in RTMP, You need a machine with enough CPU power to do all the transcodes. You need site to playback on. You also need enough bandwidth (CDN) for all your viewers. How many viewers do you need to support? What platforms do you want to play back on? iOS? then you need HLS. Web? then you need RTMP. Or you can use DASH if your ok with limiting it to modern browsers. Do you want it to play in firefox? Then it MUST be flash, because firefox does not have native support for the h.264 codec. But flash wont play in iOS. You can use JWPlaver premium, that will play HLS in flash. Actually is h.264 the codec you intend to use? Have you looked into services such as Zencoder live transcoding? Or Wowza with the transcoding module? Amazon offers preconfigured wowza instances. What is your budget for this project? Why not just use twitch?
Edit: You can probably string something together using ffmpeg:
https://trac.ffmpeg.org/wiki/StreamingGuide
I am working on a wpf application which is suppose to have video calling feature. So I am going for Skype to provide me with the solution.
I am using Skype4COM library to do it. I got all the friends from Skype in my application, I can make call to my friends and even can do video call, but I cant control streaming. Video is being shown in Skype window, I want to show it inside my application like a part of my application.
I don't even know which control should I use to handle the video streaming.
If there is another better way or free way to add video calling in a WPF application. I am ready to change my preferences.
I had previous plans to use Web browser control and go for WebRTC but that does not support IE and believe there is no web browser control from Mozilla and Chrome.
Videoconferencing is not trivial to implement. You have to first look at a signalling protocol like SIP or XMPP which would provide infrastructure to maintain a list of 'friends' and whether they are online or offline. The signalling infrastructure would also let you place a call and alert you when you receive a call. And then there is the question of actually flowing video/audio between two endpoints. There is no single solution that you can plug into your app.
You can look at Google's Libjingle or ConferenceXP for a starting point.
To establish a video conference you would need the following information:
Whom can you call? This is your friends list. You would need a mechanism to add friends to your list and ensure that you can only add friends that are willing to communicate with you
How do you establish a communication channel with your friends? For example what is their IP Address, can they support a particular video codec and so on.
Once you have established a way to communicate with your friend, then there is the question of receiving audio and video information and displaying it with correct timing.
For points 1 and 2 you would need what is called a signalling and presence protocol. SIP and XMPP are two very popular open protocol.
For point [3] you would look at a protocol like RTP.
You can google SIP, XMPP and RTP. You would receive a wide variety of literature. Look at the RFC documents for exact information they they can be a bit arcane.
Libjingle is a library written in C++ implements XMPP and RTP
ConferenceXP is a RTP implementation in C# with some basic signalling but I think you can get a start with the examples without really getting into details.
You may or maynot be able to control that screen. If skype decides to share that level of control with you.
But it looks like skype4com library is on a dead end. It will stop working soon. :(
http://gigaom.com/2013/07/13/skype-says-it-will-kill-desktop-api-by-end-of-2013/
http://aragonresearch.com/microsoft-kills-skype-desktop-apis-leaves-developers-scrambling/
I'd recommend you not to invest time on skype4com, but look to other solutions to get the video chat working.
Please go through the following thread, as this discussess few alternative ways for video chatting.
Developing a Video Chat Application with high quality video streaming
Another promising thing is the Bittorent Live. But you will have to wait. It claims
BitTorrent Live is a powerful new web-based live streaming technology.
Designed to eliminate barriers to broadcast, Live is an entirely new
protocol, designed to deliver high quality video to large audiences -
with significant reduction in infrastructure cost and network delays.
http://live.bittorrent.com/
Its not open yet, let see :)
I'm looking for a library for conference a/v streaming to a server, which multicasts to all other clients. I've looked at SIP and openh323, and both seem too specialized for voip telephony.
I want the app to be a cross platform Silverlight application (mac and windows), so I don't think I can use DirectSound, right?
Thanks in advance.
You may be mixing apples and oranges in your question. DirectSound provides an API for accessing sound cards; H.323 and SIP are standards for making a call out.
Silverlight 4 natively provides a couple of simplified APIs that are roughly equivalent to DirectSound, so that you can access the microphone, sound card and webcams. See http://msdn.microsoft.com/en-us/library/ff602282(VS.95).aspx for some details.
But once you've got the sound, you still need to encode it, transmit it, mix it, distribute it, and then receive it. That's where it gets complicated. Flash has support for all this natively; Silverlight doesn't. The best open source implementation right now for doing this was put together by SocketCoder and is available on CodePlex, but it uses a proprietary signaling/streaming protocol, a proprietary and very inefficient video codec, and a proprietary media server.
From what I can tell, the best option for doing what you want in Silverlight is a closed-source solution provided by StreamCoders. It's not open-source, but it supports a reasonable set of open standards, which means that you'd probably be able to use a third-party open-source media server. You'd want to test to make sure that it's what you need, of course.
Alternatively, you can try your hand at porting any of the various open-source solutions to C#. I've done this with the Speex pre-processor: it's complicated, but not as difficult as you'd think. You could presumably do something similar with openH323 and the various C-based codecs that are out there. You might even try your hand at modifying the Silverlight RTMP implementation by FluorineFx (http://www.fluorinefx.com/) to do what you need to do. None of this is likely to be simple, of course.
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.