Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6589311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:09:27+00:00 2026-05-25T17:09:27+00:00

Webcam capture code are below: Dim capturesource As New CaptureSource ‘ Get the default

  • 0

Webcam capture code are below:

Dim capturesource As New CaptureSource
' Get the default video capture device
Dim _videoCaptureDevice As VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice()
Dim _AudioCaptureDevice As AudioCaptureDevice = CaptureDeviceConfiguration.GetDefaultAudioCaptureDevice()
'Dim activeFile As New IsolatedStorageFile
Dim _isf As IsolatedStorageFile

Public Sub New()
    InitializeComponent()
    AddHandler capturesource.CaptureImageCompleted, AddressOf CaptureImageCompleted

End Sub

Private Sub VideoCapture_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
    If _videoCaptureDevice Is Nothing Then
        btnPlayCapture.IsEnabled = False
        btnStopCapture.IsEnabled = False
        btnCaptureDevice.IsEnabled = True
        MessageBox.Show("You don't have any default capture device")
    Else
        btnPlayCapture.IsEnabled = False
        btnStopCapture.IsEnabled = True
        'Set the Capture Source to the VideoBrush of the rectangle
        'capturesource.Start()
        capturesource.VideoCaptureDevice = _videoCaptureDevice
        capturesource.AudioCaptureDevice = _AudioCaptureDevice

        Dim videoBrush As New VideoBrush()
        videoBrush.SetSource(capturesource)
        rectWebCamView.Fill = videoBrush

        If CaptureDeviceConfiguration.AllowedDeviceAccess OrElse CaptureDeviceConfiguration.RequestDeviceAccess() Then
            btnPlayCapture.IsEnabled = True
            btnStopCapture.IsEnabled = False
            btnCaptureDevice.IsEnabled = False
        End If
    End If
End Sub

Private Sub btnPlayCapture_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnPlayCapture.Click
    If Not capturesource.State = CaptureState.Started Then
        capturesource.Start()
    End If
    btnPlayCapture.IsEnabled = False
    btnStopCapture.IsEnabled = True
End Sub

Private Sub btnStopCapture_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnStopCapture.Click
    capturesource.Stop()
    btnPlayCapture.IsEnabled = True
    btnStopCapture.IsEnabled = False
End Sub

Public Sub CaptureImageCompleted(ByVal sender As System.Object, ByVal e As CaptureImageCompletedEventArgs)
    capturesource.CaptureImageAsync()
    Dim sfd As New SaveFileDialog()
    If CBool(sfd.ShowDialog()) Then
        'Dim sr As New StreamReader(e.Result)
        'Dim str As String = sr.ReadToEnd()
        'Dim sw As New StreamWriter(sfd.OpenFile())
        'sw.Write(str)
    End If
End Sub

I have webcam capture code. its working perfect. But i need to make the video and save to server. I need some option or method in silverlight. I Finding most code in web

like:
Capture Image – http://www.silverlight.net/learn/graphics/webcam-and-mic/webcams-%28silverlight-quickstart%29

Most Blog and site link this one only:
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/12/28/silverlight-4-yet-more-on-capturing-video-from-webcams.aspx

Its good code But won’t work and complex to understand.. Any one teach me that one!

how to make WEBCAM RECORD?

How to Make the RECORD file saving with particular format?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:09:28+00:00Added an answer on May 25, 2026 at 5:09 pm

    If you don’t want to write your own “video encoding code” (they are not very much fun to write, trust me) you have to wait for Silverlight 5. Because Silverlight 4 doesn’t have any native video encoding libray, or method or whatever it is. And that “complex” piece of code of Mike Taulty’s is written in MVVM pattern, but it should not be a hurdle since you already know how to Start the Cam. Now, to generate a simple .avi file (of insanely monstrous size) all you need is the logic inside the “OnStartStopRecord” method of the MainViewModel, which you should put inside your Recording button’s event handler. Oh, and don’t forget to include the “Recording” folder & the files inside it. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the best choice for webcam video/image capture under Mac OSX with C/C++?
I have written enough code to preview the webcam video in Flash. Now, I
I want to develop an application in java to capture video from webcam and
What library can you recommend to capture image from a webcam in .Net?
I want to be able to capture images from a webcam on Linux. This
I am working on a project to capture images via webcam in a predefined
Basically just looking to see if you can capture an image from the webcam
In my C/C++ program, I'm using OpenCV to capture images from my webcam. The
The new webcam stuff in Silverlight 4 is darned cool. By exposing it as
I am applying common image transforms to my live webcam capture. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.