Get live video stream in c# Unity - c#

I'm using Unity3D c# and want to read a video feed to display on a texture.
The issue here is that I would like to get the video from a live feed e.g. IP Camera. Guessing similar sites like this or this uses similar techniques live. Also testing against apps like this
Don't really know where to start, trying out TCPListener and Socket but can't really use a url, just ip and port.

Simple solution is to fetch single frames from image server application that provide such a feature. An example of such a technique can be found in Unity3d documentation
A simple Image server to test that setup could be any IP-cam application.
See this article for details.

Related

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.

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.

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

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).

Data capture from flash application

I'm implementing software to casino auto-play. I'm using .NET technology and C# language.
The main problem is how to capture data from casino game (here is the link to the game http://www.bet-at-home.com/redirNetentCasino.aspx?game=lrblackjack2-3h&pff=True ). I have never been dealing with Flash so I don't know a lot about this technology.
Well, I know that In the game we have server and client. Server is sending data to client and client is responding. For example server is sending information about dealt cards. My question is it's possible to capture data sent by server to client, I quess it is?? I need to now what kind of card I'm receiving. This data is sent in readable format or is ciphered?? Could you give me some hints?
The second option is to use a screen capture.. but this is very slow method. What are you thinking??
Thank you for help.
Regards,
Pablo
There are a couple of things you can do to interpret data from the game. First, you can use CheatEngine which is mostly the choice of Flash game hackers. The following links will help you get started:
How to hack flash games with cheat engine 5.5How to Cheat and Hack Flash based Games
The above method will not work for server based games like the ones hosted on Facebook. So, your second choice is capturing the network traffic and see what you can gather to attain the required information. For capturing the network from C#, you can use Pcap.NET. But before you try to do it programmatically, you should try it doing using Fiddler, which gathers plethora of information for you whenever you surf a website or when a plugin like Flash makes use of web.Get Fiddler and GL !

Whats the best C# Way to stream a H.264 Video to another computer/device on a network? Is there a library/API For this? File Sharing?

I am experimenting with C#, and I wanted to create a fun/useful network program. I've programmed for most of my years using C++, C# seems a lot cleaner and easier to program in. I mostly programmed data structures and algorithms. I haven't really touched networking much.
I have video files on my computer that I would like to be able to share/stream/send to other computers on my network. I'm going to eventually expand on it and add a lot of features, but I want to conquer the hardest part first.
Is there a library out that helps with the data management for this?
I see accomplishing this three ways, Idk what's easiest and best.
Maybe using Windows File Sharing (Like how other computers on a network can open videos in a shared folder?)
Streaming the video data to the client computer? Then having their native video program open the data stream? (Buffer-like on youtube?)
Silverlight or some other Library. I can use the built in video player, etc to run it
Features:
I want to allow the client to be able to copy the video tutorial file to their own computer eventually if necessary, so idk. Maybe buffering is the best solution.
Want to allow the client to pause/download the video.
Hopefully I can learn a lot in this project.
You can use Microsoft Expression Encoder SDK to push video stream to a local port, or publish it in Windows or IIS Media Services. Windows Media Player, Silverlight or player-based application can be used for playback on another computer. Also, the are some options for playback on Apple devices. For H.264 support, you would need Pro version of the encoder.
For more information see the SDK documentation on MSDN, and articles Getting started with IIS Live Smooth Streaming and Apple HTTP Live Streaming with IIS Media Services.
You should be able to use vlc to transcode the file (or just stream it) then connect to the stream it produces. I know you're experimenting with C#, but it seems odd to re-invent the wheel, especially when it's such a good one!
I'm sure you'd have some fun automating vlc.

Categories

Resources