private void InitAssConverter() { subinfo = new SubInfo(); ffmpegHelper = new FfmpegHelper(); ffmpegHelper.FfmpegPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\ffmpeg.exe"); //硬编码! frameRates = new List <FrameRate>(); frameRates.Add(new FrameRate("10 帧/秒", "10")); frameRates.Add(new FrameRate("12 帧/秒", "12")); frameRates.Add(new FrameRate("12.5 帧/秒", "12500/1000")); frameRates.Add(new FrameRate("15 帧/秒", "15")); frameRates.Add(new FrameRate("23.976 帧/秒", "24000/1001")); frameRates.Add(new FrameRate("24 帧/秒", "24")); frameRates.Add(new FrameRate("25 帧/秒", "25")); frameRates.Add(new FrameRate("29.97 帧/秒", "30000/1001")); frameRates.Add(new FrameRate("30 帧/秒", "30")); frameRates.Add(new FrameRate("50 帧/秒", "50")); frameRates.Add(new FrameRate("59.94 帧/秒", "60000/1001")); frameRates.Add(new FrameRate("60 帧/秒", "60")); frameRates.Add(new FrameRate("自定义...", "")); foreach (var frameRate in frameRates) { comboBox_FrameRate.Items.Add(frameRate.Name); } //默认30帧 comboBox_FrameRate.SelectedIndex = 8; resolutions = new List <Resolution>(); resolutions.Add(new Resolution("360P (640×360)", 640, 360)); resolutions.Add(new Resolution("480P/SD (854×480)", 854, 480)); resolutions.Add(new Resolution("540P (960×540)", 960, 540)); resolutions.Add(new Resolution("720P/HD (1280×720)", 1280, 720)); resolutions.Add(new Resolution("1080P/FHD (1920×1080)", 1920, 1080)); resolutions.Add(new Resolution("2K/QHD (2560×1440)", 2560, 1440)); resolutions.Add(new Resolution("4K UHD (3840×2160)", 3840, 2160)); resolutions.Add(new Resolution("8K UHD (7680×4320)", 7680, 4320)); resolutions.Add(new Resolution("QVGA (320×240)", 320, 240)); resolutions.Add(new Resolution("VGA (640×480)", 640, 480)); resolutions.Add(new Resolution("SVGA (800×600)", 800, 600)); resolutions.Add(new Resolution("XGA (1024×768)", 1024, 768)); resolutions.Add(new Resolution("SXGA (1280×1024)", 1280, 1024)); foreach (var resolution in resolutions) { comboBox_Resolution.Items.Add(resolution.Name); } //默认1080P comboBox_Resolution.SelectedIndex = 4; }
private void InitAssConverter() { subinfo = new SubInfo(); ffmpegHelper = new FfmpegHelper(); ffmpegHelper.FfmpegPath = String.Format("{0}{1}", System.AppDomain.CurrentDomain.BaseDirectory, "\\bin\\ffmpeg.exe"); }