public bool Apply(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { if (extraConfig.Video) { return(ConfigureToVideoOutput(capture, extraConfig)); } else { return(ConfigureToAudioOutput(capture, extraConfig)); } }
public override bool Apply(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { bool isValid = true; bool audioCompress = false; bool videoCompress = false; var output = Config.Current.OutputSetting; capture.RecordingMethod = VidGrab.TRecordingMethod.rm_MP4; if (!output.Video.UseNativeFormat) { videoCompress = true; isValid = OutputSetting.ConfigureVideoCompressor(capture, this.VideoCompressor); } if (!isValid) { return(false); } if (output.Video.UseNativeFormat && !Config.Current.OutputSetting.UseAudioFromCamera) { audioCompress = true; isValid = OutputSetting.ConfigureAudioCompressor(capture, this.AudioCompressor); } if (!isValid) { return(false); } if (videoCompress && audioCompress) { capture.CompressionType = VidGrab.TCompressionType.ct_AudioVideo; capture.CompressionMode = VidGrab.TCompressionMode.cm_CompressOnTheFly; } else if (videoCompress) { capture.CompressionType = VidGrab.TCompressionType.ct_Video; capture.CompressionMode = VidGrab.TCompressionMode.cm_CompressOnTheFly; } else if (audioCompress) { capture.CompressionType = VidGrab.TCompressionType.ct_Audio; capture.CompressionMode = VidGrab.TCompressionMode.cm_CompressOnTheFly; } return(true); }
private bool ConfigureToAudioOutput(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { Config config = Config.Current; // Captura de audio capture.VideoRenderer = VidGrab.TVideoRenderer.vr_None; capture.CompressionMode = VidGrab.TCompressionMode.cm_CompressOnTheFly; capture.CompressionType = VidGrab.TCompressionType.ct_Audio; capture.RecordingInNativeFormat = false; capture.RecordingMethod = VidGrab.TRecordingMethod.rm_AVI; bool isValid = ConfigureAudioCompressor(capture, this.AudioCompressor); return(isValid); }
internal bool Apply(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { capture.VideoRenderer = VidGrab.TVideoRenderer.vr_AutoSelect; capture.DVTimeCodeEnabled = false; capture.DVDateTimeEnabled = false; // TODO: Ver como hacer para agregar audio de entrada de linea utilizando esta opcion capture.RecordingInNativeFormat = this.UseNativeFormat; if (this.Format == "mp4") { return(this.Mp4.Apply(capture, extraConfig)); } else { return(this.WMV.Apply(capture, extraConfig)); } }
private bool ConfigureToVideoOutput(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { this.Video.Apply(capture, extraConfig); // capture.ASFFixedFrameRate = true; capture.FrameGrabber = VidGrab.TFrameGrabber.fg_Disabled; if (Properties.Settings.Default.TextoVideoHabilitado) { int target = 0; capture.SetTextOverlay_TargetDisplay(target, -1); Font font = new Font(FontFamily.GenericSansSerif, Properties.Settings.Default.TextoVideoFontSize, FontStyle.Regular); capture.SetTextOverlay_Top(target, 0); capture.SetTextOverlay_Left(target, -1); capture.SetTextOverlay_Right(target, 0); capture.SetTextOverlay_Font(target, font.ToHfont()); capture.SetTextOverlay_HighResFont(target, false); capture.SetTextOverlay_VideoAlignment(target, VidGrab.TVideoAlignment.oa_RightBottom); capture.SetTextOverlay_Shadow(target, false); capture.SetTextOverlay_Transparent(target, false); capture.SetTextOverlay_BkColor(target, ColorTranslator.ToWin32(Color.Black)); capture.SetTextOverlay_FontColor(target, ColorTranslator.ToWin32(Color.White)); capture.SetTextOverlay_String(target, string.Format(Properties.Settings.Default.TextoVideoTemplate, extraConfig.Etiqueta)); capture.SetTextOverlay_Enabled(target, true); capture.FrameGrabber = VidGrab.TFrameGrabber.fg_CaptureStream; } else { capture.FrameGrabber = VidGrab.TFrameGrabber.fg_Disabled; } return(true); }
public override bool Apply(VidGrab.VideoGrabber capture, ExtraConfig extraConfig) { capture.RecordingMethod = VidGrab.TRecordingMethod.rm_ASF; capture.FrameRate = this.FramesRate; capture.ASFVideoFrameRate = this.FramesRate; capture.ASFVideoBitRate = this.VideoBitRate; capture.ASFVideoQuality = this.VideoQuality; if (Properties.Settings.Default.WmvProfileVersion == 8) { capture.ASFProfileVersion = VidGrab.TASFProfileVersion.apv_ProfileVersion_8; } else { capture.ASFProfileVersion = VidGrab.TASFProfileVersion.apv_ProfileVersion_9; } capture.CompressionType = VidGrab.TCompressionType.ct_AudioVideo; capture.CompressionMode = VidGrab.TCompressionMode.cm_CompressOnTheFly; return(true); }
public abstract bool Apply(VidGrab.VideoGrabber capture, ExtraConfig extraConfig);