public async Task CheckFFprobeWrapperFile() { var fileDownloader = new FileDownloader(); var downloadResult = await fileDownloader.DownloadAsync("ffmpeg"); var testVideoPath = await this.GetTestVideoPathAsync(); var videoAnalyzer = new VideoAnalyzer(downloadResult.FfprobePath); var analyzeResult = await videoAnalyzer.GetVideoInfoAsync(testVideoPath); Assert.IsTrue(analyzeResult.Successful, "Get VideoInfo is not successful"); Assert.AreEqual(120, analyzeResult.VideoInfo.Format.Duration); }
public async Task CheckFFprobeWrapperStream() { var fileDownloader = new FileDownloader(); var downloadResult = await fileDownloader.DownloadAsync("ffmpeg"); var testVideoPath = await this.GetTestVideoPathAsync(); var videoData = await File.ReadAllBytesAsync(testVideoPath); var videoAnalyzer = new VideoAnalyzer(downloadResult.FfprobePath); var analyzeResult = await videoAnalyzer.GetVideoInfoAsync(videoData); Assert.IsTrue(analyzeResult.Successful, $"Get VideoInfo is not successful {analyzeResult.ErrorMessage}"); Assert.AreEqual(120, analyzeResult.VideoInfo.Format.Duration); }