Пример #1
0
        private void CMD_ShellMessage(string msg)
        {
            var Line = msg;

            if (string.IsNullOrEmpty(Line))
            {
                return;
            }
            Debug.WriteLine(Line);

            // Dim tstr() As String = Split(Line, "=")
            if (Line.Contains("time="))
            {
                EncodingState = EncodingStateEnum.Audio_Only;
                ProcessState PS = new ProcessState()
                {
                    Frame   = Line.GetValueOnLine("frame").AsInt(),
                    FPS     = Line.GetValueOnLine("fps").AsInt(),
                    Q       = (float)Line.GetValueOnLine("Q").AsDouble(),
                    Size    = Line.GetValueOnLine("size").AsInt(),
                    Time    = (float)Line.GetValueOnLine("time").AsDouble(),
                    Bitrate = (float)Line.GetValueOnLine("bitrate").AsDouble()
                };
                if (PS.Frame > 0)
                {
                    EncodingState = EncodingStateEnum.Video_and_Audio;
                }
                if (PS.Q > 0)
                {
                    if (MaxQualityFound < PS.Q)
                    {
                        MaxQualityFound = PS.Q;
                    }
                }
                State?.Invoke(PS);
            }
        }
Пример #2
0
 private Task <string> RunFFMpegOldAsync(string Args)
 {
     EncodingState = EncodingStateEnum.Not_Encoding;
     return(CMD.ShellAsync(Core.FFMpegOldExecutable.FullName, Args));
     //return CMD.Shell(Core.FFMpegOldExecutable.FullName, Args);
 }