Пример #1
0
        static void Main(string[] args)
        {
            Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

            progressLines = new Dictionary <string, string>();
            sstore        = new SegmentStore(storeDirectory, segmentExtension, 100000000); //100MB max cache size.

            // request comes in for seek position 300.5 seconds with profile 10Mbit.
            Job job = new Job("MAIN", sourceFile, tempDirectory, segmentExtension, 300.5, 10000000);

            job.SegmentReady += Job_SegmentReady;

            job.Run();

            Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
            {
                e.Cancel = true;
                Console.WriteLine("Gracefully quitting ffmpeg process...");
                if (!job.IsComplete)
                {
                    job.Stop();
                }
            };

            job.Wait();
        }
Пример #2
0
        public FFHLSRunner(string pathToTools, SegmentStore segStore)
        {
            // From parameters
            PathToTools = pathToTools;
            Store       = segStore;

            // Defaults
            EncodingParameters = new VideoEncodingParameters();
            AudioSyncAmount    = 1; // 2 can create streaming issues
        }
Пример #3
0
 public FFHLSRunner(string pathToTools, SegmentStore store, VideoEncodingParameters vidParameters)
     : this(pathToTools, store)
 {
     EncodingParameters = vidParameters;
 }