示例#1
0
 /// <summary>
 /// updates the video bitrate of a video job with the given bitrate
 /// in addition, the commandline is regenerated to reflect the bitrate change
 /// </summary>
 /// <param name="job">the job whose video bitrate is to be updated</param>
 /// <param name="bitrate">the new desired video bitrate</param>
 public void updateVideoBitrate(VideoJob job, int bitrate)
 {
     job.Settings.BitrateQuantizer = bitrate;
 }
示例#2
0
 /// <summary>
 /// creates a copy of the most important parameters of a job
 /// </summary>
 /// <param name="oldJob">the job to be cloned</param>
 /// <returns>the cloned job</returns>
 private VideoJob cloneJob(VideoJob oldJob)
 {
     VideoJob job = new VideoJob();
     job.Input = oldJob.Input;
     job.Output = oldJob.Output;
     job.Settings = oldJob.Settings.Clone();
     return job;
 }
示例#3
0
        /// <summary>
        /// generates a videojob from the given settings
        /// returns the job and whether or not this is an automated job (in which case another job
        /// will have to be created)
        /// </summary>
        /// <param name="input">the video input (avisynth script)</param>
        /// <param name="output">the video output</param>
        /// <param name="settings">the codec settings for this job</param>
        /// <returns>the generated job or null if there was an error with the video source</returns>
        public VideoJob generateVideoJob(string input, string output, VideoCodecSettings settings, bool skipVideoCheck, Dar? dar, Zone[] zones)
        {
            VideoJob job = new VideoJob(input, output, settings, dar, zones);

            if (Path.GetDirectoryName(settings.Logfile).Equals("")) // no path set
                settings.Logfile = Path.ChangeExtension(output, ".stats");
            if (job.Settings.SettingsID.Equals("x264"))
                mbtreeFile = Path.ChangeExtension(output, ".stats.mbtree");
            if (job.Settings.EncodingMode == 4) // automated 2 pass, change type to 2 pass 2nd pass
            {
                job.Settings.EncodingMode = 3;
            }
            else if (job.Settings.EncodingMode == 8) // automated 3 pass, change type to 3 pass first pass
            {
                if (mainForm.Settings.OverwriteStats)
                    job.Settings.EncodingMode = 7;
                else
                    job.Settings.EncodingMode = 3; // 2 pass 2nd pass.. doesn't overwrite the stats file
            }

            if (!skipVideoCheck)
                checkVideo(job.Input);

            return job;
        }