0

ビデオ ファイルからアニメーション gif を取得しようとしています。以下のコードから gif を作成できません。誰でもこの問題を解決するのを手伝ってくれますか?

      Process ffmpeg; // creating process
    string video;
    string thumb;
 //   string text = System.IO.File.ReadAllText(@"C:\xampp\htdocs\h\myText.txt");
    video = Page.MapPath("") + "\\o.avi";
    thumb = Page.MapPath("") + "\\output\\o.gif"; // thumb name with path !
    ffmpeg = new Process();
    int num = 3;
    int secpos = 1;

    // ffmpeg.StartInfo.Arguments = "ffmpeg -i o.avi -vf scale=320:-1,format=rgb8,format=rgb24 -t 10 -r 10 output.gif"; // arguments !
    ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -s 108*80 -ss " + secpos + " -t " + num + "\" -vf scale=320:-1,format=rgb8,format=rgb24 \"" + thumb + "\"";
    ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg//ffmpeg.exe");
    ffmpeg.Start(); // start !  

ffmpeg.StartInfo.Arguments に誤りがあると思います。

4

1 に答える 1

0

あなたのコードは引数文字列を生成します

-i "path" -s 108*80 -ss 1 -t 3" -vf scale=320:-1,format=rgb8,format=rgb24 "path"

3"明らかなエラーのようです。

于 2019-12-18T16:07:13.797 に答える