Example #1
0
        public File Convert(String fileName, String format)
        {
            ICodec       destinationCodec;
            VideoFile    file        = new VideoFile(fileName);
            CodecFactory sourceCodec = CodecFactory.Extract(file);

            if (format == "mp4")
            {
                destinationCodec = new MPEG4CompressionCodec();
            }
            else
            {
                destinationCodec = new OggCompressionCodec();
            }
            String buffer = BitrateReader.Read(fileName, sourceCodec);
            String result = BitrateReader.Convert(buffer, destinationCodec);

            result = AudioMixer.Fix(result);
            return(new File(result));
        }
Example #2
0
 public static CodecFactory Extract(VideoFile file)
 {
     Console.WriteLine("Extracting: {0}", file.FileName);
     return(new CodecFactory(file.FileName));
 }