diff --git a/FFMpegCore/FFMPEG/FFProbe.cs b/FFMpegCore/FFMPEG/FFProbe.cs index 7c683bf..a7aec84 100644 --- a/FFMpegCore/FFMPEG/FFProbe.cs +++ b/FFMpegCore/FFMPEG/FFProbe.cs @@ -67,6 +67,11 @@ public async Task ParseVideoInfoAsync(VideoInfo info) return ParseVideoInfoInternal(info, output); } + /// + /// Probes the targeted video stream and retrieves all available details. + /// + /// Encoded video stream. + /// A video info object containing all details necessary. public VideoInfo ParseVideoInfo(System.IO.Stream stream) { var info = new VideoInfo(); @@ -92,6 +97,11 @@ public VideoInfo ParseVideoInfo(System.IO.Stream stream) return ParseVideoInfoInternal(info, output); } + /// + /// Probes the targeted video stream asynchronously and retrieves all available details. + /// + /// Encoded video stream. + /// A video info object containing all details necessary. public async Task ParseVideoInfoAsync(System.IO.Stream stream) { var info = new VideoInfo(); diff --git a/FFMpegCore/VideoInfo.cs b/FFMpegCore/VideoInfo.cs index 4e6c226..3bacdb9 100644 --- a/FFMpegCore/VideoInfo.cs +++ b/FFMpegCore/VideoInfo.cs @@ -132,6 +132,16 @@ public static VideoInfo FromPath(string path) return new VideoInfo(path); } + /// + /// Create a video information object from a encoded stream. + /// + /// Encoded video stream. + /// + public static VideoInfo FromStream(System.IO.Stream stream) + { + return new FFProbe().ParseVideoInfo(stream); + } + /// /// Pretty prints the video information. ///