c# - Live preview from webcam + Expression encoder = kill app -
I hit the wall: / ... I'm trying to get a preview from the webcam and take a snapshot (I just Not even that away ...), I am stuck in the live feed to winform for now ... I do not want to use some unknown libraries or libs that are not allowed for commercial use. Anyway now I experiment with MS Express encoder, but I can not add source devices when LiveJob.AddDeviceSource app should be executed without any F ***! @ ^% # Error; (... my code is:
Private Zero startLivePreview (try {try} // a_Devices = EncoderDevices.FindDevices (encoderDeviceType.Audio) on audio devs; if (a_Devices.Count & LT; 1) {New exception throw ("otherwise if available audio devices please be sorry, but at least one should be ...").} EncoderDevice a_Dev = a_Devices [1]; // camLiveSource = camLiveJob.AddDeviceSource (camDevice) , Tap); // I do not need audio overdue (this new size (640, 480), 15) // This line app kills CamLiveSource.PickBestVideoFormat; camLiveSource = camLiveJob.AddDeviceSource (camDevice, a_Dev) camLiveJob .OutputFormat.VideoProfile.Size = New Size (im GPrev.Size.withth, IMGeeV.Y.High); SourcePropertiesSP = camLiveSource.Sourc ePropertiesSnapshot (); lblInfoPrev.Text = sp.Size.Width.ToString () + "x" + sp.Size.Height.ToString () + "Spacer" ("0.00") + 'FPS "; CamLiveSource.PreviewWindow = New PreviewWindows (new handler (IMGPER, IMGER ER); camLiveJob.ActivateSource (camLiveSource); } Hold (exception EE) {message box. Show (E.M. message); }}
Like all the examples that can be found on the Internet, nothing grand ... is anyone able to help? I thought MS Libs would work fine, but they did not (even LiveSourceSample did not work, the app was killed on the same line) ...
I got something to grab a picture from the webcam I want to be used in commercial app and I do not need an audio (if I can cross "blank" as an audio device in adware source))
My AV device is on the system:
Video Equipment: - [0] Name: & gt; Screen Capture Source & lt; * - This MS Express Encoder 4 * - [1] Name:> Webcam SC-03 FFL 1194 should be installed with NNL; * - Built-in laptop camera * Audio device device: - [0] Name: & gt; Microphone (RealTek High Definition Audio) & lt; - [1] Name: & gt; Mix Stereo (RealTek High Definition Audio) & lt; - [2] Name: & gt; Speaker (RealTek High Definition Audio) & lt;
Comments
Post a Comment