public unsafe GstRemuxer(string inputFile, string outputFile, VideoMuxerType muxer) : base(IntPtr.Zero) { if (GetType() != typeof(GstRemuxer)) { throw new InvalidOperationException("Can't override this constructor."); } IntPtr error = IntPtr.Zero; Raw = gst_remuxer_new(GLib.Marshaller.StringToPtrGStrdup(inputFile), GLib.Marshaller.StringToPtrGStrdup(outputFile), muxer, out error); if (error != IntPtr.Zero) { throw new GLib.GException(error); } PercentCompleted += delegate(object o, PercentCompletedArgs args) { if (Progress != null) { Progress(args.Percent); } }; GstError += delegate(object o, ErrorArgs args) { if (Error != null) { Error(this, args.Message); } }; }
public string RemuxFile(string inputFile, string outputFile, VideoMuxerType muxer) { Log.Information("Remux file"); Remuxer remuxer = new Remuxer(Config.MultimediaToolkit.DiscoverFile(inputFile), outputFile, muxer); return(remuxer.Remux(mainWindow as Gtk.Window)); }
static extern bool gst_video_encoder_set_encoding_format(IntPtr raw, VideoEncoderType video_codec, AudioEncoderType audio_codec, VideoMuxerType muxer, uint video_quality, uint audio_quality, uint width, uint height, uint fps_n, uint fps_d);
public EncodingProfile(string name, string extension, VideoEncoderType videoEncoder, AudioEncoderType audioEncoder, VideoMuxerType muxer) { Name = name; Extension = extension; VideoEncoder = videoEncoder; AudioEncoder = audioEncoder; Muxer = muxer; }
public override string RemuxFile(string inputFile, string outputFile, VideoMuxerType muxer) { Log.Information("Remux file"); try { Remuxer remuxer = new Remuxer(App.Current.MultimediaToolkit.DiscoverFile(inputFile), outputFile, muxer); return(remuxer.Remux(MainWindow as Gtk.Window)); } catch (Exception e) { Log.Exception(e); return(null); } }
public bool SetVideoMuxer(VideoMuxerType type) { IntPtr error = IntPtr.Zero; bool raw_ret = gst_camera_capturer_set_video_muxer(Handle, (int)type, out error); if (error != IntPtr.Zero) { throw new GLib.GException(error); } bool ret = raw_ret; return(ret); }
public IRemuxer GetRemuxer(MediaFile inputFile, string outputFile, VideoMuxerType muxer) { if (inputFile.Container == GStreamer.MPEG1_PS || inputFile.Container == GStreamer.MPEG2_PS || inputFile.Container == GStreamer.MPEG2_TS) { return(new MpegRemuxer(inputFile.FilePath, outputFile)); } else { return(new GstRemuxer(inputFile.FilePath, outputFile, muxer)); } }
static extern bool gst_video_editor_set_encoding_format(IntPtr raw, string output_file, VideoEncoderType video_codec, AudioEncoderType audio_codec, VideoMuxerType muxer, uint video_quality, uint audio_quality, uint width, uint height, uint fps_n, uint fps_d, bool enable_audio, bool enable_video);
public void SetVideoMuxer(out string error, VideoMuxerType muxer) { IntPtr error_ptr = IntPtr.Zero; gst_video_editor_set_video_muxer(Handle, out error_ptr, (int)muxer); if (error_ptr != IntPtr.Zero) { error = GLib.Marshaller.Utf8PtrToString(error_ptr); } else { error = null; } }
public Remuxer(MediaFile inputFile, string outputFilepath = null, VideoMuxerType muxer = VideoMuxerType.Mp4) { this.inputFile = inputFile; if (inputFile.Container == GStreamer.ASF) { muxer = VideoMuxerType.Matroska; } this.muxer = muxer; if (outputFilepath != null) { this.outputFilepath = outputFilepath; } else { this.outputFilepath = Path.ChangeExtension(inputFile.FilePath, GetExtension(muxer)); } this.multimedia = new MultimediaFactory(); }
public string RemuxFile(MediaFile file, object window) { VideoMuxerType muxType = VideoMuxerType.Mp4; string ext = ".mp4"; string ext_desc = "MP4 (.mp4)"; if (file.VideoCodec == GStreamer.MPEG1_VIDEO || file.VideoCodec == GStreamer.MPEG2_VIDEO) { ext = ".mkv"; ext_desc = "MKV (.mkv)"; muxType = VideoMuxerType.Matroska; } string outputFile = App.Current.Dialogs.SaveFile(Catalog.GetString("Output file"), Path.ChangeExtension(file.FilePath, ext), Path.GetDirectoryName(file.FilePath), ext_desc, new string[] { ext }); outputFile = Path.ChangeExtension(outputFile, ext); Utils.Remuxer remuxer = new Utils.Remuxer(file, outputFile, muxType); return(remuxer.Remux(window as Gtk.Window)); }
public Remuxer(MediaFile inputFile, string outputFilepath = null, VideoMuxerType muxer = VideoMuxerType.Mp4) { this.inputFile = inputFile; this.muxer = muxer; if (outputFilepath != null) { this.outputFilepath = outputFilepath; } else { this.outputFilepath = Path.ChangeExtension(inputFile.FilePath, GetExtension(muxer)); if (this.outputFilepath == inputFile.FilePath) { this.outputFilepath = Path.ChangeExtension(inputFile.FilePath, "1." + GetExtension(muxer)); } } this.multimedia = new MultimediaToolkit(); }
static protected string GetExtension(VideoMuxerType muxer) { switch (muxer) { case VideoMuxerType.Avi: return("avi"); case VideoMuxerType.Matroska: return("mkv"); case VideoMuxerType.Mp4: return("mp4"); case VideoMuxerType.MpegPS: return("mpeg"); case VideoMuxerType.Ogg: return("ogg"); case VideoMuxerType.WebM: return("webm"); } throw new Exception("Muxer format not supported"); }
public abstract string RemuxFile(string inputFile, string outputFile, VideoMuxerType muxer);
static extern bool gst_video_editor_set_encoding_format (IntPtr raw, string output_file, VideoEncoderType video_codec, AudioEncoderType audio_codec, VideoMuxerType muxer, uint video_quality, uint audio_quality, uint width, uint height, uint fps_n, uint fps_d, bool enable_audio, bool enable_video);
public bool SetVideoMuxer(VideoMuxerType type) { IntPtr error = IntPtr.Zero; bool raw_ret = gst_camera_capturer_set_video_muxer(Handle, (int) type, out error); if (error != IntPtr.Zero) throw new GLib.GException (error); bool ret = raw_ret; return ret; }
public IRemuxer GetRemuxer(MediaFile inputFile, string outputFile, VideoMuxerType muxer) { return(registry.Retrieve <IRemuxer> (InstanceType.New, inputFile.FilePath, outputFile, muxer)); }
public void SetVideoMuxer(out string error, VideoMuxerType muxer) { IntPtr error_ptr = IntPtr.Zero; gst_video_editor_set_video_muxer(Handle,out error_ptr,(int)muxer); if(error_ptr != IntPtr.Zero) error = GLib.Marshaller.Utf8PtrToString(error_ptr); else error = null; }
static extern bool gst_video_encoder_set_encoding_format (IntPtr raw, VideoEncoderType video_codec, AudioEncoderType audio_codec, VideoMuxerType muxer, uint video_quality, uint audio_quality, uint width, uint height, uint fps_n, uint fps_d);
public bool SetVideoMuxer(VideoMuxerType type) { return true; }
public bool SetVideoMuxer(VideoMuxerType type) { return(true); }
static extern unsafe IntPtr gst_remuxer_new(IntPtr input_file, IntPtr output_file, VideoMuxerType muxer, out IntPtr err);