FFMPEG: Encode video on image sequence

Hi,

my following code which triggered ffmpeg.exe to encode a video out of an image sequence does not work anymore, it works in Unity2017 but not in Unity2018 anymore:

    public void EncodeMovieWithFFMPEG() {

        var process = new Process();
        try {

            Debug.Log("Rendere Film: " + MovieFolder + "\\" + MovieName + ".mp4");

            var sb = new StringBuilder();
            process.StartInfo.FileName = Path.Combine(Application.streamingAssetsPath, "ffmpeg.exe");
            process.StartInfo.Arguments = "-start_number 1 -framerate 25 -i " + DefaultMovieFrameFolder + "/%1d.png -c:v libx264 -pix_fmt yuv420p -crf 20 " + MovieFolder + "\\" + MovieName + ".mp4";
            process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
            process.WaitForInputIdle();
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.OutputDataReceived += (sender, args) => sb.AppendLine(args.Data);
            process.ErrorDataReceived += (sender, args) => sb.AppendLine(args.Data);
            process.StartInfo.UseShellExecute = false;
            process.Start();
            process.BeginOutputReadLine();
            process.BeginErrorReadLine();
            process.WaitForExit();

            ClearFolder();

            Debug.Log(sb.ToString());

        } catch (Exception e) {
            UnityEngine.Debug.LogError("Unable to launch ffmpeg: " + e.Message);
        }

    }

I get this error:
Unable to launch ffmpeg: No process is associated with this object.

Any idea?
Thanks very much!

As an option I have a *.bat file which correctly triggers ffmpeg, but I don´t know how to start it from inside the editor:
I tried these snippets but none of them works:

https://stackoverflow.com/questions/2996777/how-can-i-call-a-batch-file-bat-in-c

Hi Cascho01,

Will you able to share or refer a FFMPEG integration Unity tutorial? I am still using Unity 2017 and have produced a .t2D image sequence. I want to stitch the images in to a .mp4 video. Will you able to help me?6617374--753676--Capture12.JPG
Thanks and Regards,
Lionel Jayaraj

Hello,

I have another question:

Saving a JPG-sequence with 1920x1080 pixels (Aspect ratio 1.77777) and afterwards converting to an mp4 with ffmpeg works fine.
Saving a JPG-sequence with 1666x937 pixels (Aspect ratio 1.77801) and afterwards converting to an mp4 with ffmpeg doesn´t work.

WHY?

After all I´d like to have my video exactly the same size as my JPGs are (regardless of size and ratio), but I don´t get it working.

System.Process is not implemented in IL2CPP.

https://discussions.unity.com/t/703427