ASP.net - capture video with camera and play in web page - c#

I want to capture video with webcam and play it live in my website.
I dont know what to do!
how can I do that?

With pure ASP.NET, you can't. You have several options and the only one that I am aware of in the .NET wheelhouse would be to use Silverlight (e.g. http://www.silverlightshow.net/items/Capturing-the-Webcam-in-Silverlight-4.aspx and http://forums.silverlight.net/t/145729.aspx)
Your other options would be to use Flash or purchase a third party component.

You can do this with the in development HTML5 video standards. I remember seeing a working demo of a webcam app like you're talking about in a presentation (Google's HTML can do that I think). Check these pages out for ideas/examples:
http://www.sitepoint.com/stream-your-webcam-to-a-browser-in-javascript/
http://www.iandevlin.com/blog/2012/06/html5/filtering-a-webcam-using-getusermedia-and-html5-canvas
http://www.webrtc.org/
https://wiki.mozilla.org/Platform/Features/Camera_API

If you want to display video from a single computer you control (like an old-school "webcam" page) then you'd write some local computer software (presumably using DirectShow or MediaFoundation) that captures frames from your camera and transfers them to your webserver and your page has a simple script that causes the image to be reloaded every second or so. It's not really video, but it's how webcam pages worked until recently.
Now, in 2012, you can serve video directly. You'd want to use something like Apple's "HTTP Video Streaming" where the camera's video stream (not individual frames) is saved into chunks a few seconds in length, then constantly pushed to the server. The webserver then serves a never-ending playlist that lists all of the video chunks just as they're made available, browsers then download the chunks as they're needed. This negates the need for a streaming media server (such as Microsoft's WMS or Adobe's Flash Media Server).

Related

HoloLens - Capturing photo when locatable camera is in VideoMode (streaming)

I am trying to create a HoloLens application, which uses the built in WebCam to take photos and sends them to a rest interface for further face recognition. This is working well so far. To capture photos from the WebCam it needs to be in the PhotoMode.
The problem:
If I want now to present my application via live stream, the WebCam is set automatically to the VideoMode and capturing photos is not possible.
The locatable camera description https://developer.microsoft.com/en-us/windows/mixed-reality/locatable_camera_in_unity says:
"Only a single operation can occur with the camera at a time."
Since the application has to be presented to a great number of people it is absolutely essential to show it via live stream.
Does somebody have any general idea how to solve this problem, or maybe some hack to access the WebCam in PhotoMode simultaneously to the streaming?
Many thanks in advance!
This is possible if you can live with Preview Frames from the MediaCapture streams. Just start the video capture (layer on holograms if you need to), and then use the PreviewFrames as your 'photos'. This limits you to the resolution of the camera stream of course.
I was able to get this plugin working on a HoloLens. Had to use .Net instead of IL2CPP and I used 2017.4.22f1. At the very least the code shows how use MediaCapture and PreviewFrames to get a video feed from the camera for which you can grab the current frame to save as a photo. The sample doesn't do that last bit, but the bytes for the frames are being passed around, just need to make them available for your need. =)
https://github.com/VulcanTechnologies/HoloLensCameraStream

Azure Media Services Modify stream (add images / text like twitch)

I'm in the process of developing a Twitch-like application that supports Live Streaming. I would like to use Azure Media Services for this.
Looking at the REST Api of Azure Media Services it really looks like it can handle almost all the stuff that I require, for example playing advertisements. There is just one thing I can't seem to find and I really hope someone is able to guide me into the right direction.
How am I able to 'modify' the stream in such a way that it will show images / texts on the live video stream? For example as a donation comes in at Twitch the users are presented with a question on the video for the streamer.
Thanks!
When your Channel has Live Encoding enabled, you have a component in your pipeline that is processing video, and can manipulate it. You can signal for the Channel to insert slates and/or advertisements into the outgoing adaptive bitrate stream. Slates are still images that you can use to cover up the input live feed in certain cases (for example during a commercial break). Advertising signals, are time-synchronized signals you embed into the outgoing stream to tell the video player to take special action – such as to switch to an advertisement at the appropriate time.

What's the best way to display on a browser running on a computer/tablet/cell a video stored on my IIS server

I storing some videos on my IIS server and would like to now display them on a browser. I'm aware that HTML5 has a video tag, but don't know how many browsers can use that. I'm also open to use a 3rd party tool (if needed).
The videos will need to display on the major browsers running on a computer, tablets and cellphones.
Sorry, one last point.
The videos are currently encoded as h264 and their size are between 50k and 200k.
Any help will be truly appreciated.
Almost all major browsers support the html5 video element at this point. There's a matrix available on caniuse.com.
The only browsers of note that don't support it are IE8 and Opera Mini, which is a pretty short list.
When it comes to streaming video, I always recommend distributing the video via Vimeo, it's super easy, and the player can be customised to a degree. Streaming the video on your own server just sucks up your bandwidth. Vimeo can take away all those network/mime type issues, they'll even deliver a customised experience depending on your browser, you'd have to do all that yourself if you were delivering it via your own website.

Record video from camcorder in C#

I need to be able to record video from an external camera in a C# application.
Unfortunately a webcam is pretty much out of the question as the application will record outside and during the evening/night. That is why I was thinking of a camcorder since it also has manual control over exposure and focus, lower noise and better sensor.
So far I would use the AV/S-Video output from the camcorder and send the signal to a USB capture card (the computer is a laptop so no PCI-E cards).
How would I be able to access the video stream from the C# application, now that it comes from the capture card ?
Does my proposed system seem feasible (achievable, good video quality, good fps)? Does anybody have another working solution?
Thanks
This Code Project Article could be of a good starting point.
The Author mentions :
The main goal of the application was to make it flexible and
extensible. The application itself can communicate with any video
source – it may be an IP video camera or a server, it may be a local
camera attached to USB, it may be an MMS stream from a remote server,
or it may be any other video source. And more of it, the application
can work with all these video sources simultaneously, displaying them
all on a single screen.
The solution I used in the end was Microsoft Expression Encoder.

using webcam & taking high res (2Mpix) pictures in a web application

I need a web based application where the user needs to fill in 3 fields and taking a high resolution image (2mpix) with a webcam. Once these are ready I need to post them to the server so they are saved in a database.
1) What is the best way/tools available?
2) I saw thisjquery webcam plugin - is it possible to capture photos through your webcam up to 1920×1080?
Thanks
The quality of the pictures you take with ANY camera depends on the sophistication of the camera.
Cameras have maximum resolutions and settings to configure them to a lower one as needed.
If the webcam on the machine has a resolution as high as the one you need, you'll probably be able to do this.
And its worth mentioning that the jquery webcam plugin requires flash to be available on the machine.
Since you've tagged this question with the ".net" and "c#" tags i guess i should mention that you can access the webcam via a silverlight app as well.

Categories

Resources