Skip to content

Instantly share code, notes, and snippets.

@adamralph
Last active September 28, 2017 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamralph/4f98b46f253217707bd4c1ee4ebaaf79 to your computer and use it in GitHub Desktop.
Save adamralph/4f98b46f253217707bd4c1ee4ebaaf79 to your computer and use it in GitHub Desktop.
List duration of video files
<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