コード例 #1
0
ファイル: Program.cs プロジェクト: gitter-badger/dot-imaging
        private static void extractVideo(string fileName)
        {
            //get output dir (same as file name and in the same folder as video)
            var fileInfo = new FileInfo(fileName);
            var fileNameNoExt = fileInfo.Name.Replace(fileInfo.Extension, String.Empty);
            string outputDir = Path.Combine(fileInfo.DirectoryName, fileNameNoExt);

            //open video
            var reader = new FileCapture(fileName);
            reader.Open();

            reader.SaveFrames(outputDir, "{0}.jpg", (percentage) =>
            {
                ((double)percentage).Progress(message: "Extracting " + fileNameNoExt);
            });

            UI.CloseAll();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: tablesmit/dot-imaging
        private static void extractVideo(string fileName)
        {
            //get output dir (same as file name and in the same folder as video)
            var fileInfo = new FileInfo(fileName);
            var fileNameNoExt = fileInfo.Name.Replace(fileInfo.Extension, String.Empty);
            string outputDir = Path.Combine(fileInfo.DirectoryName, fileNameNoExt);

            //open video
            var reader = new FileCapture(fileName);
            reader.Open();

            Console.WriteLine("Extracting video frames - {0}...", fileNameNoExt);

            reader.SaveFrames(outputDir, "{0}.jpg", (percentage) =>
            {
                Console.Write("\r Completed: {0} %", (int)(percentage * 100));
            });

            Console.WriteLine();
        }