Beispiel #1
0
        public static string GetPeakWaveFileName(string videofileName)
        {
            var old = GetPeakWaveFileNameOld(videofileName);

            if (File.Exists(old))
            {
                return(old);
            }

            try
            {
                var dir = Configuration.WaveformsDirectory.TrimEnd(Path.DirectorySeparatorChar);
                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                var wavePeakName = MovieHasher.GenerateHash(videofileName) + ".wav";
                return(Path.Combine(dir, wavePeakName));
            }
            catch
            {
                return(old);
            }
        }
            public static string GetSpectrogramFolder(string videoFileName)
            {
                var dir = Configuration.SpectrogramsDirectory.TrimEnd(Path.DirectorySeparatorChar);

                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                return(Path.Combine(dir, MovieHasher.GenerateHash(videoFileName)));
            }
        private static string GetSceneChangesFileName(string videoFileName)
        {
            var dir = Configuration.SceneChangesDirectory.TrimEnd(Path.DirectorySeparatorChar);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            var newFileName = MovieHasher.GenerateHash(videoFileName) + ".scenechanges";

            newFileName = Path.Combine(dir, newFileName);
            return(newFileName);
        }
Beispiel #4
0
        private static string GetSceneChangesFileName(string videoFileName)
        {
            var dir = Configuration.SceneChangesDirectory.TrimEnd(Path.DirectorySeparatorChar);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            var old = GetSceneChangesFileNameOld(videoFileName); // remove old file name check in 3.5.8...

            if (File.Exists(old))
            {
                return(old);
            }

            var newFileName = MovieHasher.GenerateHash(videoFileName) + ".scenechanges";

            newFileName = Path.Combine(dir, newFileName);
            return(newFileName);
        }
            public static string GetSpectrogramFolder(string videoFileName, int trackNumber = 0)
            {
                var dir = Configuration.SpectrogramsDirectory.TrimEnd(Path.DirectorySeparatorChar);

                if (!Directory.Exists(dir))
                {
                    Directory.CreateDirectory(dir);
                }

                string spectrogramFolder;

                if (trackNumber > 0)
                {
                    spectrogramFolder = MovieHasher.GenerateHash(videoFileName) + "-" + trackNumber;
                }
                else
                {
                    spectrogramFolder = MovieHasher.GenerateHash(videoFileName);
                }

                return(Path.Combine(dir, spectrogramFolder));
            }
        public static string GetPeakWaveFileName(string videoFileName, int trackNumber = 0)
        {
            var dir = Configuration.WaveformsDirectory.TrimEnd(Path.DirectorySeparatorChar);

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            string wavePeakName;

            if (trackNumber > 0)
            {
                wavePeakName = MovieHasher.GenerateHash(videoFileName) + "-" + trackNumber + ".wav";
            }
            else
            {
                wavePeakName = MovieHasher.GenerateHash(videoFileName) + ".wav";
            }

            return(Path.Combine(dir, wavePeakName));
        }