Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot display webcam Using Aforge.NET in C#
    primarykey
    data
    text
    <p>I am currently working on a project where I need to simply display the users webcam on a asp.image object. I am using the Aforge frame work and have gotten it to work on a windows app. In the windows app I would set up the video source variable equal to the image property of a picture box<br> In other words: </p> <blockquote> samplepicturebox1.image = videosource </blockquote> <p>The problem is, for asp there is only a asp:image object and the only property is .imageurl </p> <blockquote> imgSource.imageurl = ???</blockquote> <p>How would I go forth and link a video stream object to the image url or what other object would I use to display the stream? I have looked into putting an output on a seperate aspx.cs file so I could just use that as a imageurl but had no luck.<br> Here is my code to specify:</p> <pre><code>//using AForge.Video; //using AForge.Video.DirectShow; //using System.Drawing.Imaging; public partial class WebForm1 : System.Web.UI.Page { private FilterInfoCollection VideoCaptureDevices; private VideoCaptureDevice FinalVideo; protected void Page_Load(object sender, EventArgs e) { drpSource.Items.Clear(); VideoCaptureDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); foreach (FilterInfo VideoCaptureDevice in VideoCaptureDevices) { drpSource.Items.Add(VideoCaptureDevice.Name); } drpSource.SelectedIndex = 0; } protected void btnStart_Click(object sender, EventArgs e) { FinalVideo = new VideoCaptureDevice(VideoCaptureDevices[drpSource.SelectedIndex].MonikerString); FinalVideo.NewFrame +=new NewFrameEventHandler(FinalVideo_NewFrame); FinalVideo.Start(); } void FinalVideo_NewFrame(object sender, NewFrameEventArgs deventArgs) { imgSource.ImageUrl=(FinalVideo.ToString()); } } </code></pre> <p>I have also populated a combo box with the user's different video source. That also displays correctly </p> <p>I really appreciate any help. This will translate into communications. I want to be able to stream between users just like Omegle and Chatroulette. If anyone would recommend a better framework to look into I'm open, I've only looked into Aforge and Touchless as two C# frameworks that support video streaming. </p> <p>I've seen many use flash and I do know a bit of ActionScript, but to be completely honest, I'd rather not mess too much with flash as ActionScript is quite the pain and from my opinion in some aspects, flash slowly withering and dieing. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload