C#如何转录mov视频文件?

时间:2019-12-14 19:27:16

标签: c# closed-captions

我正在编写一个播放.mov文件的api。在播放文件的同时,我希望程序转录正在播放的文件。我正在使用movieplayerpro sdk。我希望抄录或隐藏式字幕出现在列表框中。下面是播放视频的功能代码片段。只是不知道在播放视频时如何转录。就像在Wave文件上使用语音合成一样,但在视频文件上使用。

 mnuSaveFile.Enabled = true;
  if (counter > 0)
    { btnBackward.Enabled = true;

    }

    if (counter == 0)
    { btnBackward.Enabled = false; }
    if (counter < videoFileName.Length)
    { 
        btnForward.Enabled = true; 
    }
    if (counter == videoFileName.Length)
    { btnForward.Enabled = false; }

    //Cursor.Show();
    //indentifier will be used to indentify type of video
    // 0 for lessons videos
    //1 for intro videos
    //2 for summary videos
    //3 introduction to the course or last module for the course
    btnPause.Enabled = true;
    btnStop.Enabled = true;
    this.trackBar1.Minimum = 0;
    if (this.player1.Duration > 0D)
    {
        this.trackBar1.Maximum = (int)this.player1.Duration;
    }



        Program.moduleNumber = module;
        Program.lessonNumber = lesson;
        Program.videoNumber = video;

        switch (identifier)
        {
            case 0:

                player1.FileName = @"..\videos\Module " + Program.moduleNumber + @"\Lesson " + Program.lessonNumber + @"\" +
                Program.moduleNumber + "." + Program.lessonNumber + "." + Program.videoNumber + extension;                
                break;

            case 1:

                player1.FileName = @"..\videos\Module " + Program.moduleNumber + @"\module " + Program.moduleNumber + @" intro\" +
                  Program.moduleNumber + "." + Program.lessonNumber + "." + Program.videoNumber + extension;


                break;
            case 2:

                player1.FileName = @"..\videos\Module " + Program.moduleNumber + @"\module " + Program.moduleNumber + @" Summary\" +
                  Program.moduleNumber + "." + Program.lessonNumber + "." + Program.videoNumber + extension;
                break;

            case 3:

                player1.FileName = @"..\videos\Module " + Program.moduleNumber + @"\" +
                  Program.moduleNumber + "." + Program.lessonNumber + "." + Program.videoNumber + extension;

                break;
        }

        stsPlay.Text = "You are now playing: " + Treeview1.SelectedNode.Text;
        this.trackBar1.Minimum = 0;
        if (this.player1.Duration > 0D)
        {
            this.trackBar1.Maximum = (int)this.player1.Duration;
        }
        player1.Play();

0 个答案:

没有答案