Exemplo n.º 1
0
        private void btnExtractPart_Click(object sender, EventArgs e)
        {
            AviManager  aviManager = new AviManager(txtAviFileName.Text, true);
            VideoStream aviStream  = aviManager.GetVideoStream();

            CopyForm dialog = new CopyForm(0, (int)Math.Floor(aviStream.CountFrames / aviStream.FrameRate));

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                int startSecond = dialog.Start;
                int stopSecond  = dialog.Stop;

                txtReportCopy.Text = "Cutting seconds from " + txtAviFileName.Text + " to video.avi...\r\n";
                AviManager newFile = aviManager.CopyTo("..\\..\\testdata\\video.avi", startSecond, stopSecond);
                newFile.Close();
                txtReportCopy.Text += "...finished.";
            }
            aviManager.Close();
        }
Exemplo n.º 2
0
        private void btnExtractPart_Click(object sender, EventArgs e)
        {
            AviManager aviManager = new AviManager(txtAviFileName.Text, true);
            VideoStream aviStream = aviManager.GetVideoStream();

            CopyForm dialog = new CopyForm(0, (int)Math.Floor(aviStream.CountFrames / aviStream.FrameRate));
            if (dialog.ShowDialog() == DialogResult.OK) {
                int startSecond = dialog.Start;
                int stopSecond = dialog.Stop;

                txtReportCopy.Text = "Cutting seconds from " + txtAviFileName.Text + " to video.avi...\r\n";
                AviManager newFile = aviManager.CopyTo("..\\..\\testdata\\video.avi", startSecond, stopSecond);
                newFile.Close();
                txtReportCopy.Text += "...finished.";
            }
            aviManager.Close();
        }