Last active
September 28, 2017 16:18
-
-
Save adamralph/4f98b46f253217707bd4c1ee4ebaaf79 to your computer and use it in GitHub Desktop.
List duration of video files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Query Kind="Statements"> | |
<NuGetReference>Xabe.FFmpeg</NuGetReference> | |
<Namespace>Xabe.FFmpeg</Namespace> | |
</Query> | |
Util.AutoScrollResults = true; | |
FFbase.FFmpegDir = @"C:\ffmpeg-3.3.3-win64-static\bin"; | |
Directory.EnumerateFiles(@"C:\vids") | |
.Select(file => | |
{ | |
Console.WriteLine(file); | |
return new { File = file, new VideoInfo(file).VideoProperties.VideoDuration }; | |
}) | |
.Dump("Files", true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment