Exemplo n.º 1
0
        public void GetAudio([FromBody] string path)
        {
            var fileName = path.Split("/").Last();
            var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
            var dir = workingPath
                      + "Audios"
                      + Path.DirectorySeparatorChar;

            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }
            var pathToWav = dir + fileNameWithoutExtension + ".wav";

            _ffmpeg.GetAudioFromVideo(path, pathToWav);
        }