Exemple #1
-1
        public FFMpegUT()
        {
            encoder = new FFMpeg();

            input = new FileInfo("input.mp4");
            if (!input.Exists)
            {
                Webber.Core.WebR.Download(input.FullName, "http://r2---sn-aiglln7k.googlevideo.com/videoplayback?initcwndbps=1062500&ipbits=0&mime=video%2Fmp4&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Csource%2Cupn%2Cexpire&id=o-ABO6Qt7Jt0HntmDbidoR_KhxDHGooya-uTulDyjzHfsu&mn=sn-aiglln7k&mm=31&ms=au&mv=m&mt=1437308919&pl=33&ip=2a02%3A2498%3Ae003%3A46%3A3%3A90%3A0%3A2&ratebypass=yes&itag=22&sver=3&expire=1437330590&upn=qKtbfS2tEjw&key=yt5&signature=0A09E081A8C6C23BD2BE8F662EA633666E4993C4.A7D1F425A7F94FF92BEA4F206DB8213F30416735&fexp=901816%2C9406192%2C9407888%2C9407943%2C9408142%2C9408420%2C9408710%2C9412471%2C9415417%2C9415657%2C9415955%2C9416126%2C9416899%2C9417203&nh=IgpwcjAzLmxocjE0KgkxMjcuMC4wLjE&lmt=1431977342207817&dur=59.930&source=youtube&title=A+Flat+Animation+-+%28Motion+Graphics%29");
                input = new FileInfo("input.mp4");
            }
        }
Exemple #2
-1
        static void Main(string[] args)
        {
            string ffmpegRoot = ConfigurationManager.AppSettings["ffmpegRoot"],
                    inputFile = "G:\\input.mov",
                    outputFile = "G:\\output.mp4";

            FFMpeg encoder = new FFMpeg();

            encoder.OnProgress += encoder_OnProgress;

            // encoder.ToWebM(inputFile, outputFile.Replace("mp4", "WEBM"));
            // encoder.ToOGV(inputFile, outputFile.Replace("mp4", "ogv"));
            // encoder.SaveThumbnail(outputFile, "G:\\thumb.jpg", TimeSpan.FromMinutes(1));
            // encoder.ToMP4(inputFile, outputFile);
        }