public void ShouldDetectDuration() { var data = FFmpegInfoParser.Parse(_output); Assert.IsNotNull(data); Assert.AreEqual("00:13:30.12", data.Duration); }
private void ProcessOutput(string line) { try { var data = FFmpegInfoParser.Parse(line); if (data != null) { if (!string.IsNullOrEmpty(data.Duration)) { Duration = data.Duration; } ReportProgress(0, data); } else { Debug.WriteLine("Can't parse line: " + line); } } catch (Exception ex) { Debug.WriteLine("Exception parsing lines: " + line); Debug.WriteLine(ex.Message); } }
public void ShouldParseLine6() { var data = FFmpegInfoParser.Parse(_line6); Assert.IsNotNull(data); Assert.AreEqual(0, data.Frame); Assert.AreEqual(0, data.Fps); Assert.AreEqual(13031, data.Size); Assert.AreEqual("00:14:09.96", data.Time); Assert.AreEqual(125.6, data.Bitrate); Assert.AreEqual(3.31, data.Speed); }
public void ShouldParseLine5() { var data = FFmpegInfoParser.Parse(_line5); Assert.IsNotNull(data); Assert.AreEqual(1682, data.Frame); Assert.AreEqual(50, data.Fps); Assert.AreEqual(2275, data.Size); Assert.AreEqual("00:00:56.00", data.Time); Assert.AreEqual(332.8, data.Bitrate); Assert.AreEqual(1.67, data.Speed); }
public void ShouldParseLine4() { var data = FFmpegInfoParser.Parse(_line4); Assert.IsNotNull(data); Assert.AreEqual(4825, data.Frame); Assert.AreEqual(135, data.Fps); Assert.AreEqual(66103, data.Size); Assert.AreEqual("00:03:13.02", data.Time); Assert.AreEqual(2805.4, data.Bitrate); Assert.AreEqual(5.4, data.Speed); }
public void ShouldParseLine3() { var data = FFmpegInfoParser.Parse(_line3); Assert.IsNotNull(data); Assert.AreEqual(512, data.Frame); Assert.AreEqual(83, data.Fps); Assert.AreEqual(7203, data.Size); Assert.AreEqual("00:00:20.48", data.Time); Assert.AreEqual(2881.1, data.Bitrate); Assert.AreEqual(3.32, data.Speed); }
public void ShouldParseLine2() { var data = FFmpegInfoParser.Parse(_line2); Assert.IsNotNull(data); Assert.AreEqual(10786, data.Frame); Assert.AreEqual(135, data.Fps); Assert.AreEqual(147379, data.Size); Assert.AreEqual("00:07:11.40", data.Time); Assert.AreEqual(2798.6, data.Bitrate); Assert.AreEqual(5.38, data.Speed); }
public void ShouldParseLine1() { var data = FFmpegInfoParser.Parse(_line1); Assert.IsNotNull(data); Assert.AreEqual(60, data.Frame); Assert.AreEqual(9.7, data.Fps); Assert.AreEqual(563, data.Size); Assert.AreEqual("00:00:02.43", data.Time); Assert.AreEqual(1896.9, data.Bitrate); Assert.AreEqual(0.395, data.Speed); }