private void UpdateCodecMassive() { if (aac != null) { aac.m = m.Clone(); } else if (qaac != null) { qaac.m = m.Clone(); } else if (mp3 != null) { mp3.m = m.Clone(); } else if (ac3 != null) { ac3.m = m.Clone(); } else if (fmp2 != null) { fmp2.m = m.Clone(); } else if (fpcm != null) { fpcm.m = m.Clone(); } else if (flpcm != null) { flpcm.m = m.Clone(); } else if (fflac != null) { fflac.m = m.Clone(); } }
public AviSynthEncoder(Massive mass) { m = mass.Clone(); this.script = m.script; AudioStream stream = (AudioStream)m.outaudiostreams[0]; this.outfilepath = stream.audiopath; }
public FFLAC(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; for (int n = 0; n < 13; n++) { combo_level.Items.Add(n); } for (int n = 0; n < 11; n++) { combo_use_lpc.Items.Add(n); } for (int n = 0; n < 16; n++) { combo_precision.Items.Add(n); } combo_level.ToolTip = "Set compression level:\r\n0 - fast, but bigger filesize\r\n5 - default\r\n12 - slow, but smaller filesize"; combo_use_lpc.ToolTip = "LPC method for determining coefficients:\r\n0 - LPC with fixed pre-defined coeffs (fast)\r\n" + "1 - LPC with coeffs determined by Levinson-Durbin recursion (default)\r\n2+ - LPC with coeffs determined by Cholesky factorization using (Use LPC - 1) passes (10 - veeery slow)"; combo_precision.ToolTip = "LPC coefficient precision (15 - default)"; LoadFromProfile(); }
public NeroAAC(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; combo_mode.Items.Add("CBR"); combo_mode.Items.Add("VBR"); combo_mode.Items.Add("ABR"); combo_mode.Items.Add("ABR 2-Pass"); combo_aac_profile.Items.Add("Auto"); combo_aac_profile.Items.Add("AAC-LC"); combo_aac_profile.Items.Add("AAC-HE"); combo_aac_profile.Items.Add("AAC-HEv2"); this.num_period.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_period_ValueChanged); num_period.ToolTip = "2-Pass encoding bitrate averaging period, milliseconds. \r\nDefault and recommended: 0 (Auto).\r\n" + "\r\nWARNING! Low values may produce crash of neroAacEnc.exe!"; text_mode.Content = Languages.Translate("Encoding mode") + ":"; LoadFromProfile(); }
public Normalize(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //колличество обрабатываемых фреймов int accuratepr = Convert.ToInt32(m.volumeaccurate.Replace("%", "")); vtrim = Calculate.GetProcentValue(m.inframes, accuratepr); if (vtrim < 10000) vtrim = Math.Min(10000, m.inframes); //забиваем prCurrent.Maximum = vtrim; prCurrent.ToolTip = Languages.Translate("Current progress"); Title = Languages.Translate("Normalizer"); text_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); //Сворачиваем окно, если программа минимизирована или свернута в трей if (!Owner.IsVisible || Owner.WindowState == WindowState.Minimized) { this.WindowState = WindowState.Minimized; this.SizeToContent = System.Windows.SizeToContent.Manual; this.StateChanged += new EventHandler(Window_StateChanged); this.Name = "Hidden"; } ShowDialog(); }
public QuickTimeAAC(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; //--check Show library versions and exit //--formats Show available AAC formats and exit combo_mode.Items.Add("CBR"); //-c, --cbr <bitrate> AAC CBR mode / bitrate combo_mode.Items.Add("ABR"); //-a, --abr <bitrate> AAC ABR mode / bitrate combo_mode.Items.Add("Constrained VBR"); //-v, --cvbr <bitrate> AAC Constrained VBR mode / bitrate combo_mode.Items.Add("True VBR"); //-V, --tvbr <quality> AAC True VBR mode / quality [0-127] (AAC-HE не поддерживается) combo_mode.Items.Add("Lossless (ALAC)"); //-A, --alac ALAC encoding mode combo_accuracy.Items.Add("0 - Fast"); combo_accuracy.Items.Add("1"); combo_accuracy.Items.Add("2 - Slow"); combo_aac_profile.Items.Add("AAC-LC"); combo_aac_profile.Items.Add("AAC-HE"); //Предупреждение о неточности битрейта combo_bitrate.Tag = Languages.Translate("Do not expect that selected bitrate will be strictly observed by the encoder!") + "\r\n" + Languages.Translate("The actual value will varies with encoding mode (ABR/CBR/CVBR), profile (LC/HE), sample rate and number of channels.") + "\r\n" + Languages.Translate("Click on \"Bitrate\" label to get detailed information about all supported combinations."); text_mode.Content = Languages.Translate("Encoding mode") + ":"; text_accuracy.Content = Languages.Translate("Accuracy") + ":"; LoadFromProfile(); }
public NeroAAC(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; combo_mode.Items.Add("CBR"); combo_mode.Items.Add("VBR"); combo_mode.Items.Add("ABR"); combo_mode.Items.Add("ABR 2-Pass"); combo_aac_profile.Items.Add("Auto"); combo_aac_profile.Items.Add("AAC-LC"); combo_aac_profile.Items.Add("AAC-HE"); combo_aac_profile.Items.Add("AAC-HEv2"); this.num_period.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_period_ValueChanged); num_period.ToolTip = "2-Pass encoding bitrate averaging period, milliseconds. \r\nDefault and recommended: 0 (Auto).\r\n" + "\r\nWARNING! Low values may produce crash of neroAacEnc.exe!"; text_mode.Content = Languages.Translate("Encoding mode") + ":"; LoadFromProfile(); }
public FFHUFF(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; //прогружаем fourcc combo_fourcc.Items.Add("HFYU"); combo_fourcc.Items.Add("FFVH"); //прогружаем colorspace combo_color.Items.Add("YV12"); combo_color.Items.Add("YUY2"); combo_color.Items.Add("RGB32"); //предиктор combo_predictor.Items.Add("Left"); combo_predictor.Items.Add("Plane"); combo_predictor.Items.Add("Median"); LoadFromProfile(); SetToolTips(); }
public FFV1(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; //прогружаем colorspace combo_color.Items.Add("YV12"); combo_color.Items.Add("YUY2"); combo_color.Items.Add("RGB32"); combo_color.Items.Add("YUV410P"); combo_color.Items.Add("YUV411P"); combo_color.Items.Add("YUV444P"); //codertype combo_codertype.Items.Add("VLC"); combo_codertype.Items.Add("AC"); //context model combo_contextmodel.Items.Add("Small"); combo_contextmodel.Items.Add("Large"); LoadFromProfile(); SetToolTips(); }
public AftenAC3(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; for (int i = 1; i < 32; i++) { combo_dnorm.Items.Add("-" + i + "dB"); } combo_bandwidth.Items.Add("Auto"); for (int i = 10; i < 24; i += 1) { combo_bandwidth.Items.Add(i + "kHz"); } combo_dnorm.ToolTip = "Dialog normalization level. -31dB means that decoder will leave audio level as is while play back." + "\r\nHigher values will produce more quiet sound.\r\nDefault: -31dB"; combo_bandwidth.ToolTip = "High-frequency cutoff. In Auto mode encoder will auto-select this parameter depending\r\non bitrate, samplerate" + " and N of channels. But you can specify it manually.\r\nDefault: Auto (not optimal, very low cutoff frequency!)"; LoadFromProfile(); }
private void combo_framerateconvertor_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if ((combo_framerateconvertor.IsDropDownOpen || combo_framerateconvertor.IsSelectionBoxHighlighted) && combo_framerateconvertor.SelectedItem != null) { Settings.FramerateModifer = m.frameratemodifer = (AviSynthScripting.FramerateModifers)((ComboBoxItem)combo_framerateconvertor.SelectedItem).Content; m.sampleratemodifer = Settings.SamplerateModifer; m = AviSynthScripting.CreateAutoAviSynthScript(m); //механизм обхода ошибок SSRC if (m.sampleratemodifer == AviSynthScripting.SamplerateModifers.SSRC && m.inaudiostreams.Count > 0 && m.outaudiostreams.Count > 0) { AudioStream instream = (AudioStream)m.inaudiostreams[m.inaudiostream]; AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (instream.samplerate != outstream.samplerate && outstream.samplerate != null && Calculate.CheckScriptErrors(m) == "SSRC: could not resample between the two samplerates.") { m.sampleratemodifer = AviSynthScripting.SamplerateModifers.ResampleAudio; m = AviSynthScripting.CreateAutoAviSynthScript(m); } } //обновляем конечное колличество фреймов, с учётом режима деинтерелейса m = Calculate.UpdateOutFrames(m); m.outfilesize = Calculate.GetEncodingSize(m); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); } }
public FilesListWindow(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем список в форму list_files.Items.Clear(); foreach (string file in m.infileslist) { list_files.Items.Add(file); } //выделяем последний файл list_files.SelectedItem = m.infileslist[m.infileslist.Length - 1]; button_ok.Content = Languages.Translate("OK"); button_cancel.Content = Languages.Translate("Cancel"); Title = Languages.Translate("Add or remove friend files") + ":"; btMoveUp.ToolTip = cmenu_up.Header = Languages.Translate("Move up"); btMoveDown.ToolTip = cmenu_down.Header = Languages.Translate("Move down"); btAdd.ToolTip = cmenu_add.Header = Languages.Translate("Add file"); btRemove.ToolTip = cmenu_remove.Header = Languages.Translate("Remove file"); //выдаём диалог ShowDialog(); }
public FMJPEG(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.num_bitrate.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_bitrate_ValueChanged); this.num_bittolerance.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_bittolerance_ValueChanged); this.num_buffsize.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_buffsize_ValueChanged); this.num_gopsize.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_gopsize_ValueChanged); this.num_maxbitrate.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_maxbitrate_ValueChanged); this.num_minbitrate.ValueChanged += new RoutedPropertyChangedEventHandler <decimal>(num_minbitrate_ValueChanged); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; combo_mode.Items.Add("1-Pass Bitrate"); //combo_mode.Items.Add("2-Pass Bitrate"); //combo_mode.Items.Add("3-Pass Bitrate"); combo_mode.Items.Add("Constant Quality"); //combo_mode.Items.Add("2-Pass Quality"); combo_mode.Items.Add("1-Pass Size"); //combo_mode.Items.Add("3-Pass Size"); LoadFromProfile(); }
public Decoder(Massive mass, DecoderModes mode, string outfile) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); this.outfile = outfile; this.mode = mode; label_info.Content = Languages.Translate("Please wait... Work in progress..."); if (mode == DecoderModes.DecodeAudio) { Title = Languages.Translate("Audio decoding") + "..."; } else if (mode == DecoderModes.DecodeVideo) { Title = Languages.Translate("Video decoding") + "..."; } else if (mode == DecoderModes.DecodeAV) { Title = Languages.Translate("LossLess decoding") + "..."; } //Определяем исходный файл source_file = (m.infilepath_source != null) ? m.infilepath_source : m.infilepath; //фоновое кодирование CreateBackgoundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
private void button_cancel_Click(object sender, System.Windows.RoutedEventArgs e) { if (m != null) { m = oldm.Clone(); } Close(); }
public FMP2(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; LoadFromProfile(); }
private void Refresh() { if (oldm != null) { m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); } }
private void Refresh() { m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); CalculateMod(); FillManualBox(); }
private void button_refresh_Click(object sender, System.Windows.RoutedEventArgs e) { if (m != null) { m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); } }
private void Refresh() { if (m != null) { CheckFramerateModifierIsApplied(); m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); } }
public LameMP3(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; combo_mode.Items.Add("CBR"); combo_mode.Items.Add("VBR"); combo_mode.Items.Add("ABR"); combo_channels_mode.Items.Add("Auto"); //default is (j) or (s) depending on bitrate combo_channels_mode.Items.Add("Stereo"); //"-m s" (s)imple = force LR stereo on all frames combo_channels_mode.Items.Add("Joint Stereo"); //"-m j" (j)oint = joins the best possible of MS and LR stereo combo_channels_mode.Items.Add("Forced Joint Stereo"); //"-m f" (f)orce = force MS stereo on all frames. combo_channels_mode.Items.Add("Mono"); //"-m m" (d)ual-mono, (m)ono combo_channels_mode.ToolTip = "Auto - auto select (depending on bitrate), default\r\n" + "Stereo - force LR stereo on all frames\r\n" + "Joint Stereo - joins the best possible of MS and LR stereo\r\n" + "Forced Joint Stereo - force MS stereo on all frames\r\n" + "Mono - encode as mono"; combo_quality.Items.Add("0 - Best Quality"); combo_quality.Items.Add("1"); combo_quality.Items.Add("2 - Recommended"); combo_quality.Items.Add("3"); combo_quality.Items.Add("4"); combo_quality.Items.Add("5 - Good Speed"); combo_quality.Items.Add("6"); combo_quality.Items.Add("7 - Very Fast"); combo_quality.Items.Add("8"); combo_quality.Items.Add("9 - Poor Quality"); combo_quality.ToolTip = "Noise shaping & psycho acoustic algorithms\r\n" + "0 - highest quality, very slow\r\n" + "2 - recommended, default\r\n" + "9 - poor quality, but fast"; combo_gain.Items.Add("None"); combo_gain.Items.Add("Fast"); combo_gain.Items.Add("Accurate"); combo_gain.ToolTip = "None - do not compute RG (slightly faster encoding)\r\n" + "Fast - compute RG fast and slightly inaccurately, default\r\n" + "Accurate - compute RG more accurately, but slower"; //прогружаем битрейты LoadBitrates(); text_mode.Content = Languages.Translate("Encoding mode") + ":"; text_quality.Content = Languages.Translate("Accuracy") + ":"; LoadFromProfile(); }
private void combo_framerate_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if ((combo_framerate.IsDropDownOpen || combo_framerate.IsSelectionBoxHighlighted || combo_framerate.IsEditable) && combo_framerate.SelectedItem != null) { if (combo_framerate.SelectedItem.ToString().Length == 0) { //Включаем редактирование combo_framerate.IsEditable = true; combo_framerate.ToolTip = Languages.Translate("Enter - apply, Esc - cancel."); combo_framerate.ApplyTemplate(); return; } else { m.outframerate = Calculate.GetSplittedString(combo_framerate.SelectedItem.ToString(), 0); m.sampleratemodifer = Settings.SamplerateModifer; m = AviSynthScripting.CreateAutoAviSynthScript(m); //механизм обхода ошибок SSRC if (m.sampleratemodifer == AviSynthScripting.SamplerateModifers.SSRC && m.inaudiostreams.Count > 0 && m.outaudiostreams.Count > 0) { AudioStream instream = (AudioStream)m.inaudiostreams[m.inaudiostream]; AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (instream.samplerate != outstream.samplerate && outstream.samplerate != null && Calculate.CheckScriptErrors(m) == "SSRC: could not resample between the two samplerates.") { m.sampleratemodifer = AviSynthScripting.SamplerateModifers.ResampleAudio; m = AviSynthScripting.CreateAutoAviSynthScript(m); } } //обновляем конечное колличество фреймов, с учётом режима деинтерелейса m = Calculate.UpdateOutFrames(m); m.outfilesize = Calculate.GetEncodingSize(m); CheckFramerateModifierIsApplied(); p.m = m.Clone(); p.Refresh(m.script); this.Focus(); } if (combo_framerate.IsEditable) { //Выключаем редактирование combo_framerate.IsEditable = false; combo_framerate.ToolTip = null; } } }
public FLPCM(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; combo_bits.Items.Add("16-bit"); combo_bits.Items.Add("24-bit"); combo_bits.Items.Add("32-bit"); LoadFromProfile(); }
private void button_cancel_Click(object sender, System.Windows.RoutedEventArgs e) { if (oldm != null) { m = oldm.Clone(); } else { ((AudioStream)m.outaudiostreams[m.outaudiostream]).encoding = old_aencoding; } Close(); }
private void button_cancel_Click(object sender, RoutedEventArgs e) { if (mode == AudioOptionsModes.AllOptions) { if (p.m.script != oldm.script) { m = oldm.Clone(); Refresh(); } } Close(); }
private void button_cancel_Click(object sender, System.Windows.RoutedEventArgs e) { if (oldm != null) { m = oldm.Clone(); } else { m.vencoding = old_vencoding; } Close(); }
public Demuxer(Massive mass, DemuxerMode mode, string outfile) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); this.outfile = outfile; this.mode = mode; //забиваем progress.Maximum = 100; label_info.Content = Languages.Translate("Please wait... Work in progress..."); if (mode == DemuxerMode.DecodeToWAV) { Title = Languages.Translate("Decoding to Windows PCM") + "..."; } else if (mode == DemuxerMode.NeroTempWAV) { Title = Languages.Translate("Creating Nero temp file") + "..."; } else if (mode == DemuxerMode.ExtractAudio) { Title = Languages.Translate("Audio demuxing") + "..."; } else if (mode == DemuxerMode.ExtractVideo) { Title = Languages.Translate("Video demuxing") + "..."; } else if (mode == DemuxerMode.RepairMKV) { Title = Languages.Translate("Remuxing Matroska file") + "..."; } //Определяем исходный файл source_file = (m.infilepath_source != null) ? m.infilepath_source : m.infilepath; //фоновое кодирование CreateBackgroundWorker(); worker.RunWorkerAsync(); //Сворачиваем окно, если программа минимизирована или свернута в трей if (!Owner.IsVisible || Owner.WindowState == WindowState.Minimized) { this.WindowState = WindowState.Minimized; this.StateChanged += new EventHandler(Window_StateChanged); this.Name = "Hidden"; } ShowDialog(); }
private void Refresh() { m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); if (m.outaudiostreams.Count > 0) { AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (p.combo_aencoding.SelectedItem.ToString() != outstream.encoding) { p.combo_aencoding.SelectedItem = outstream.encoding; } } }
int MaxPortions = 15; //Макс. допустимое кол-во порций (анализ полей только в интерлейсных секциях), 5 public SourceDetector(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); progress_total.Maximum = 100; Title = Languages.Translate("Detecting interlace") + "..."; label_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public Informer(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем prCurrent.Maximum = 100; Title = Languages.Translate("Getting media info") + "..."; label_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public Caching(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем prCurrent.Maximum = 100; Title = Languages.Translate("Caсhing") + "..."; text_info.Content = Languages.Translate("Please wait... Work in progress..."); //Caching CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public IndexChecker(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем prCurrent.Maximum = 100; Title = Languages.Translate("Checking index folder") + "..."; label_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public Indexing_FFMS(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем prCurrent.Maximum = 100; total = m.infileslist.Length; Title = Languages.Translate("Indexing"); text_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public Caching(Massive mass, bool check_audio_only) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.only_audio = check_audio_only; this.m = mass.Clone(); //забиваем prCurrent.Maximum = 100; Title = Languages.Translate("Caсhing") + "..."; text_info.Content = Languages.Translate("Please wait... Work in progress..."); //Caching CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public FFLAC(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; for (int n = 0; n < 13; n++) combo_level.Items.Add(n); for (int n = 0; n < 11; n++) combo_use_lpc.Items.Add(n); for (int n = 0; n < 16; n++) combo_precision.Items.Add(n); combo_level.ToolTip = "Set compression level:\r\n0 - fast, but bigger filesize\r\n5 - default\r\n12 - slow, but smaller filesize"; combo_use_lpc.ToolTip = "LPC method for determining coefficients:\r\n0 - LPC with fixed pre-defined coeffs (fast)\r\n" + "1 - LPC with coeffs determined by Levinson-Durbin recursion (default)\r\n2+ - LPC with coeffs determined by Cholesky factorization using (Use LPC - 1) passes (10 - veeery slow)"; combo_precision.ToolTip = "LPC coefficient precision (15 - default)"; LoadFromProfile(); }
public Autocrop(Massive mass, System.Windows.Window owner, int frame) { this.InitializeComponent(); this.Owner = owner; this.m = mass.Clone(); this.frame = frame; //забиваем prCurrent.Maximum = 100; Title = Languages.Translate("Detecting black borders") + "..."; label_info.Content = Languages.Translate("Please wait... Work in progress..."); //BackgroundWorker CreateBackgroundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public AftenAC3(Massive mass, AudioEncoding AudioEncWindow) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = AudioEncWindow; for (int i = 1; i < 32; i++) combo_dnorm.Items.Add("-" + i + "dB"); combo_bandwidth.Items.Add("Auto"); for (int i = 10; i < 24; i += 1) combo_bandwidth.Items.Add(i + "kHz"); combo_dnorm.ToolTip = "Dialog normalization level. -31dB means that decoder will leave audio level as is while play back." + "\r\nHigher values will produce more quiet sound.\r\nDefault: -31dB"; combo_bandwidth.ToolTip = "High-frequency cutoff. In Auto mode encoder will auto-select this parameter depending\r\non bitrate, samplerate" + " and N of channels. But you can specify it manually.\r\nDefault: Auto (not optimal, very low cutoff frequency!)"; LoadFromProfile(); }
public Filtering(Massive mass, MainWindow parent) { this.InitializeComponent(); this.Owner = this.p = parent; if (mass != null) { m = mass.Clone(); script_box.Text = m.script; button_refresh.Content = Languages.Translate("Apply"); button_refresh.ToolTip = Languages.Translate("Refresh preview"); button_fullscreen.ToolTip = Languages.Translate("Fullscreen mode"); button_Avsp.ToolTip = Languages.Translate("AvsP editor"); } else { old_filtering = Settings.Filtering; grid_profiles.Visibility = Visibility.Visible; button_refresh.Visibility = button_fullscreen.Visibility = button_Avsp.Visibility = Visibility.Collapsed; text_profile.Content = Languages.Translate("Profile:"); button_add.ToolTip = Languages.Translate("Add profile"); button_remove.ToolTip = Languages.Translate("Remove profile"); LoadProfiles(); LoadPreset(); } //переводим Title = Languages.Translate("Filtering"); button_ok.Content = Languages.Translate("OK"); button_ok.ToolTip = Languages.Translate("Save changes"); button_cancel.Content = button_cancel.ToolTip = Languages.Translate("Cancel"); //Ограничиваем максимальную ширину окна до его открытия this.MaxWidth = Math.Min(((MainWindow)parent).ActualWidth * 1.25, SystemParameters.WorkArea.Width); this.SizeChanged += new SizeChangedEventHandler(Window_SizeChanged); ShowDialog(); }
public Decoder(Massive mass, DecoderModes mode, string outfile) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); this.outfile = outfile; this.mode = mode; label_info.Content = Languages.Translate("Please wait... Work in progress..."); if (mode == DecoderModes.DecodeAudio) Title = Languages.Translate("Audio decoding") + "..."; else if (mode == DecoderModes.DecodeVideo) Title = Languages.Translate("Video decoding") + "..."; else if (mode == DecoderModes.DecodeAV) Title = Languages.Translate("LossLess decoding") + "..."; //Определяем исходный файл source_file = (m.infilepath_source != null) ? m.infilepath_source : m.infilepath; //фоновое кодирование CreateBackgoundWorker(); worker.RunWorkerAsync(); ShowDialog(); }
public Demuxer(Massive mass, DemuxerMode mode, string outfile) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); this.outfile = outfile; this.mode = mode; //забиваем progress.Maximum = 100; label_info.Content = Languages.Translate("Please wait... Work in progress..."); if (mode == DemuxerMode.DecodeToWAV) Title = Languages.Translate("Decoding to Windows PCM") + "..."; else if (mode == DemuxerMode.NeroTempWAV) Title = Languages.Translate("Creating Nero temp file") + "..."; else if (mode == DemuxerMode.ExtractAudio) Title = Languages.Translate("Audio demuxing") + "..."; else if (mode == DemuxerMode.ExtractVideo) Title = Languages.Translate("Video demuxing") + "..."; else if (mode == DemuxerMode.RepairMKV) Title = Languages.Translate("Remuxing Matroska file") + "..."; //Определяем исходный файл source_file = (m.infilepath_source != null) ? m.infilepath_source : m.infilepath; //фоновое кодирование CreateBackgroundWorker(); worker.RunWorkerAsync(); //Сворачиваем окно, если программа минимизирована или свернута в трей if (!Owner.IsVisible || Owner.WindowState == WindowState.Minimized) { this.WindowState = WindowState.Minimized; this.StateChanged += new EventHandler(Window_StateChanged); this.Name = "Hidden"; } ShowDialog(); }
public FDV(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; //прогружаем fourcc combo_fourcc.Items.Add("dvsd"); combo_fourcc.Items.Add("DVSD"); combo_fourcc.Items.Add("dv25"); combo_fourcc.Items.Add("DV25"); combo_fourcc.Items.Add("dv50"); combo_fourcc.Items.Add("DV50"); //прогружаем пресеты combo_preset.Items.Add("DVCAM"); combo_preset.Items.Add("DVCPRO25"); combo_preset.Items.Add("DVCPRO50"); LoadFromProfile(); SetToolTips(); }
public FilesListWindow(Massive mass) { this.InitializeComponent(); this.Owner = App.Current.MainWindow; this.m = mass.Clone(); //забиваем список в форму list_files.Items.Clear(); foreach (string file in m.infileslist) list_files.Items.Add(file); //выделяем последний файл list_files.SelectedItem = m.infileslist[m.infileslist.Length - 1]; button_ok.Content = Languages.Translate("OK"); button_cancel.Content = Languages.Translate("Cancel"); Title = Languages.Translate("Add or remove friend files") + ":"; btMoveUp.ToolTip = cmenu_up.Header = Languages.Translate("Move up"); btMoveDown.ToolTip = cmenu_down.Header = Languages.Translate("Move down"); btAdd.ToolTip = cmenu_add.Header = Languages.Translate("Add file"); btRemove.ToolTip = cmenu_remove.Header = Languages.Translate("Remove file"); //выдаём диалог ShowDialog(); }
public FLV1(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.num_bitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bitrate_ValueChanged); this.num_bittolerance.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bittolerance_ValueChanged); this.num_buffsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_buffsize_ValueChanged); this.num_gopsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_gopsize_ValueChanged); this.num_maxbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_maxbitrate_ValueChanged); this.num_minbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_minbitrate_ValueChanged); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; combo_mode.Items.Add("1-Pass Bitrate"); combo_mode.Items.Add("2-Pass Bitrate"); //combo_mode.Items.Add("3-Pass Bitrate"); combo_mode.Items.Add("Constant Quality"); combo_mode.Items.Add("2-Pass Quality"); combo_mode.Items.Add("2-Pass Size"); //combo_mode.Items.Add("3-Pass Size"); //Прописываем ME метод combo_me_method.Items.Add("Small"); //0..1 combo_me_method.Items.Add("Sab"); //-x..-2 combo_me_method.Items.Add("Funny"); //-1 combo_me_method.Items.Add("Var"); //2..256 combo_me_method.Items.Add("L2s"); //257..512 combo_me_method.Items.Add("HEX"); //513..768 combo_me_method.Items.Add("UMH"); //769..1024 combo_me_method.Items.Add("Full"); //1025..x //прописываем cmp combo_cmp.Items.Add("SAD"); combo_cmp.Items.Add("SSE"); combo_cmp.Items.Add("SATD"); combo_cmp.Items.Add("DCT"); combo_cmp.Items.Add("PSNR"); combo_cmp.Items.Add("BIT"); combo_cmp.Items.Add("RD"); combo_cmp.Items.Add("ZERO"); combo_cmp.Items.Add("VSAD"); combo_cmp.Items.Add("VSSE"); combo_cmp.Items.Add("NSSE"); //прогружаем матрицы квантизации combo_qmatrix.Items.Add("H263"); foreach (string matrix in PresetLoader.CustomMatrixes(MatrixTypes.TXT)) combo_qmatrix.Items.Add(matrix); //прогружаем fourcc combo_fourcc.Items.Add(""); combo_fourcc.Items.Add("Default"); combo_fourcc.Items.Add("FLV1"); //прогружаем mbd combo_mbd.Items.Add("Simple"); combo_mbd.Items.Add("Fewest bits"); combo_mbd.Items.Add("Rate distortion"); //пресеты настроек и качества foreach (string preset in Enum.GetNames(typeof(CodecPresets))) combo_codec_preset.Items.Add(preset); Apply_CLI.Content = Languages.Translate("Apply"); Reset_CLI.Content = Languages.Translate("Reset"); Help_CLI.Content = Languages.Translate("Help"); Reset_CLI.ToolTip = "Reset to last good CLI"; Help_CLI.ToolTip = "Show ffmpeg.exe -help full screen"; LoadFromProfile(); }
public Encoder(Massive mass, MainWindow parent) { this.InitializeComponent(); this.Owner = this.p = parent; this.m = mass.Clone(); button_info.Visibility = Visibility.Hidden; button_play.Visibility = Visibility.Hidden; button_play.Content = Languages.Translate("Play"); button_info.Content = Languages.Translate("Info"); //Прячем окно, если программа минимизирована или свернута в трей if (!p.IsVisible || p.WindowState == WindowState.Minimized) { this.Hide(); this.Name = "Hidden"; this.ActiveHandle = p.Handle; } else { this.Show(); this.ActiveHandle = new System.Windows.Interop.WindowInteropHelper(this).Handle; } this.IsVisibleChanged += new DependencyPropertyChangedEventHandler(Encoder_IsVisibleChanged); //Путь может измениться outpath_src = m.outfilepath; //А эти параметры вроде бы не меняются IsDirectRemuxingPossible = Format.IsDirectRemuxingPossible(m); DontMuxStreams = Format.GetMultiplexing(m.format); Splitting = Format.GetSplitting(m.format); muxer = Format.GetMuxer(m); //видео кодирование if (m.vencoding == "Copy") steps++; else steps = m.vpasses.Count; //аудио кодирование if (m.outaudiostreams.Count > 0) { if (muxer != Format.Muxers.Disabled || DontMuxStreams || m.format == Format.ExportFormats.Audio) steps++; string codec = ((AudioStream)(m.outaudiostreams[m.outaudiostream])).codec; if (codec == "AAC") { if (m.aac_options.encodingmode == Settings.AudioEncodingModes.TwoPass) steps++; //Два прохода //if (muxer == Format.Muxers.tsmuxer) steps++; //Извлечение aac из m4a (видимо оно больше не нужно) } else if (codec == "QAAC") { //if (muxer == Format.Muxers.tsmuxer) steps++; //Извлечение aac из m4a (видимо оно больше не нужно) } else if (codec == "Copy" && Settings.CopyDelay) CopyDelay = true; } //муксинг if (muxer == Format.Muxers.pmpavc) { steps++; steps++; steps++; steps++; } else if (muxer != Format.Muxers.Disabled && muxer != 0 && !DontMuxStreams) steps++; //точка отсчёта step--; //забиваем SetMaximum(m.outframes); combo_ending.Items.Clear(); combo_ending.Items.Add(Languages.Translate("Wait")); combo_ending.Items.Add(Languages.Translate("Standby")); if (PowerManagementNativeMethods.IsPowerHibernateAllowed()) combo_ending.Items.Add(Languages.Translate("Hibernate")); combo_ending.Items.Add(Languages.Translate("Shutdown")); combo_ending.Items.Add(Languages.Translate("Exit")); combo_ending.SelectedItem = Languages.Translate(ending.ToString()); combo_ending.ToolTip = Languages.Translate("Final action"); //фоновое кодирование CreateBackgoundWorker(); worker.RunWorkerAsync(); }
private void Refresh() { m = AviSynthScripting.CreateAutoAviSynthScript(m); p.m = m.Clone(); p.Refresh(m.script); if (m.outaudiostreams.Count > 0) { AudioStream outstream = (AudioStream)m.outaudiostreams[m.outaudiostream]; if (p.combo_aencoding.SelectedItem.ToString() != outstream.encoding) p.combo_aencoding.SelectedItem = outstream.encoding; } }
public FMPEG4(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.num_bitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bitrate_ValueChanged); this.num_bittolerance.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bittolerance_ValueChanged); this.num_buffsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_buffsize_ValueChanged); this.num_gopsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_gopsize_ValueChanged); this.num_maxbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_maxbitrate_ValueChanged); this.num_minbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_minbitrate_ValueChanged); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; combo_mode.Items.Add("1-Pass Bitrate"); combo_mode.Items.Add("2-Pass Bitrate"); //combo_mode.Items.Add("3-Pass Bitrate"); combo_mode.Items.Add("Constant Quality"); combo_mode.Items.Add("2-Pass Quality"); combo_mode.Items.Add("2-Pass Size"); //combo_mode.Items.Add("3-Pass Size"); //Прописываем ME метод #region //(me_method is only allowed to be set to zero and epzs; for hex,umh,full and others see dia_size) //http://forum.doom9.org/showthread.php?t=157282 //log, phods, and x1 don't exist. -dia_size 1040 means “exhaustive search of radius 16″, or in x264, –me esa –merange 16 /*motion_estimation_template.c (0 2 4 5 514 1040 1285) if(c->dia_size==-1) funny_diamond_search else if(c->dia_size<-1) sab_diamond_search else if(c->dia_size<2) small_diamond_search else if(c->dia_size>1024) full_search else if(c->dia_size>768) umh_search else if(c->dia_size>512) hex_search else if(c->dia_size>256) l2s_dia_search else var_diamond_search */ /* * -x..-2 sab_diamond_search * -1 funny_diamond_search * 0..1 small_diamond_search * 2..256 var_diamond_search * 257..512 l2s_dia_search * 513..768 hex_search * 769..1024 umh_search * 1025.. full_search * * 0 5s 11.08 * 1 5s 11.08 * 2- 5s 10.97 * 3 6s 10.90 * 4 7s 10.89 * 5 8s 10.86 MAP * 10 17s 10.80 * 15 33s 10.75 * 256-доооооолго * 257 5s 10.97 * 258 6s 10.88 * 260 7s 10.83 * 261 7s 10.81 MAP * -2 6s 10.98 * -4 6s 10.91 * -5 7s 10.90 */ #endregion combo_me_method.Items.Add("Small"); //0..1 combo_me_method.Items.Add("Sab"); //-x..-2 combo_me_method.Items.Add("Funny"); //-1 combo_me_method.Items.Add("Var"); //2..256 combo_me_method.Items.Add("L2s"); //257..512 combo_me_method.Items.Add("HEX"); //513..768 combo_me_method.Items.Add("UMH"); //769..1024 combo_me_method.Items.Add("Full"); //1025..x //прописываем cmp combo_cmp.Items.Add("SAD"); combo_cmp.Items.Add("SSE"); combo_cmp.Items.Add("SATD"); combo_cmp.Items.Add("DCT"); combo_cmp.Items.Add("PSNR"); combo_cmp.Items.Add("BIT"); combo_cmp.Items.Add("RD"); combo_cmp.Items.Add("ZERO"); combo_cmp.Items.Add("VSAD"); combo_cmp.Items.Add("VSSE"); combo_cmp.Items.Add("NSSE"); //прогружаем матрицы квантизации combo_qmatrix.Items.Add("H263"); foreach (string matrix in PresetLoader.CustomMatrixes(MatrixTypes.TXT)) combo_qmatrix.Items.Add(matrix); //прогружаем fourcc combo_fourcc.Items.Add(""); combo_fourcc.Items.Add("Default"); combo_fourcc.Items.Add("XVID"); combo_fourcc.Items.Add("FFDS"); combo_fourcc.Items.Add("FVFW"); combo_fourcc.Items.Add("DX50"); combo_fourcc.Items.Add("DIVX"); combo_fourcc.Items.Add("MP4V"); //прогружаем mbd combo_mbd.Items.Add("Simple"); combo_mbd.Items.Add("Fewest bits"); combo_mbd.Items.Add("Rate distortion"); //B фреймы for (int n = 0; n <= 16; n++) combo_bframes.Items.Add(n); combo_bdecision.Items.Add("Disabled"); for (int n = 1; n <= 10; n++) combo_bdecision.Items.Add(n.ToString()); combo_brefine.Items.Add("Disabled"); for (int n = 1; n <= 4; n++) combo_brefine.Items.Add(n.ToString()); //пресеты настроек и качества foreach (string preset in Enum.GetNames(typeof(CodecPresets))) combo_codec_preset.Items.Add(preset); combo_threads.Items.Add("Auto"); for (int n = 1; n <= 32; n++) combo_threads.Items.Add(n); Apply_CLI.Content = Languages.Translate("Apply"); Reset_CLI.Content = Languages.Translate("Reset"); Help_CLI.Content = Languages.Translate("Help"); Reset_CLI.ToolTip = "Reset to last good CLI"; Help_CLI.ToolTip = "Show ffmpeg.exe -help full screen"; LoadFromProfile(); }
public void Reload(Massive mass) { m = mass.Clone(); oldm = mass.Clone(); ////забиваем необходимые декодеры //if (m.vdecoder == 0) // m = Format.GetValidVDecoder(m); //if (instream.decoder == 0) // instream = Format.GetValidADecoder(instream); //перевод group_audio.Header = Languages.Translate("Source"); label_apath.Content = Languages.Translate("Path") + ":"; label_atrack.Content = Languages.Translate("Track") + ":"; this.Title = Languages.Translate("Editing audio options") + ":"; button_cancel.Content = Languages.Translate("Cancel"); button_ok.Content = Languages.Translate("OK"); button_apply.Content = Languages.Translate("Apply"); group_delay.Header = Languages.Translate("Delay"); group_info.Header = Languages.Translate("Info"); group_samplerate.Header = Languages.Translate("Samplerate"); group_volume.Header = Languages.Translate("Volume"); group_channels.Header = Languages.Translate("Channels"); label_delayout.Content = Languages.Translate("Output") + ":"; label_outsamplerate.Content = Languages.Translate("Output") + ":"; label_converter.Content = Languages.Translate("Converter") + ":"; label_accurate.Content = Languages.Translate("Analyse") + ":"; //label_mixing.Content = Languages.Translate("Mixing") + ":"; //путь к звуковой дорожке combo_atracks.Items.Clear(); if (m.inaudiostreams.Count > 0) { //забиваем в список каналы звука int n = 1; foreach (AudioStream stream in m.inaudiostreams) { ComboBoxItem item = new ComboBoxItem(); item.Content = n.ToString("00") + ". " + stream.language + " " + stream.codecshort + " " + stream.channels + "ch"; item.ToolTip = item.Content + " " + stream.samplerate + "Hz " + stream.bitrate + "kbps " + stream.delay + "ms"; combo_atracks.Items.Add(item); n++; } combo_atracks.SelectedIndex = m.inaudiostream; //определяем аудио потоки AudioStream instream = (AudioStream)m.inaudiostreams[m.inaudiostream]; if (instream.audiopath == null && instream.badmixing) { string outext = Format.GetValidRAWAudioEXT(instream.codecshort); instream.audiopath = Settings.TempPath + "\\" + m.key + "_" + m.inaudiostream + outext; instream.audiofiles = new string[] { instream.audiopath }; instream = Format.GetValidADecoder(instream); } if (instream.audiopath != null) textbox_apath.Text = instream.audiopath; } check_apply_delay.IsChecked = Settings.ApplyDelay; //только для all режима if (mode == AudioOptionsModes.AllOptions) { //прописываем samplerate combo_samplerate.Items.Clear(); foreach (string f in Format.GetValidSampleratesList(m)) combo_samplerate.Items.Add(f); combo_converter.Items.Clear(); foreach (AviSynthScripting.SamplerateModifers ratechangers in Enum.GetValues(typeof(AviSynthScripting.SamplerateModifers))) combo_converter.Items.Add(new ComboBoxItem() { Content = ratechangers }); //прописываем громкость combo_volume.Items.Clear(); combo_volume.Items.Add("Disabled"); for (int y = 30; y < 401; y += 10) combo_volume.Items.Add(y + "%"); //прописываем аккуратность определения громкости combo_accurate.Items.Clear(); for (int y = 1; y <= 9; y++) combo_accurate.Items.Add(y + "%"); for (int y = 10; y <= 100; y += 10) combo_accurate.Items.Add(y + "%"); //прогружаем работу с каналами combo_mixing.Items.Clear(); foreach (string channelschanger in Enum.GetNames(typeof(ChannelConverters))) combo_mixing.Items.Add(EnumMixingToString((ChannelConverters)Enum.Parse(typeof(ChannelConverters), channelschanger))); if (m.outaudiostreams.Count > 0) { if (((AudioStream)m.outaudiostreams[m.outaudiostream]).codec == "Copy") { group_delay.IsEnabled = Settings.CopyDelay; group_channels.IsEnabled = group_samplerate.IsEnabled = group_volume.IsEnabled = false; } else { group_delay.IsEnabled = group_channels.IsEnabled = group_samplerate.IsEnabled = group_volume.IsEnabled = true; } } else { group_delay.IsEnabled = group_channels.IsEnabled = group_samplerate.IsEnabled = group_volume.IsEnabled = false; } } //закончился режим all else { //режим только для выбора треков this.Title = Languages.Translate("Select audio track") + ":"; group_channels.Visibility = Visibility.Hidden; group_info.Visibility = Visibility.Hidden; group_samplerate.Visibility = Visibility.Hidden; group_volume.Visibility = Visibility.Hidden; group_audio.Margin = new Thickness(8, 8, 8, 0); group_delay.Margin = new Thickness(8, 100, 8, 0); button_apply.Visibility = Visibility.Hidden; button_cancel.Visibility = Visibility.Hidden; button_ok.Margin = new Thickness(0, 5, 8, 5); this.Width = 500; this.Height = 240; } //прописываем в форму текущие настройки if (m.inaudiostreams.Count > 0 && m.outaudiostreams.Count > 0) SetAudioOptions(); //прописываем информацию SetInfo(); //прописываем тултипы SetTooltips(); }
public x264(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.m = mass.Clone(); this.root_window = VideoEncWindow; this.p = parent; //Mode combo_mode.Items.Add("1-Pass Bitrate"); combo_mode.Items.Add("2-Pass Bitrate"); combo_mode.Items.Add("3-Pass Bitrate"); combo_mode.Items.Add("Constant Quality"); combo_mode.Items.Add("Constant Quantizer"); combo_mode.Items.Add("2-Pass Quality"); combo_mode.Items.Add("3-Pass Quality"); combo_mode.Items.Add("2-Pass Size"); combo_mode.Items.Add("3-Pass Size"); //AVC profile combo_avc_profile.Items.Add(new ComboBoxItem { Content = "Auto" }); combo_avc_profile.Items.Add("Baseline Profile"); combo_avc_profile.Items.Add("Main Profile"); combo_avc_profile.Items.Add("High Profile"); combo_avc_profile.Items.Add("High 10 Profile"); //AVC level combo_level.Items.Add("Unrestricted"); combo_level.Items.Add("1.0"); combo_level.Items.Add("1.1"); combo_level.Items.Add("1.2"); combo_level.Items.Add("1.3"); combo_level.Items.Add("2.0"); combo_level.Items.Add("2.1"); combo_level.Items.Add("2.2"); combo_level.Items.Add("3.0"); combo_level.Items.Add("3.1"); combo_level.Items.Add("3.2"); combo_level.Items.Add("4.0"); combo_level.Items.Add("4.1"); combo_level.Items.Add("4.2"); combo_level.Items.Add("5.0"); combo_level.Items.Add("5.1"); combo_level.Items.Add("5.2"); //Tune combo_tune.Items.Add("None"); combo_tune.Items.Add("Film"); combo_tune.Items.Add("Animation"); combo_tune.Items.Add("Grain"); combo_tune.Items.Add("Still Image"); combo_tune.Items.Add("PSNR"); combo_tune.Items.Add("SSIM"); combo_tune.Items.Add("Fast Decode"); //Adaptive Quantization for (double n = 0.1; n <= 2.1; n += 0.1) combo_adapt_quant.Items.Add(Calculate.ConvertDoubleToPointString(n, 1)); combo_adapt_quant_mode.Items.Add("None"); combo_adapt_quant_mode.Items.Add("VAQ"); combo_adapt_quant_mode.Items.Add("A-VAQ"); //прогружаем деблокинг for (int n = -6; n <= 6; n++) { combo_dstrength.Items.Add(n); combo_dthreshold.Items.Add(n); } //Прописываем subme combo_subme.Items.Add("0 - Fullpel only"); combo_subme.Items.Add("1 - QPel SAD"); combo_subme.Items.Add("2 - QPel SATD"); combo_subme.Items.Add("3 - HPel on MB then QPel"); combo_subme.Items.Add("4 - Always QPel"); combo_subme.Items.Add("5 - QPel & Bidir ME"); combo_subme.Items.Add("6 - RD on I/P frames"); combo_subme.Items.Add("7 - RD on all frames"); combo_subme.Items.Add("8 - RD refinement on I/P frames"); combo_subme.Items.Add("9 - RD refinement on all frames"); combo_subme.Items.Add("10 - QP-RD"); combo_subme.Items.Add("11 - Full RD"); //прописываем me алгоритм combo_me.Items.Add("Diamond"); combo_me.Items.Add("Hexagon"); combo_me.Items.Add("Multi Hexagon"); combo_me.Items.Add("Exhaustive"); combo_me.Items.Add("SATD Exhaustive"); //прописываем me range for (int n = 4; n <= 64; n++) combo_merange.Items.Add(n); //B фреймы for (int n = 0; n <= 16; n++) combo_bframes.Items.Add(n); //режим B фреймов combo_bframe_mode.Items.Add("Disabled"); combo_bframe_mode.Items.Add("Spatial"); combo_bframe_mode.Items.Add("Temporal"); combo_bframe_mode.Items.Add("Auto"); //trellis combo_trellis.Items.Add("0 - Disabled"); combo_trellis.Items.Add("1 - Final MB"); combo_trellis.Items.Add("2 - Always"); //refernce frames for (int n = 1; n <= 16; n++) combo_ref.Items.Add(n); combo_open_gop.Items.Add("No"); combo_open_gop.Items.Add("Yes"); //Кол-во потоков для lookahead combo_lookahead_threads.Items.Add("Auto"); for (int n = 1; n <= 10; n++) combo_lookahead_threads.Items.Add(Convert.ToString(n)); //Кол-во потоков для x264-го combo_threads_count.Items.Add("Auto"); combo_threads_count.Items.Add("1"); combo_threads_count.Items.Add("1+1"); //+ --thread-input for (int n = 2; n <= 32; n++) combo_threads_count.Items.Add(Convert.ToString(n)); //-b-adapt combo_badapt_mode.Items.Add("Disabled"); combo_badapt_mode.Items.Add("Fast"); combo_badapt_mode.Items.Add("Optimal"); //--b-pyramid combo_bpyramid_mode.Items.Add("None"); combo_bpyramid_mode.Items.Add("Strict"); combo_bpyramid_mode.Items.Add("Normal"); //--weightp combo_weightp_mode.Items.Add("Disabled"); combo_weightp_mode.Items.Add("Blind offset"); combo_weightp_mode.Items.Add("Smart analysis"); combo_nal_hrd.Items.Add("None"); combo_nal_hrd.Items.Add("VBR"); combo_nal_hrd.Items.Add("CBR"); combo_range_in.Items.Add("Auto"); combo_range_in.Items.Add("TV"); combo_range_in.Items.Add("PC"); combo_range_out.Items.Add("Auto"); combo_range_out.Items.Add("TV"); combo_range_out.Items.Add("PC"); combo_colorprim.Items.Add("Undefined"); combo_colorprim.Items.Add("bt709"); combo_colorprim.Items.Add("bt470m"); combo_colorprim.Items.Add("bt470bg"); combo_colorprim.Items.Add("smpte170m"); combo_colorprim.Items.Add("smpte240m"); combo_colorprim.Items.Add("film"); combo_transfer.Items.Add("Undefined"); combo_transfer.Items.Add("bt709"); combo_transfer.Items.Add("bt470m"); combo_transfer.Items.Add("bt470bg"); combo_transfer.Items.Add("linear"); combo_transfer.Items.Add("log100"); combo_transfer.Items.Add("log316"); combo_transfer.Items.Add("smpte170m"); combo_transfer.Items.Add("smpte240m"); combo_colormatrix.Items.Add("Undefined"); combo_colormatrix.Items.Add("bt709"); combo_colormatrix.Items.Add("fcc"); combo_colormatrix.Items.Add("bt470bg"); combo_colormatrix.Items.Add("smpte170m"); combo_colormatrix.Items.Add("smpte240m"); combo_colormatrix.Items.Add("GBR"); combo_colormatrix.Items.Add("YCgCo"); combo_colorspace.Items.Add("I420"); combo_colorspace.Items.Add("I422"); combo_colorspace.Items.Add("I444"); combo_colorspace.Items.Add("RGB"); text_mode.Content = Languages.Translate("Encoding mode") + ":"; Apply_CLI.Content = Languages.Translate("Apply"); Reset_CLI.Content = Languages.Translate("Reset"); x264_help.Content = Languages.Translate("Help"); Reset_CLI.ToolTip = "Reset to last good CLI"; x264_help.ToolTip = "Show x264.exe --fullhelp screen"; LoadFromProfile(); }
public Decoders_Settings(Massive mass, System.Windows.Window owner, int set_focus_to) { this.InitializeComponent(); this.Owner = owner; if (mass != null) { default_index = -1; m = mass.Clone(); //Скрипт для определения изменений m = AviSynthScripting.CreateAutoAviSynthScript(m); old_raw_script = m.script; } //переводим Title = Languages.Translate("Decoding"); button_ok.Content = Languages.Translate("OK"); check_dss_convert_fps.ToolTip = _def + on; check_dss_audio.Content = check_ffms_audio.Content = check_lsmash_audio.Content = Languages.Translate("Enable Audio"); check_dss_audio.ToolTip = Languages.Translate("Allow DirectShowSource to decode audio directly from the source-file (without demuxing)"); check_force_film.Content = Languages.Translate("Auto force Film at") + " (%):"; check_force_film.ToolTip = Languages.Translate("Auto force Film if Film percentage is more than selected value (for NTSC sources only)") + "\r\n\r\n" + _def + on; num_force_film.ToolTip = _def + "95"; check_ffms_force_fps.Content = check_lsmash_force_fps.Content = Languages.Translate("Add AssumeFPS()"); check_ffms_force_fps.ToolTip = check_lsmash_force_fps.ToolTip = Languages.Translate("Force FPS using AssumeFPS()") + "\r\n\r\n" + _def + on; check_ffms_audio.ToolTip = check_dss_audio.ToolTip.ToString().Replace("DirectShowSource", "FFmpegSource2") + "\r\n\r\n" + _def + off; check_lsmash_audio.ToolTip = check_dss_audio.ToolTip.ToString().Replace("DirectShowSource", "LSMASH/LWLibav") + "\r\n\r\n" + _def + on; check_dss_audio.ToolTip += "\r\n\r\n" + _def + on; check_ffms_reindex.Content = Languages.Translate("Overwrite existing index files"); check_ffms_reindex.ToolTip = Languages.Translate("Always re-index the source file and overwrite existing index file, even if it was valid") + "\r\n\r\n" + _def + off; check_ffms_timecodes.Content = Languages.Translate("Timecodes"); check_ffms_timecodes.ToolTip = Languages.Translate("Extract timecodes to a file") + "\r\n\r\n" + _def + off; combo_ffms_threads.ToolTip = label_ffms_threads.ToolTip = "1 = " + Languages.Translate("disable multithreading (recommended)") + "\r\nAuto = " + Languages.Translate("logical CPU's count") + "\r\n\r\n" + Languages.Translate("Attention! Multithreaded decoding can be unstable!") + "\r\n\r\n" + _def + "1"; label_ffms_threads.Content = label_lsmash_threads.Content = "- " + Languages.Translate("Decoding threads").ToLower(); combo_lsmash_threads.ToolTip = label_lsmash_threads.ToolTip = _def + "Auto"; check_drc_ac3.ToolTip = check_drc_dts.ToolTip = Languages.Translate("Apply DRC (Dynamic Range Compression) for this decoder") + "\r\n\r\n" + _def + off; group_misc.Header = Languages.Translate("Misc"); check_enable_audio.Content = Languages.Translate("Enable audio in input files"); check_enable_audio.ToolTip = Languages.Translate("If checked, input files will be opened with audio, otherwise they will be opened WITHOUT audio!") + "\r\n" + Languages.Translate("Audio files - exception, they always will be opened.") + "\r\n\r\n" + _def + on; check_new_delay.Content = Languages.Translate("Use new Delay calculation method"); check_new_delay.ToolTip = Languages.Translate("A new method uses the difference between video and audio delays, while old method uses audio delay only.") + "\r\n\r\n" + _def + off; check_copy_delay.Content = Languages.Translate("Apply Delay in Copy mode"); check_copy_delay.ToolTip = _def + off; button_vdec_add.Content = button_adec_add.Content = Languages.Translate("Add"); button_vdec_delete.Content = button_adec_delete.Content = Languages.Translate("Remove"); button_vdec_reset.Content = button_adec_reset.Content = Languages.Translate("Reset"); group_tracks.Header = Languages.Translate("Track selection"); check_tracks_manual.Content = Languages.Translate("Manual"); check_tracks_manual.ToolTip = Languages.Translate("During the opening of the file you will be prompted to select the track."); check_tracks_language.ToolTip = combo_tracks_language.ToolTip = Languages.Translate("The first track in this language will be automatically selected during the opening of the file.") + "\r\n" + Languages.Translate("If none of the tracks are matches, the very first track will be choosen."); check_tracks_number.ToolTip = combo_tracks_number.ToolTip = Languages.Translate("The track with this ordinal number will be automatically selected during the opening of the file.") + "\r\n" + Languages.Translate("If specified value exceeds the amount of the tracks in the file, the very first track will be choosen."); //DirectShowSource check_dss_convert_fps.IsChecked = Settings.DSS_ConvertFPS; check_dss_audio.IsChecked = Settings.DSS_Enable_Audio; //DirectShowSource2 check_dss2_lavs.ToolTip = Languages.Translate("Use LAV Splitter to separate streams."); check_dss2_lavd.ToolTip = Languages.Translate("Use LAV Video Decoder to decode video stream.") + "\r\n" + Languages.Translate("If enabled, any other installed DirectShow filters will not be used and they will not affect the output!"); button_lavs.ToolTip = check_dss2_lavs.ToolTip + "\r\n\r\n" + Languages.Translate("Press this button to open LAV Splitter settings tab."); button_lavd.ToolTip = check_dss2_lavd.ToolTip + "\r\n\r\n" + Languages.Translate("Press this button to open LAV Video Decoder settings tab."); check_dss2_lavs.ToolTip += "\r\n\r\n" + _def + on; check_dss2_lavd.ToolTip += "\r\n\r\n" + _def + on; check_dss2_lavs.IsChecked = Settings.DSS2_LAVSplitter; check_dss2_lavd.IsChecked = Settings.DSS2_LAVDecoder; string txt_no = Languages.Translate("No"); label_dss2_subsm.ToolTip = Languages.Translate("Subtitles mode") + "\r\n\r\n" + _def + txt_no; combo_dss2_subsm.Items.Add(new ComboBoxItem() { Content = txt_no, ToolTip = Languages.Translate("Do not load subtitles") }); combo_dss2_subsm.Items.Add(new ComboBoxItem() { Content = "1", ToolTip = Languages.Translate("Try to load subtitles (with LAV Decoder = \"No\")") }); combo_dss2_subsm.Items.Add(new ComboBoxItem() { Content = "2", ToolTip = Languages.Translate("Force loading DirectVobSub and then try to load subtitles") }); combo_dss2_subsm.Tag = _def + txt_no; combo_dss2_subsm.SelectedIndex = Settings.DSS2_SubsMode; check_dss2_flipv.ToolTip = Languages.Translate("Flip vertical") + "\r\n\r\n" + _def + off; check_dss2_fliph.ToolTip = Languages.Translate("Flip horizontal") + "\r\n\r\n" + _def + off; check_dss2_flipv.IsChecked = Settings.DSS2_FlipV; check_dss2_fliph.IsChecked = Settings.DSS2_FlipH; label_dss2_preroll.ToolTip = num_dss2_preroll.ToolTip = Languages.Translate("Preroll - it's a number of frames that will be minused from the requested frame No. when seeking to desired position.") + "\r\n" + Languages.Translate("All \"extra-frames\" will be read frame-by-frame till we get what we want (slower, but more precise way).") + "\r\n" + Languages.Translate("If after the seeking you can see artifacts or frozen frames for some time - you may want to increase this value.") + "\r\n\r\n" + _def + "15"; num_dss2_preroll.Value = Settings.DSS2_Preroll; //MPEG2Source check_force_film.IsChecked = Settings.DGForceFilm; num_force_film.Value = Settings.DGFilmPercent; //FFmpegSource2 check_ffms_force_fps.IsChecked = Settings.FFMS_AssumeFPS; check_ffms_audio.IsChecked = Settings.FFMS_Enable_Audio; check_ffms_reindex.IsChecked = Settings.FFMS_Reindex; check_ffms_timecodes.IsChecked = Settings.FFMS_TimeCodes; combo_ffms_threads.Items.Add("Auto"); for (int i = 1; i < 21; i++) combo_ffms_threads.Items.Add(i); combo_ffms_threads.SelectedIndex = Settings.FFMS_Threads; check_lsmash_force_fps.IsChecked = Settings.LSMASH_AssumeFPS; check_lsmash_audio.IsChecked = Settings.LSMASH_Enable_Audio; combo_lsmash_threads.Items.Add("Auto"); for (int i = 1; i < 21; i++) combo_lsmash_threads.Items.Add(i); combo_lsmash_threads.SelectedIndex = Settings.LSMASH_Threads; //Режим автовыбора треков if (Settings.DefaultATrackMode == Settings.ATrackModes.Language) check_tracks_language.IsChecked = true; else if (Settings.DefaultATrackMode == Settings.ATrackModes.Number) check_tracks_number.IsChecked = true; else check_tracks_manual.IsChecked = true; //Языки треков ArrayList languages = new ArrayList(); languages.Add(Settings.DefaultATrackLang); foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures)) { string name = ci.EnglishName.Split(new char[] { ' ' })[0]; if (!languages.Contains(name)) languages.Add(name); } languages.Sort(); combo_tracks_language.Items.Add(""); combo_tracks_language.Items.Add("Unknown"); foreach (string name in languages) combo_tracks_language.Items.Add(name); combo_tracks_language.SelectedItem = Settings.DefaultATrackLang; //Номера треков for (int i = 1; i < 21; i++) combo_tracks_number.Items.Add(i); combo_tracks_number.SelectedIndex = Settings.DefaultATrackNum - 1; //NicAudio check_drc_ac3.IsChecked = Settings.NicAC3_DRC; check_drc_dts.IsChecked = Settings.NicDTS_DRC; //Audio check_enable_audio.IsChecked = Settings.EnableAudio; check_new_delay.IsChecked = Settings.NewDelayMethod; check_copy_delay.IsChecked = Settings.CopyDelay; //Выбираем вкладку if (set_focus_to == 2) tab_audio.IsSelected = true; //Загружаем Видео\Аудио декодеры LoadVDecodersListView(default_index); LoadADecodersListView(default_index); //Выбираем декодеры SelectDecoders(); ShowDialog(); }
public Task(string thm, TaskStatus status, Massive mass) { _info = ""; _thm = thm; _status = status; _name = Path.GetFileName(mass.outfilepath); if (mass.outvcodec != "Copy" && mass.outvcodec != "Disabled") { //Переопределение некоторых параметров видео на основе текущего скрипта (т.к. он мог быть изменен вручную) if (Settings.ReadScript) //если в настройках это разрешено { bool recalc_sar = false; AviSynthReader reader = null; try { reader = new AviSynthReader(); reader.ParseScript(mass.script); if (mass.outresw != reader.Width) { if (mass.outvcodec == "x264" && Calculate.GetScriptBitDepth(mass.script) != 8) { if (mass.outresw != reader.Width / 2) { mass.outresw = reader.Width / 2; recalc_sar = true; } } else { mass.outresw = reader.Width; recalc_sar = true; } } if (mass.outresh != reader.Height) { mass.outresh = reader.Height; recalc_sar = true; } mass.outframes = reader.FrameCount; mass.outframerate = Calculate.ConvertDoubleToPointString(reader.Framerate); mass.outduration = TimeSpan.FromSeconds((double)mass.outframes / reader.Framerate); mass.outfilesize = Calculate.GetEncodingSize(mass); } catch { } finally { reader.Close(); reader = null; } //Переопределяем SAR в случае анаморфного кодирования (если разрешение поменялось) if (recalc_sar && mass.sar != null && mass.sar != "1:1") { mass = Calculate.CalculateSAR(mass); } } _info += mass.outresw + "x" + mass.outresh; _info += " " + mass.outframerate; if (mass.encodingmode == Settings.EncodingModes.Quality || mass.encodingmode == Settings.EncodingModes.Quantizer || mass.encodingmode == Settings.EncodingModes.TwoPassQuality || mass.encodingmode == Settings.EncodingModes.ThreePassQuality) _info += " Q" + Calculate.ConvertDoubleToPointString((double)mass.outvbitrate, 1); else if (mass.encodingmode == Settings.EncodingModes.TwoPassSize || mass.encodingmode == Settings.EncodingModes.ThreePassSize || mass.encodingmode == Settings.EncodingModes.OnePassSize) _info += " " + mass.outvbitrate + "mb"; else _info += " " + mass.outvbitrate + "kbps"; } else if (mass.outvcodec == "Copy") { _info += mass.inresw + "x" + mass.inresh; _info += " " + mass.inframerate; _info += " " + mass.invbitrate + "kbps"; } if (mass.outaudiostreams.Count > 0) { AudioStream outstream = (AudioStream)mass.outaudiostreams[mass.outaudiostream]; if (outstream.codec != "Copy") { _info += " " + outstream.samplerate + "Hz"; _info += " " + Calculate.ExplainChannels(outstream.channels); _info += " " + ((outstream.bitrate > 0) ? outstream.bitrate + "kbps" : "VBR"); if (mass.volume != "Disabled") _info += " " + mass.volume; } else { if (mass.inaudiostreams.Count > 0) { AudioStream instream = (AudioStream)mass.inaudiostreams[mass.inaudiostream]; _info += " " + instream.samplerate + "Hz"; _info += " " + Calculate.ExplainChannels(instream.channels); _info += " " + instream.bitrate + "kbps"; } } } _info += " " + ((mass.outfilesize != Languages.Translate("Unknown")) ? mass.outfilesize.Replace(" ", "") : "?mb"); _mass = mass.Clone(); _id = mass.key; }
public VideoEncoding(Massive mass, MainWindow parent) { this.InitializeComponent(); if (mass != null) { this.m = mass.Clone(); this.oldm = mass.Clone(); } else { //Заполняем массив m = new Massive(); m.format = Settings.FormatOut; m.vencoding = old_vencoding = Settings.GetVEncodingPreset(m.format); m.outvcodec = PresetLoader.GetVCodec(m); m.vpasses = PresetLoader.GetVCodecPasses(m); m = PresetLoader.DecodePresets(m); m.infilepath = "C:\\file.mkv"; m.invcodecshort = "NOINPUT"; m.inresw = m.outresw = 640; m.inresh = m.outresh = 480; m.induration = m.outduration = TimeSpan.FromMinutes(1); m.inframerate = m.outframerate = "25.000"; m.inframes = m.outframes = 1000; m.infilesizeint = 1000; m.invbitrate = 1000; //Убираем лишнее, т.к. всё-равно показывать там нечего text_insize_value.Visibility = text_outsize_value.Visibility = Visibility.Collapsed; text_inquality_value.Visibility = text_outquality_value.Visibility = Visibility.Collapsed; text_codec.Margin = text_incodec_value.Margin = combo_codec.Margin = new Thickness(16, 8, 16, 8); row2.Height = row3.Height = new GridLength(0); } this.Owner = this.p = parent; //загружаем список кодеков соответвующий формату foreach (string codec in Format.GetVCodecsList(m.format)) combo_codec.Items.Add(codec); combo_codec.Items.Add("Copy"); if (!combo_codec.Items.Contains(m.outvcodec)) combo_codec.Items.Add(m.outvcodec); combo_codec.SelectedItem = m.outvcodec; text_incodec_value.Content = m.invcodecshort; text_insize_value.Content = m.infilesize; text_outsize_value.Content = m.outfilesize = Calculate.GetEncodingSize(m); //загружаем правильную страницу LoadCodecWindow(); //переводим Title = Languages.Translate("Video encoding settings"); text_size.Content = Languages.Translate("Size") + ":"; text_codec.Content = Languages.Translate("Codec") + ":"; text_quality.Content = Languages.Translate("Quality") + ":"; text_profile.Content = Languages.Translate("Profile:"); button_cancel.Content = Languages.Translate("Cancel"); button_ok.Content = Languages.Translate("OK"); button_add.ToolTip = Languages.Translate("Add profile"); button_remove.ToolTip = Languages.Translate("Remove profile"); //bit-pixels calculation text_inquality_value.Content = Calculate.GetQualityIn(m); text_outquality_value.Content = Calculate.GetQualityOut(m, true); LoadProfiles(); ShowDialog(); }
public FMPEG2(Massive mass, VideoEncoding VideoEncWindow, MainWindow parent) { this.InitializeComponent(); this.num_bitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bitrate_ValueChanged); this.num_bittolerance.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_bittolerance_ValueChanged); this.num_buffsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_buffsize_ValueChanged); this.num_gopsize.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_gopsize_ValueChanged); this.num_maxbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_maxbitrate_ValueChanged); this.num_minbitrate.ValueChanged += new RoutedPropertyChangedEventHandler<decimal>(num_minbitrate_ValueChanged); this.m = mass.Clone(); this.p = parent; this.root_window = VideoEncWindow; combo_mode.Items.Add("1-Pass Bitrate"); combo_mode.Items.Add("2-Pass Bitrate"); //combo_mode.Items.Add("3-Pass Bitrate"); combo_mode.Items.Add("Constant Quality"); combo_mode.Items.Add("2-Pass Quality"); combo_mode.Items.Add("2-Pass Size"); //combo_mode.Items.Add("3-Pass Size"); //Прописываем ME метод //combo_me_method.Items.Add("ZERO"); //combo_me_method.Items.Add("FULL"); //combo_me_method.Items.Add("EPSZ"); //combo_me_method.Items.Add("LOG"); //combo_me_method.Items.Add("PHODS"); //combo_me_method.Items.Add("X1"); //combo_me_method.Items.Add("HEX"); //combo_me_method.Items.Add("UMH"); //combo_me_method.Items.Add("ITER"); combo_me_method.Items.Add("Default Search"); //0 combo_me_method.Items.Add("Sab Diamond Search"); //-2- combo_me_method.Items.Add("Funny Diamond Search"); //-1 combo_me_method.Items.Add("Small Diamond Search"); //2+ combo_me_method.Items.Add("L2s Diamond Search"); //257+ combo_me_method.Items.Add("HEX Search"); //513+ combo_me_method.Items.Add("UMH Search"); //769+ combo_me_method.Items.Add("Full Search"); //1025+ //прописываем cmp combo_cmp.Items.Add("SAD"); combo_cmp.Items.Add("SSE"); combo_cmp.Items.Add("SATD"); combo_cmp.Items.Add("DCT"); combo_cmp.Items.Add("PSNR"); combo_cmp.Items.Add("BIT"); combo_cmp.Items.Add("RD"); combo_cmp.Items.Add("ZERO"); combo_cmp.Items.Add("VSAD"); combo_cmp.Items.Add("VSSE"); combo_cmp.Items.Add("NSSE"); //combo_cmp.Items.Add("W53"); //combo_cmp.Items.Add("W97"); //прогружаем матрицы квантизации combo_qmatrix.Items.Add("H263"); foreach (string matrix in PresetLoader.CustomMatrixes(MatrixTypes.TXT)) combo_qmatrix.Items.Add(matrix); //прогружаем fourcc combo_fourcc.Items.Add("MPEG"); combo_fourcc.Items.Add("MPG2"); //прогружаем векторы combo_mvectors.Items.Add("Disabled"); combo_mvectors.Items.Add("MV0"); combo_mvectors.Items.Add("MV4"); combo_mvectors.Items.Add("Unlimited"); //прогружаем mbd combo_mbd.Items.Add("Simple"); combo_mbd.Items.Add("Fewest bits"); combo_mbd.Items.Add("Rate distortion"); //B фреймы for (int n = 0; n <= 16; n++) combo_bframes.Items.Add(n); combo_bdecision.Items.Add("Disabled"); for (int n = 0; n <= 10; n++) combo_bdecision.Items.Add(n.ToString()); combo_brefine.Items.Add("Disabled"); for (int n = 0; n <= 4; n++) combo_brefine.Items.Add(n.ToString()); //пресеты настроек и качества foreach (string preset in Enum.GetNames(typeof(CodecPresets))) combo_codec_preset.Items.Add(preset); LoadFromProfile(); }
public VisualCrop(Massive mass, Window owner) { m = mass.Clone(); oldm = mass.Clone(); this.InitializeComponent(); this.Owner = owner; //Создаем скрипт (т.к. текущий с кропом и ресайзом не годится) script = AviSynthScripting.GetInfoScript(m, AviSynthScripting.ScriptMode.VCrop); numl.Value = left = m.cropl; numr.Value = right = m.cropr; numt.Value = top = m.cropt; numb.Value = bottom = m.cropb; Color color = Settings.VCropBrush; slider_R.Value = R = color.R; slider_G.Value = G = color.G; slider_B.Value = B = color.B; slider_A.Value = A = color.A; FinalColor.Color = Color.FromArgb(255, R, G, B); numl.ToolTip = Languages.Translate("Left"); numt.ToolTip = Languages.Translate("Top"); numr.ToolTip = Languages.Translate("Right"); numb.ToolTip = Languages.Translate("Bottom"); button_autocrop.Content = Languages.Translate("Analyse"); button_autocrop.ToolTip = Languages.Translate("Autocrop black borders"); button_autocrop_current.ToolTip = Languages.Translate("Autocrop on current frame"); button_uncrop.ToolTip = Languages.Translate("Remove crop"); button_settings.ToolTip = Languages.Translate("Settings"); slider_A.ToolTip = Languages.Translate("Transparency of the mask"); slider_R.ToolTip = slider_G.ToolTip = slider_B.ToolTip = Languages.Translate("Brightness of the mask"); button_fullscreen.ToolTip = Languages.Translate("Fullscreen mode"); button_cancel.Content = Languages.Translate("Cancel"); frame_of = Languages.Translate("Frame XX of YY").ToLower(); cropped_s = Languages.Translate("cropped size"); try { reader = new AviSynthReader(AviSynthColorspace.RGB24, AudioSampleType.Undefined); reader.ParseScript(script); if (reader.Clip.HasVideo && reader.FrameCount > 0) { slider_pos.Maximum = reader.FrameCount; slider_pos.Value = (Settings.VCropFrame == "THM-frame") ? m.thmframe : 0; numl.Maximum = numr.Maximum = width = reader.Width; numt.Maximum = numb.Maximum = height = reader.Height; fps = reader.Framerate; stride = width * bpp; buffer = Marshal.AllocHGlobal(stride * height); HasVideo = true; SetFrame((int)slider_pos.Value); ShowCroppedFrame(); } else { PreviewError("NO VIDEO", Brushes.Gainsboro); } } catch (Exception ex) { SetPreviewError(ex); } if (IsError) { CloseReader(); Close(); } else { WindowLoaded = true; ShowDialog(); } }