private void DoEncodeVideo(EncodeInfo job) { switch (job.VideoProfile.Type) { case ProfileType.X264: { X264 x264Enc = new X264(); x264Enc.SetJob(job); _worker.DoWork += x264Enc.DoEncode; Log.Info("x264Encoder.DoEncode()"); } break; case ProfileType.HcEnc: { HcEnc hcEnc = new HcEnc(); hcEnc.SetJob(job); _worker.DoWork += hcEnc.DoEncodeDvd; Log.Info("HCEnc.DoEncodeDVD()"); } break; case ProfileType.VP8: { VpxEnc vpxEnc = new VpxEnc(); vpxEnc.SetJob(job); _worker.DoWork += vpxEnc.DoEncode; Log.Info("VpxEnc.DoEncode()"); } break; } }
public static void GetAppVersions(string encPath = "", string javaPath = "") { if (String.IsNullOrEmpty(encPath)) { encPath = AppSettings.ToolsPath; } if (String.IsNullOrEmpty(javaPath)) { javaPath = AppSettings.JavaInstallPath; } X264 x264Enc = new X264(); AppSettings.Lastx264Ver = x264Enc.GetVersionInfo(encPath, false); if (Environment.Is64BitOperatingSystem) { AppSettings.Lastx26464Ver = x264Enc.GetVersionInfo(encPath, true); } FfMpeg ffmpeg = new FfMpeg(); AppSettings.LastffmpegVer = ffmpeg.GetVersionInfo(encPath, false); if (Environment.Is64BitOperatingSystem) { AppSettings.Lastffmpeg64Ver = ffmpeg.GetVersionInfo(encPath, true); } Eac3To eac3To = new Eac3To(); AppSettings.Lasteac3ToVer = eac3To.GetVersionInfo(encPath); LsDvd lsdvd = new LsDvd(); AppSettings.LastlsdvdVer = lsdvd.GetVersionInfo(encPath); MkvMerge mkvMerge = new MkvMerge(); AppSettings.LastMKVMergeVer = mkvMerge.GetVersionInfo(encPath); MPlayer mplayer = new MPlayer(); AppSettings.LastMplayerVer = mplayer.GetVersionInfo(encPath); TsMuxeR tsmuxer = new TsMuxeR(); AppSettings.LastTSMuxerVer = tsmuxer.GetVersionInfo(encPath); MJpeg mjpeg = new MJpeg(); AppSettings.LastMJPEGToolsVer = mjpeg.GetVersionInfo(encPath); DvdAuthor dvdauthor = new DvdAuthor(); AppSettings.LastDVDAuthorVer = dvdauthor.GetVersionInfo(encPath); MP4Box mp4Box = new MP4Box(); AppSettings.LastMp4BoxVer = mp4Box.GetVersionInfo(encPath); HcEnc hcenc = new HcEnc(); AppSettings.LastHcEncVer = hcenc.GetVersionInfo(encPath); OggEnc ogg = new OggEnc(); AppSettings.LastOggEncVer = ogg.GetVersionInfo(encPath, false); if (AppSettings.UseOptimizedEncoders) { AppSettings.LastOggEncLancerVer = ogg.GetVersionInfo(encPath, true); } NeroAACEnc aac = new NeroAACEnc(); AppSettings.LastNeroAacEncVer = aac.GetVersionInfo(encPath); Lame lame = new Lame(); AppSettings.LastLameVer = lame.GetVersionInfo(encPath); VpxEnc vpxEnc = new VpxEnc(); AppSettings.LastVpxEncVer = vpxEnc.GetVersionInfo(encPath); XvidEnc xvidEnc = new XvidEnc(); string myVer = xvidEnc.GetVersionInfo(encPath); if (!String.IsNullOrEmpty(javaPath)) { BdSup2SubTool bdSup2Sub = new BdSup2SubTool(); AppSettings.LastBDSup2SubVer = bdSup2Sub.GetVersionInfo(encPath, javaPath); } #region Get AviSynth Version IGraphBuilder graphBuilder = (IGraphBuilder) new FilterGraph(); string avsFile = AviSynthGenerator.GenerateTestFile(); int result = graphBuilder.RenderFile(avsFile, null); Log.DebugFormat("RenderFile Result: {0}", result); if (result < 0) { Log.Debug("AviSynth is not installed"); } else { FileVersionInfo ver = FileVersionInfo.GetVersionInfo(Path.Combine(Environment.SystemDirectory, "avisynth.dll")); string appVer = String.Format("{0:g}.{1:g}.{2:g}.{3:g}", ver.FileMajorPart, ver.FileMinorPart, ver.FileBuildPart, ver.FilePrivatePart); Log.DebugFormat("Avisynth version {0:s} installed", appVer); AppSettings.LastAviSynthVer = appVer; } File.Delete(avsFile); #endregion GetAviSynthPluginsVer(); GetUpdaterVersion(); AppSettings.UpdateVersions = false; AppSettings.SaveSettings(); }