Results 1 to 18 of 18

Thread: Captured images now streaming to memory. Now how to access this stream with ffmpeg?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    581

    Exclamation Captured images now streaming to memory. Now how to access this stream with ffmpeg?

    I now have captured images streaming to memory. I just have to figure out how to get ffmpeg to access that memory so it could convert everything into a movie file. Removing the Picturebox code from the project will improve on the frame capture. The picturebox is just to prove that the memory stream works.

    The updated project is attached at the bottom of this post.

    Name:  Capture.jpg
Views: 2639
Size:  265.9 KB

    The Capture Timer:
    Code:
    Private Sub VidREC_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VidREC.Tick
            Dim ct As Integer = CInt(ComboBox1.SelectedItem)
            Dim Frames As Integer = Convert.ToInt32(Label3.Text)
    
            VidREC.Interval = ct
            Label7.Text = "Recording"
    
            Dim BMP As New System.Drawing.Bitmap(MonitorWidth, MonitorHeight)
            Dim Cap As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(BMP)
            Dim imgStream As MemoryStream = New MemoryStream()
    
            Cap.CopyFromScreen(New Point(0, 0), New Point(0, 0), ScreenSize)
            BMP.Save(imgStream, System.Drawing.Imaging.ImageFormat.Jpeg)
            PictureBox1.Image = Image.FromStream(imgStream)
    
            Frames = Frames + 1
            Label3.Text = Convert.ToString(Frames)
    
            If Label1.Text = "stop" Then
                VidREC.Enabled = False
                ComboBox1.SelectedIndex = 3
            End If
    
            BMP.Dispose()
            Cap.Dispose()
    
        End Sub
    Attached Files Attached Files
    Last edited by Peter Porter; Dec 15th, 2013 at 06:50 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width