0

添加新视频时,缩略图不一致。我有宽度和高度为 640x480 和 1280x720 的视频文件。我必须改变什么?

       public void exec(string input, string output, string parametri)
 {

        ffmpeg = new Process();

        ffmpeg.StartInfo.Arguments = " -i " + input + (parametri != null ? " " + parametri : "") + " " + output;
        ffmpeg.StartInfo.FileName = "ffmpeg.exe";
        ffmpeg.StartInfo.UseShellExecute = false;
        ffmpeg.StartInfo.RedirectStandardOutput = true;
        ffmpeg.StartInfo.RedirectStandardError = true;
        ffmpeg.StartInfo.CreateNoWindow = true;

        ffmpeg.Start();
        ffmpeg.WaitForExit();
        ffmpeg.Close();
    }

    public void GetThumbnail(string video, string jpg, string velicina)
    {
        if (velicina == null) velicina = "640x480";
        exec(video, jpg, "-s " + velicina);
    }
    private void btnBrowseThumbnail_Click(object sender, EventArgs e)
    {

        string newThumbnail = Properties.Settings.Default.folderPathUserThumbnail + "CopyFiles.jpg";
        GetThumbnail(txtFile.Text, newThumbnail, null);
        string curFile = newThumbnail;
        if (File.Exists(curFile))
            txtThumbnail.Text = newThumbnail;
    }
4

0 回答 0