Quote Originally Posted by passel View Post
Hopefully that can give you some ideas to pull from for your code.
thanks again for your cordial help.,

sir, i have tried following example:
Code:
http://www.vbforums.com/showthread.php?727399-VB-NET-MPEG-4-Screen-recorder-Update-22-Nov-2014&p=4706111&viewfull=1#post4706111
And this is my modified code:
Code:
        Dim objBitmap As System.Drawing.Bitmap
        Dim objFProcess As System.Diagnostics.Process
        Dim objStream As System.IO.BinaryWriter
        Dim strFiles() As String
        Dim strEachFile As String
        Dim intFile As Integer
        Dim intFrame As Integer
        Dim intFLoop As Integer
        objFProcess = New System.Diagnostics.Process
        objFProcess.StartInfo.FileName = "c:\ffmpeg.exe"
        objFProcess.StartInfo.Arguments = "-r 1 -f image2pipe -i pipe:.bmp -pix_fmt yuv420p -crf 35.0 -vcodec libx264 -an -coder 1 -rc_lookahead 50 -threads 0 D:\test.mp4"
        objFProcess.StartInfo.UseShellExecute = False
        objFProcess.StartInfo.RedirectStandardInput = True
        objFProcess.StartInfo.RedirectStandardOutput = True
        objFProcess.StartInfo.RedirectStandardError = True
        'objFProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
        'objFProcess.StartInfo.CreateNoWindow = True
        objFProcess.Start()
        objStream = New System.IO.BinaryWriter(objFProcess.StandardInput.BaseStream)
        strFiles = My.Computer.Clipboard.GetText().Split({System.Environment.NewLine}, StringSplitOptions.None)
        intFrame = 0
        intFile = 0
        For Each strEachFile In strFiles
            'MessageBox.Show(strEachFile)
            intFile = intFile + 1
            objBitmap = New System.Drawing.Bitmap(strEachFile)
            For intFLoop = 0 To 24
                intFrame = intFrame + 1
                cmd1.Text = intFile.ToString & "-" & intFrame.ToString
                My.Application.DoEvents()
                objBitmap.Save(objStream.BaseStream, System.Drawing.Imaging.ImageFormat.Bmp) Rem this line give me below (attached) error :(
            Next
            objBitmap.Dispose()
        Next
        System.Threading.Thread.Sleep(3000)
        objStream.Close()
        MessageBox.Show("Done!")
        'objFProcess.Kill()
And Here is the error:
Name:  Stream-Err1.png
Views: 2549
Size:  5.0 KB

FYI that sample form the link also raise same error

can you please help me out?

thanks in advance....

best regards