Class VideoEditCoreX
- Namespace
- VisioForge.Core.VideoEditX
- Assembly
- VisioForge.Core.dll
Cross-platform video editing SDK providing professional non-linear editing capabilities through the timeline editing engine. Supports Windows, macOS, Linux, iOS, and Android platforms with timeline-based editing, multi-track composition, real-time effects, transitions, text overlays, and audio mixing. Enables precision frame-accurate editing, smart rendering, and multi-format export for creating professional video content across all major platforms. This is the modern, recommended SDK for video editing in new applications.
public class VideoEditCoreX : IDisposable, INotifyPropertyChangedInheritance
Implements
Inherited Members
Remarks
VideoEditCoreX uses the timeline editing engine as its foundation, providing a powerful timeline-based
editing model with support for clips, layers, tracks, effects, and transitions. It replaces the legacy
DirectShow-based editing solutions and offers true cross-platform compatibility.
The timeline belongs to the thread that builds it - the thread of the first Input_ or
VisioForge.Core.VideoEditX.VideoEditCoreX.Start call after construction or after a stop. The Input_ methods, VisioForge.Core.VideoEditX.VideoEditCoreX.Start,
GetSnapshot and the GetDiagramAs* methods must stay on that thread until the session stops; a call
from another thread throws InvalidOperationException. The Output_VideoSize,
Output_VideoFrameRate, Output_AudioChannels and Output_AudioSampleRate setters work from
any thread: from another one the value is stored and applied by the next VisioForge.Core.VideoEditX.VideoEditCoreX.Start.
VisioForge.Core.VideoEditX.VideoEditCoreX.Stop and VisioForge.Core.VideoEditX.VideoEditCoreX.Dispose may be called from any thread.
Constructors
VideoEditCoreX(IVideoView)
Initializes a new instance of the VisioForge.Core.VideoEditX.VideoEditCoreX class with a video view for timeline preview. Sets up the editing environment, configures logging, and prepares the video editing pipeline infrastructure.
public VideoEditCoreX(IVideoView videoView)Parameters
videoViewIVideoView-
The video view control that will display the timeline preview and playback.
VideoEditCoreX()
Initializes a new instance of the VisioForge.Core.VideoEditX.VideoEditCoreX class.
public VideoEditCoreX()Properties
Audio_Effects
Gets the collection of audio effects to apply to the timeline during rendering or playback.
public List<IVideoEditXAudioEffect> Audio_Effects { get; }Property Value
Remarks
Add audio effects to this collection to apply volume adjustments, equalization, normalization, reverb, echo, and other audio processing to your audio content. Effects are applied to all audio clips on the timeline. Common effects include amplify, panorama (stereo positioning), equalizer bands, and dynamic range compression.
Audio_Transitions
Gets the collection of audio transitions to apply between audio clips on the timeline.
public List<AudioTransition> Audio_Transitions { get; }Property Value
Remarks
Audio transitions provide smooth crossfades between audio clips, preventing abrupt audio cuts. Each transition specifies a start time, duration, and crossfade characteristics. Transitions blend the outgoing and incoming audio during the transition period, creating professional audio mixes. Unlike video transitions which have many types, audio transitions typically use crossfade blending.
AutoTransitions
Gets or sets a value indicating whether automatic transitions will be created between adjacent clips on the timeline.
public bool AutoTransitions { get; set; }Property Value
Remarks
When enabled, the editing engine automatically creates smooth crossfade transitions between overlapping or adjacent clips in the same layer. This provides a professional look without manually adding transitions. The transition duration is determined by the overlap between clips. Disable for hard cuts between clips.
ConsoleUsage
Gets or sets a value indicating whether the SDK is being used in a console application without GUI components.
public bool ConsoleUsage { get; set; }Property Value
Remarks
When set to true, the VisioForge.Core.VideoEditX.VideoEditCoreX.Start method will block until the operation completes, allowing console applications to run without additional threading logic. For GUI applications, leave this false to prevent blocking the UI thread.
Debug_Dir
Gets or sets the directory where debug logs and pipeline graphs will be saved when VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Mode is enabled.
public string Debug_Dir { get; set; }Property Value
Remarks
When debug mode is enabled, the SDK will write detailed log files and media pipeline visualization files (DOT format) to this directory. If set to null or empty, the log is written to the current directory. Changing this property reconfigures the logger.
Debug_DisableMessageDialogs
Gets or sets a value indicating whether to suppress error message dialogs when VisioForge.Core.VideoEditX.VideoEditCoreX.OnError is not handled.
public bool Debug_DisableMessageDialogs { get; set; }Property Value
Remarks
By default, if the OnError event is not subscribed, errors may be displayed through message dialogs. Set this to true to disable automatic error display and handle all errors programmatically through the OnError event.
Debug_Mode
Gets or sets a value indicating whether debug mode is enabled, which activates detailed logging and pipeline visualization.
public bool Debug_Mode { get; set; }Property Value
Remarks
When enabled, the SDK generates detailed log files, saves media pipeline graphs, and provides extensive diagnostic information useful for troubleshooting. This increases disk I/O and should typically be disabled in production. Changing this property reconfigures the logger.
Debug_NativeCriticals
Gets or sets a value indicating whether GStreamer/GLib critical messages are captured together with the managed call stack that raised them.
public bool Debug_NativeCriticals { get; set; }Property Value
Remarks
A GLib critical is a native call that failed a sanity check - typically an object used after it was
released. GLib does not throw: it logs one line and carries on, so the defect stays invisible until
it corrupts memory and the process terminates, often with an uncatchable
ExecutionEngineException or AccessViolationException far from the cause. Turn this on
when diagnosing such a crash.
Each critical, with the managed stack that raised it (in a burst, for the first 20 each second), is:
- written immediately to a
gstreamer_criticals_*.txtfile in VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Dir, so the lines preceding a crash are already on disk when it happens; - raised through VisioForge.Core.VideoEditX.VideoEditCoreX.OnError on a thread-pool thread, as a message starting with
[NativeCritical]- up to 100 of them, so a burst cannot flood the handler; the file keeps every one.
The watcher is process-wide: all components share one file, opened in the VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Dir of the first component that switches it on, and it stays there - so set VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Dir first. Every component with this property on receives every critical in the process. While no critical is raised it costs nothing.
Debug_Telemetry
Gets or sets a value indicating whether anonymous error and feature-usage telemetry is sent to VisioForge while a debugger is attached to the process.
public bool Debug_Telemetry { get; set; }Property Value
Remarks
Data is sent only while a debugger is attached, and only to https://telemetry.visioforge.org (errors) and https://analytics.visioforge.org (names of the SDK features in use).
Setting this property to false stops it entirely.
What is transmitted, and nothing else:
- The class name, method name and level of the log event, used for grouping.
- The log message, with credentials, file paths, host names, IP and MAC addresses, device identifiers, GUIDs and e-mail addresses removed.
- The exception type, its redacted message, and its stack frames with the source file path stripped. A frame keeps its method name and line number; the path is the developer machine layout and is not sent.
- Up to 50 preceding log lines and up to 30 preceding GStreamer warnings and errors as breadcrumbs, redacted the same way.
- The SDK version, the .NET runtime, the OS description, the process architecture, the target framework, the engine name (
VideoEditCoreX), and a random identifier regenerated on every process start. - When the engine starts, the names of the SDK features it uses: the engine name and, where the engine has them, the SDK type names of its blocks or output format and its mode, plus whether the SDK itself is a debug or a release build. Each name is sent once per process; a class of your own is never named.
What is never transmitted: no setting values, no description of how blocks are connected, no file names or paths, no device identifiers such as PnP instance paths, DirectShow monikers or GUIDs, no user identity, no environment variables, no media content, and no persistent identifier.
Fonts
Gets a collection of available system fonts that can be used for text overlays in video editing.
public ObservableCollection<FontDescriptionX> Fonts { get; }Property Value
Remarks
This property enumerates all fonts available on the system that can be used with the text overlay feature. Each FontDescriptionX contains the font family name and style information required for rendering text.
Output_AudioChannels
Gets or sets the number of audio channels in the output audio stream.
public int Output_AudioChannels { get; set; }Property Value
Remarks
This property defines the channel configuration of the output audio. If not explicitly set, it defaults to
the channel count of the first audio clip added to the timeline. The unset value is 0, which is what the
property reads until that clip is added. All source audio will be mixed or downmixed
to match this channel configuration. Setting this property applies it to the audio track at once when the timeline is built and this is
its thread; otherwise the value is stored and applied by the next Start().
A channel count taken from a clip ends with its job, or with an Input_Clear_List that empties the
timeline, so a later job on the same instance takes its own; a value set here is kept.
Output_AudioSampleRate
Gets or sets the sample rate of the output audio stream in Hertz (Hz).
public int Output_AudioSampleRate { get; set; }Property Value
Remarks
This property defines the sampling frequency of the output audio. If not explicitly set, it defaults to
the sample rate of the first audio clip added to the timeline. The unset value is 0, which is what the
property reads until that clip is added. All source audio will be resampled to match
this rate. Higher sample rates provide better quality but larger file sizes.
Setting this property applies it to the audio track at once when the timeline is built and this is
its thread; otherwise the value is stored and applied by the next Start().
A sample rate taken from a clip ends with its job, or with an Input_Clear_List that empties the
timeline, so a later job on the same instance takes its own; a value set here is kept.
Output_Format
Gets or sets the output format and destination settings for the rendered video.
public IVideoEditXBaseOutput Output_Format { get; set; }Property Value
Remarks
Set this property to configure where and how the final video will be saved. The output is a file: MP4, MOV, WebM, MKV, AVI, DV, FLV, MPEG-TS, MXF, WMV, Ogg Theora and GIF, or the audio-only M4A, MP3, WAV, FLAC, WavPack, Opus, Ogg Vorbis, Speex and WMA. Network streaming outputs are not available here. If null, the SDK operates in preview-only mode without rendering to file. Each output format has specific codec and container requirements.
Output_VideoCrop
Gets or sets the video crop settings to apply to all video content during output rendering.
public CropVideoEffect Output_VideoCrop { get; set; }Property Value
Remarks
Use this property to crop all video content to a specific region during rendering. This is useful for removing black bars, focusing on a particular area, or adjusting aspect ratios. The crop is applied globally to all video clips before any other effects. Set to null to disable cropping.
Output_VideoFrameRate
Gets or sets the frame rate of the output video.
public VideoFrameRate Output_VideoFrameRate { get; set; }Property Value
Remarks
This property defines the playback frame rate of the rendered video. If not explicitly set, it defaults to
the frame rate of the first video clip added to the timeline. Common values include 24fps (film), 25fps (PAL),
30fps (NTSC), 60fps (high frame rate). Frame rate is expressed as a rational number (numerator/denominator).
Setting this property applies it to the video track at once when the timeline is built and this is
its thread; otherwise the value is stored and applied by the next Start().
Reads 0 while nothing has set it - a timeline built only from test clips, for example - and a fallback
used for the track caps is never stored here. An image input has no frame rate of its own either:
a timeline built from still images renders at 25 fps and this property keeps reading 0. A value taken
from an input ends with the job that provided it, or with an Input_Clear_List that empties the
timeline, so a later job on the same instance takes its own rate - an image job included. A value set
here is kept and reaches the next job.
Output_VideoRotateFlip
Gets or sets the video rotation and flip settings to apply to all video content during output rendering.
public FlipRotateVideoEffect Output_VideoRotateFlip { get; set; }Property Value
Remarks
Use this property to rotate or flip all video content during rendering. This is useful for correcting orientation issues from mobile devices or creating mirror effects. The transformation is applied globally to all video clips before other effects. Set to null to disable rotation/flip. Any method other than VisioForge.Core.Types.X.VideoEffects.VideoFlipRotateMethod.None requires the Professional edition.
Output_VideoSize
Gets or sets the resolution (width and height) of the output video in pixels.
public Size Output_VideoSize { get; set; }Property Value
Remarks
This property defines the dimensions of the rendered video. If not explicitly set, it defaults to the resolution
of the first video clip added to the timeline. All source media will be scaled to match this resolution.
Common values include 1920x1080 (Full HD), 1280x720 (HD), 3840x2160 (4K UHD).
Setting this property applies it to the video track at once when the timeline is built and this is
its thread; otherwise the value is stored and applied by the next Start().
Reads 0x0 while nothing has set it - a timeline built only from test clips, for example. Such a
timeline renders at 1280x720 unless another output setting is set, and this property keeps reading
0x0: a fallback used for the track caps is never stored here. A value taken from an input is stored,
but it belongs to its job: it is dropped when the job's pipeline is torn down or when
Input_Clear_List empties the timeline, and a later job on the same instance takes its own. A value
set here is kept and reaches the next job.
SDK_BuildDate
Gets the build date of the VideoEditCoreX SDK assembly.
public static DateTime SDK_BuildDate { get; }Property Value
Remarks
This property is useful for determining the exact build of the SDK being used, particularly when troubleshooting or verifying SDK updates.
SDK_Version
Gets the version number of the VideoEditCoreX SDK.
public static Version SDK_Version { get; }Property Value
Remarks
Use this property to check the SDK version at runtime for compatibility checks or feature detection.
SmartRender
Gets or sets a value indicating whether to use smart render mode, which avoids re-encoding when possible.
public bool SmartRender { get; set; }Property Value
Remarks
Smart rendering examines the source media and output format. When they match or are compatible, it copies streams directly without re-encoding, significantly improving rendering speed and quality. However, this limits the ability to apply certain effects and transitions. Use this for simple cutting and concatenation operations where quality preservation is critical.
State
Gets the current playback or rendering state of the video editing pipeline.
public PlaybackState State { get; }Property Value
Remarks
The state reflects the underlying media pipeline state. Check this property to determine if the media pipeline is ready for configuration (Free) or actively processing (Play).
Video_Effects
Gets the collection of video effects to apply to the timeline during rendering or playback.
public ObservableCollection<IVideoEditXVideoEffect> Video_Effects { get; }Property Value
Remarks
Add video effects to this collection to apply color correction, filters, deinterlacing, and other transformations to your video content. Effects are applied in the order they appear in the collection. Each effect can specify its own start and stop times to apply the effect to specific portions of the timeline. Common effects include brightness, contrast, saturation, blur, sharpen, and color balance adjustments.
Video_TextOverlays
Gets the collection of text overlays to render on top of the video during playback or rendering.
public List<TextOverlay> Video_TextOverlays { get; }Property Value
Remarks
Text overlays enable adding titles, subtitles, credits, watermarks, and other text elements to your video. Each TextOverlay specifies the text content, position, font, color, size, duration, and timing. Overlays are rendered on top of the video content during the specified time range. The text supports various fonts (see VisioForge.Core.VideoEditX.VideoEditCoreX.Fonts property), colors, and positioning options.
Video_Transitions
Gets the collection of video transitions to apply between clips on the timeline.
public ObservableCollection<VideoTransition> Video_Transitions { get; }Property Value
Remarks
Video transitions provide smooth visual effects between clips, such as fades, wipes, and dissolves. Each transition specifies a type, start time, and duration. Transitions are rendered during the transition period between clips. Use VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transition_Add_FadeIn(System.TimeSpan,System.TimeSpan) and VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transition_Add_FadeOut(System.TimeSpan,System.TimeSpan) helper methods to easily add common transition types.
Methods
Dispose(bool)
Releases unmanaged and optionally managed resources used by the VideoEditCoreX instance. This implementation properly disposes the media pipeline, timeline objects, layers, assets, clips, encoding profiles, and progress timer to ensure complete cleanup and prevent memory leaks.
protected virtual void Dispose(bool disposing)Parameters
disposingbool-
trueto release both managed and unmanaged resources;falseto release only unmanaged resources.
Remarks
This method follows the standard IDisposable pattern. When disposing is true, all managed resources including the timeline editing pipeline, asset cache, and clip cache are properly released. The pipeline is set to null state before disposal, and appropriate delays are inserted to ensure clean shutdown.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. This method releases the editing pipeline, timeline, layers, asset cache, clip cache, and all associated media resources. Call this method when you're finished using the VideoEditCoreX instance to ensure proper cleanup.
public void Dispose()Remarks
This is the public entry point for disposing the VideoEditCoreX instance. After calling Dispose, the instance should not be used again. The method is safe to call multiple times. Following disposal, the object is removed from the finalization queue for improved garbage collection performance.
Duration()
Gets the total duration of the timeline based on all clips, effects, and transitions currently in the project.
public TimeSpan Duration()Returns
Remarks
The duration reflects the combined length of all media on the timeline, including any transitions. Returns TimeSpan.Zero if the pipeline is not initialized or no clips have been added.
~VideoEditCoreX()
Finalizes an instance of the VisioForge.Core.VideoEditX.VideoEditCoreX class, performing cleanup if Dispose was not called. This destructor ensures that unmanaged resources are released even if the object is not explicitly disposed, though explicit disposal through Dispose() is strongly recommended for predictable resource cleanup.
protected ~VideoEditCoreX()GetDiagramAsImage(PipelineDiagramOptions)
Renders the current video editing pipeline diagram as a raster image.
VideoEditCoreX uses the GStreamer Editing Services (GES) timeline pipeline rather than a MediaBlocksPipeline. This method generates a diagram by exporting the GStreamer pipeline to DOT format and rendering it as a simplified block diagram.
The VisioForge.Core.MediaBlocks.Diagram.PipelineDiagramOptions.Mode setting is ignored for GES pipelines; the diagram always shows the GES pipeline structure.
public SKImage GetDiagramAsImage(PipelineDiagramOptions options = null)Parameters
optionsPipelineDiagramOptions-
Rendering options controlling scale, spacing, colors, and orientation. Pass
nullto use defaults.
Returns
- SKImage
-
An SkiaSharp.SKImage containing the rendered diagram, or
nullif no pipeline is active. The caller owns the image and must dispose it.
Exceptions
- InvalidOperationException
-
Called on another thread than the one that built the timeline.
GetDiagramAsSvg(PipelineDiagramOptions)
Renders the current video editing pipeline diagram as an SVG string.
VideoEditCoreX uses the GStreamer Editing Services (GES) timeline pipeline rather than a MediaBlocksPipeline. This method generates a diagram by inspecting the GES timeline structure (layers, tracks, clips).
public string GetDiagramAsSvg(PipelineDiagramOptions options = null)Parameters
optionsPipelineDiagramOptions-
Rendering options controlling scale, spacing, colors, and orientation. Pass
nullto use defaults.
Returns
- string
-
A complete SVG document as a string, or
nullif no pipeline is active.
Exceptions
- InvalidOperationException
-
Called on another thread than the one that built the timeline.
GetLogger()
Gets the Serilog logger instance used by the VideoEditCoreX SDK for structured logging.
public ILogger GetLogger()Returns
- ILogger
-
The Serilog.ILogger instance configured for this SDK instance.
Remarks
Use this logger for consistent, structured logging throughout your application when working with VideoEditCoreX. The logger is automatically configured based on the VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Mode and VisioForge.Core.VideoEditX.VideoEditCoreX.Debug_Telemetry settings, with different verbosity levels and output targets depending on the mode.
GetSnapshot()
Gets the snapshot (in Preview mode).
public Bitmap GetSnapshot()Returns
- Bitmap
-
Bitmap.
Exceptions
- InvalidOperationException
-
Called on another thread than the one that built the timeline.
Input_AddAudioFile(string, TimeSpan?)
Adds an audio file's audio stream to the timeline, including the entire duration of the audio.
public bool Input_AddAudioFile(string filename, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the audio file to add.
insertTimeTimeSpan?-
Optional timeline position where the audio should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
Only the audio stream is added to the audio track. Supports all commonly used audio formats (MP3, AAC, WAV, FLAC, Vorbis, Opus, etc.). The audio will be mixed with any other audio on the timeline.
Input_AddAudioFile(AudioFileSource, TimeSpan?)
Adds an audio file's audio stream to the timeline using advanced source configuration options.
public bool Input_AddAudioFile(AudioFileSource source, TimeSpan? insertTime = null)Parameters
sourceAudioFileSource-
An VisioForge.Core.Types.X.VideoEdit.AudioFileSource object containing the audio file path, optional segments, and effects configuration.
insertTimeTimeSpan?-
Optional timeline position where the audio should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This overload provides access to advanced features like multi-segment editing and per-clip audio effects through the AudioFileSource object.
Input_AddAudioFile(string, TimeSpan, TimeSpan, TimeSpan?)
Adds a specific segment of an audio file's audio stream to the timeline, from startTime to stopTime.
public bool Input_AddAudioFile(string filename, TimeSpan startTime, TimeSpan stopTime, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the audio file to add.
startTimeTimeSpan-
The start time within the source audio from which to begin the clip.
stopTimeTimeSpan-
The end time within the source audio at which to end the clip.
insertTimeTimeSpan?-
Optional timeline position where the audio segment should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio segment was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This method enables precise trimming of source audio files. Only the portion between startTime and stopTime is added to the timeline and mixed with other audio tracks.
Input_AddAudioFromStream(Stream, TimeSpan?, TimeSpan?, TimeSpan?)
Adds a specific segment of audio data from a seekable stream to the timeline, from startTime to stopTime.
public bool Input_AddAudioFromStream(Stream stream, TimeSpan? startTime, TimeSpan? stopTime, TimeSpan? insertTime = null)Parameters
streamStream-
A seekable stream containing the audio data.
startTimeTimeSpan?-
Optional start time within the source audio. If null, starts from the beginning.
stopTimeTimeSpan?-
Optional end time within the source audio. If null, includes until the end.
insertTimeTimeSpan?-
Optional timeline position where the audio segment should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio segment was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
The stream must support seeking. The audio data is copied to a temporary file for processing.
The copy starts at the stream's current position. If the copy fails, OnError is raised and false is returned.
This enables precise trimming when loading audio from streams rather than files.
Input_AddAudioVideoFile(string, TimeSpan?, TimeSpan?, TimeSpan?)
Adds both audio and video streams from a media file to the timeline.
public bool Input_AddAudioVideoFile(string filename, TimeSpan? startTime = null, TimeSpan? stopTime = null, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the media file to add.
startTimeTimeSpan?-
Optional start time within the source file. If null, starts from the beginning of the file.
stopTimeTimeSpan?-
Optional end time within the source file. If null, includes until the end of the file.
insertTimeTimeSpan?-
Optional timeline position where the media should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio and video streams were successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This method adds both audio and video tracks from the source file. If the file contains only audio or only video, only the available stream will be added. Supports all commonly used media formats.
Input_AddAudioVideoFromStream(Stream, TimeSpan?, TimeSpan?, TimeSpan?)
Adds both audio and video streams from a seekable stream containing media data to the timeline.
public bool Input_AddAudioVideoFromStream(Stream stream, TimeSpan? startTime = null, TimeSpan? stopTime = null, TimeSpan? insertTime = null)Parameters
streamStream-
A seekable stream containing the media data.
startTimeTimeSpan?-
Optional start time within the source media. If null, starts from the beginning.
stopTimeTimeSpan?-
Optional end time within the source media. If null, includes until the end.
insertTimeTimeSpan?-
Optional timeline position where the media should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the audio and video streams were successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
The stream must support seeking. The media data is copied to a temporary file for processing.
The copy starts at the stream's current position. If the copy fails, OnError is raised and false is returned.
Both audio and video tracks are added if present in the stream.
Input_AddImageFile(string, TimeSpan, TimeSpan?)
Adds a static image to the timeline with the specified duration, creating a video clip from the image file.
public bool Input_AddImageFile(string filename, TimeSpan duration, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the image file to add.
durationTimeSpan-
The duration for which the image should be displayed in the timeline.
insertTimeTimeSpan?-
Optional timeline position where the image should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the image was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
Supported image formats include JPEG, PNG, BMP, GIF, and other formats supported by SkiaSharp. The image will be scaled to match the output video resolution while maintaining aspect ratio.
Input_AddImageFile(ImageFileSource, TimeSpan?)
Adds a static image to the timeline using advanced source configuration options.
public bool Input_AddImageFile(ImageFileSource source, TimeSpan? insertTime = null)Parameters
sourceImageFileSource-
An VisioForge.Core.Types.X.VideoEdit.ImageFileSource object containing the image file path, duration, and optional effects.
insertTimeTimeSpan?-
Optional timeline position where the image should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the image was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This overload allows specifying additional properties through the ImageFileSource object, such as layer assignment and per-clip video effects.
Input_AddImageFromStream(Stream, TimeSpan, TimeSpan?)
Adds a static image to the timeline from a seekable stream with the specified duration.
public bool Input_AddImageFromStream(Stream stream, TimeSpan duration, TimeSpan? insertTime = null)Parameters
streamStream-
A seekable stream containing the image data.
durationTimeSpan-
The duration for which the image should be displayed in the timeline.
insertTimeTimeSpan?-
Optional timeline position where the image should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the image was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
The stream must support seeking. The image data is copied to a temporary file for processing.
The copy starts at the stream's current position. If the copy fails, OnError is raised and false is returned.
Supported formats are the same as VisioForge.Core.VideoEditX.VideoEditCoreX.Input_AddImageFile(System.String,System.TimeSpan,System.Nullable{System.TimeSpan}).
Input_AddTestClip(TimeSpan, TimeSpan, TimeSpan, string)
Adds a test clip to the timeline for debugging and testing purposes, generating synthetic video content.
public bool Input_AddTestClip(TimeSpan startTime, TimeSpan stopTime, TimeSpan insertTime, string id = "blue")Parameters
startTimeTimeSpan-
The start time in the timeline where the test clip begins.
stopTimeTimeSpan-
The end time in the timeline where the test clip ends.
insertTimeTimeSpan-
The in-point time within the test pattern itself.
idstring-
The test pattern identifier (e.g., "blue", "smpte", "snow", "black"). Default is "blue".
Returns
- bool
-
trueif the test clip was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
Test clips are useful for debugging pipelines, testing effects, and creating placeholder content. Available patterns include solid colors, SMPTE color bars, snow, and various test patterns.
Input_AddVideoFile(string, TimeSpan?)
Adds a video file's video stream to the timeline, including the entire duration of the video.
public bool Input_AddVideoFile(string filename, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the video file to add.
insertTimeTimeSpan?-
Optional timeline position where the video should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the video was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
Only the video stream is added; audio is not included. Use VisioForge.Core.VideoEditX.VideoEditCoreX.Input_AddAudioVideoFile(System.String,System.Nullable{System.TimeSpan},System.Nullable{System.TimeSpan},System.Nullable{System.TimeSpan}) to add both. Supports all commonly used video formats (MP4, AVI, MKV, WebM, MOV, etc.).
Input_AddVideoFile(VideoFileSource, TimeSpan?)
Adds a video file's video stream to the timeline using advanced source configuration options.
public bool Input_AddVideoFile(VideoFileSource source, TimeSpan? insertTime = null)Parameters
sourceVideoFileSource-
A VisioForge.Core.Types.X.VideoEdit.VideoFileSource object containing the video file path, optional segments, and effects configuration.
insertTimeTimeSpan?-
Optional timeline position where the video should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the video was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This overload provides access to advanced features like multi-segment editing, layer assignment, and per-clip video effects through the VideoFileSource object.
Input_AddVideoFile(string, TimeSpan, TimeSpan, TimeSpan?)
Adds a specific segment of a video file's video stream to the timeline, from startTime to stopTime.
public bool Input_AddVideoFile(string filename, TimeSpan startTime, TimeSpan stopTime, TimeSpan? insertTime = null)Parameters
filenamestring-
The path to the video file to add.
startTimeTimeSpan-
The start time within the source video from which to begin the clip.
stopTimeTimeSpan-
The end time within the source video at which to end the clip.
insertTimeTimeSpan?-
Optional timeline position where the video segment should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the video segment was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
This method enables precise trimming of source video files. Only the portion between startTime and stopTime is added to the timeline. Only the video stream is included; use VisioForge.Core.VideoEditX.VideoEditCoreX.Input_AddAudioVideoFile(System.String,System.Nullable{System.TimeSpan},System.Nullable{System.TimeSpan},System.Nullable{System.TimeSpan}) for both audio and video.
Input_AddVideoFromStream(Stream, TimeSpan, TimeSpan, TimeSpan?)
Adds a specific segment of video data from a seekable stream to the timeline, from startTime to stopTime.
public bool Input_AddVideoFromStream(Stream stream, TimeSpan startTime, TimeSpan stopTime, TimeSpan? insertTime = null)Parameters
streamStream-
A seekable stream containing the video data.
startTimeTimeSpan-
The start time within the source video from which to begin the clip.
stopTimeTimeSpan-
The end time within the source video at which to end the clip.
insertTimeTimeSpan?-
Optional timeline position where the video segment should be inserted. If null, appends to the end of the timeline.
Returns
- bool
-
trueif the video segment was successfully added; otherwise,false- also when called while the previous session is stopping, as from anOnStophandler (reported throughOnErrorunless another thread'sStop()is under way), and on a disposed instance.
Remarks
The stream must support seeking. The video data is copied to a temporary file for processing.
The copy starts at the stream's current position. If the copy fails, OnError is raised and false is returned.
This enables precise trimming when loading video from streams rather than files.
Input_AddVideoLayer()
Creates a new video layer in the timeline for advanced multi-layer composition.
public int Input_AddVideoLayer()Returns
- int
-
The zero-based index of the newly created layer, or -1 on a disposed instance and while the previous session is stopping - from an
OnStophandler, or while one holds up this thread - which is reported throughOnErrorunless another thread'sStop()is under way.
Remarks
Video layers enable picture-in-picture effects, watermarks, and complex compositions. Each new layer is composited under the layers added before it, and the main layer (index 0) is on top: a picture-in-picture clip goes on the main layer, over a full-frame clip on an added layer. Use the layer ID when adding clips with VisioForge.Core.Types.X.VideoEdit.VideoFileSource or VisioForge.Core.Types.X.VideoEdit.ImageFileSource to specify which layer the clip should be added to.
Input_Clear_List()
Removes all clips from the main layer of the timeline, clearing its audio and video content.
public void Input_Clear_List()Remarks
This method removes all media clips that have been added to the main layer.
The VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Effects, VisioForge.Core.VideoEditX.VideoEditCoreX.Audio_Effects, VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transitions and
VisioForge.Core.VideoEditX.VideoEditCoreX.Audio_Transitions collections are kept, and the next Start() applies them once, to the clips on the timeline then. After clearing, you can add new clips
to build a different timeline composition.
When this leaves the timeline without clips, the output size, frame rate, channel count and sample rate an
input provided are dropped with them and the timeline renders at the defaults again; a clip on another
layer is left alone, and the values set through the Output_* properties keep theirs.
While the previous session is stopping, and on a disposed instance, there is nothing to clear: the next
session starts with an empty timeline.
OnPropertyChanged(string)
Raises the PropertyChanged event for the specified property.
protected virtual void OnPropertyChanged(string propertyName = null)Parameters
propertyNamestring-
The name of the property that changed.
Position_Get()
Gets the current playback or rendering position within the timeline.
public TimeSpan Position_Get()Returns
Remarks
During preview playback, this indicates the current viewing position. During rendering, this reflects the progress of the rendering operation. Returns TimeSpan.Zero if the pipeline is not initialized.
Position_Set(TimeSpan, bool)
Sets the current playback position within the timeline, allowing you to jump to a specific time during preview.
public void Position_Set(TimeSpan position, bool seekToKeyframe = false)Parameters
positionTimeSpan-
The target position in the timeline to seek to.
seekToKeyframebool-
If
true, seeks to the nearest keyframe for faster seeking; iffalse, seeks to the exact frame (slower but more accurate).
Remarks
Seeking to keyframes is faster but less precise. For frame-accurate positioning during editing, set seekToKeyframe to false. This method only works during preview playback, not during rendering.
SDKInit()
Initializes GStreamer and the GES timeline editing services. Optional: every VisioForge.Core.VideoEditX.VideoEditCoreX constructor already performs this initialization.
public static bool SDKInit()Returns
- bool
-
trueif both GStreamer and GES initialized successfully; otherwise,false.
Remarks
The initialization entry point for an application is VisioForge.Core.VisioForgeX.InitSDK(VisioForge.Core.GStreamer.ContextX,System.Boolean): it loads the GStreamer bindings, configures the local GStreamer redistributable on Windows and wires the logging context, but it does not touch GES. This method adds the GES half and is kept for callers that want to pay that cost up front rather than inside the first constructor. Calling it is never required, and calling it twice is harmless.
Exceptions
- DllNotFoundException
-
On Windows, the GStreamer redist is missing.
- BadImageFormatException
-
On Windows, the GStreamer redist does not match the process architecture.
- InvalidOperationException
-
On Windows, a call before initialization loaded a GStreamer or GLib library that is not the build the SDK ships; the message names the loaded file.
SetLicenseCertificateAsync(byte[])
Loads a license certificate into this instance and activates it if the certificate requires activation.
public Task SetLicenseCertificateAsync(byte[] certificateData)Parameters
certificateDatabyte[]-
The bytes of a
.vflicensecertificate file issued by VisioForge.
Returns
- Task
-
A task that completes once the certificate has been loaded and any required activation has run.
Remarks
This is the only public licensing API. The file-path and stream overloads and every license-key method were
removed in 2026.5.2, so an application reads the .vflicense file itself and passes the bytes here.
The certificate belongs to this instance: call it on every instance you create, before starting it --
licensing one instance does not license another. Without a certificate the instance runs in the 30-day trial.
Settings_Load(string)
Loads SDK configuration settings from a JSON file, restoring all properties to their saved values.
public bool Settings_Load(string jsonFilename)Parameters
jsonFilenamestring-
The full path to the JSON settings file to load.
Returns
- bool
-
trueif settings were successfully loaded;falseif the file doesn't exist or loading failed.
Remarks
This method deserializes the JSON file and copies all property values to the current instance. The settings file should have been previously created using VisioForge.Core.VideoEditX.VideoEditCoreX.Settings_Save(System.String,System.String). This is useful for persisting user configurations or restoring complex editing setups. Verify the file exists before calling to avoid errors.
Settings_Save(string, string)
Saves the current SDK configuration settings to JSON files for later restoration.
public bool Settings_Save(string jsonFilename, string infoFilename)Parameters
jsonFilenamestring-
The full path where the main settings JSON file will be saved.
infoFilenamestring-
Optional path for saving SDK version information. Can be null or empty to skip.
Returns
- bool
-
trueif settings were successfully saved;falseif an error occurred during saving.
Remarks
This method serializes the current VideoEditCoreX configuration to JSON format, including all properties, effects, and transitions. Video effects are saved to a separate "_video_effects.json" file in the same directory. Use VisioForge.Core.VideoEditX.VideoEditCoreX.Settings_Load(System.String) to restore these settings later. The directory is created if it doesn't exist. Settings can be used to persist user preferences or save complex editing projects for later resumption.
Start()
Starts the video editing operation, either beginning timeline playback for preview or initiating rendering to the output file. Validates license, builds the pipeline with all configured clips, effects, and transitions, and begins processing.
public bool Start()Returns
- bool
-
trueif the operation started successfully; otherwise,false- including a call on a disposed instance, and a call made while the previous session cannot finish stopping in time, such as from an SDK event handler or while an VisioForge.Core.VideoEditX.VideoEditCoreX.OnStop handler holds up this thread, which is reported throughOnErrorunless another thread's VisioForge.Core.VideoEditX.VideoEditCoreX.Stop is under way. Call it again once the handler has returned, adding again any input added before that: it went to the session that ended. When the pipeline fails to start playing, this method returnsfalseand the session ends with VisioForge.Core.VideoEditX.VideoEditCoreX.OnStop raised, VisioForge.Core.Types.Events.StopEventArgs.Successfulfalse.
Remarks
This method performs license validation, constructs the complete editing pipeline including all input clips, effects, transitions, and output settings, then starts either preview playback or file rendering depending on the configuration. Progress can be monitored through the OnProgress event.
Exceptions
- InvalidOperationException
-
Called on another thread than the one that built the timeline - the thread of the first
Input_*orStart()call after construction or after a stop.
Stop()
Stops the current video editing operation, whether it's timeline preview playback or rendering to file. Gracefully shuts down the pipeline and releases associated resources.
public bool Stop()Returns
- bool
-
trueif the stop operation completed successfully; otherwise,false- including a render to a file whose output could not be finished (an error or a timeout while the encoders drained), or a preview an error was ending, where the pipeline is stopped all the same and VisioForge.Core.VideoEditX.VideoEditCoreX.OnStop is raised with VisioForge.Core.Types.Events.StopEventArgs.Successfulfalse. A render or a preview that an error has already ended - its VisioForge.Core.VideoEditX.VideoEditCoreX.OnStop raised with VisioForge.Core.Types.Events.StopEventArgs.Successfulfalse- is not running any more, and Stop() returnsfalsewithout raising VisioForge.Core.VideoEditX.VideoEditCoreX.OnStop again.
Remarks
This method sends an end-of-stream event to the pipeline, waits for proper shutdown, and cleans up all pipeline resources. After stopping, the pipeline can be reconfigured and started again.
Video_Transition_Add_FadeIn(TimeSpan, TimeSpan)
Adds a fade-in transition effect to the video timeline, creating a smooth transition from black to full opacity. This is a convenience method that creates a FadeIn VideoTransition and adds it to the VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transitions collection.
public void Video_Transition_Add_FadeIn(TimeSpan startTime, TimeSpan stopTime)Parameters
startTimeTimeSpan-
The timeline position where the fade-in effect begins.
stopTimeTimeSpan-
The timeline position where the fade-in effect completes, reaching full opacity.
Remarks
The duration of the fade is determined by the difference between stopTime and startTime. Typical fade durations range from 0.5 to 2 seconds for professional video production. The fade acts only between startTime and stopTime: outside them the picture is at full opacity, and fades that overlap multiply.
Video_Transition_Add_FadeOut(TimeSpan, TimeSpan)
Adds a fade-out transition effect to the video timeline, creating a smooth transition from full opacity to black. This is a convenience method that creates a FadeOut VideoTransition and adds it to the VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transitions collection.
public void Video_Transition_Add_FadeOut(TimeSpan startTime, TimeSpan stopTime)Parameters
startTimeTimeSpan-
The timeline position where the fade-out effect begins at full opacity.
stopTimeTimeSpan-
The timeline position where the fade-out effect completes, reaching complete black.
Remarks
The duration of the fade is determined by the difference between stopTime and startTime. Fade-out transitions are commonly used at the end of videos or scenes for professional finishing. The fade acts only between startTime and stopTime: after stopTime the picture is back at full opacity, so a fade-out followed by a fade-in that starts at its stopTime dips to black between two scenes.
Video_Transition_Clear()
Removes all video transitions from the timeline.
public void Video_Transition_Clear()Remarks
Clears the VisioForge.Core.VideoEditX.VideoEditCoreX.Video_Transitions collection, removing all fade-in, fade-out, and other transition effects. This results in hard cuts between all clips. Call this before reconfiguring transitions to start fresh.
Video_Transitions_Names()
Gets a list of all available video transition type names that can be used in the timeline.
public ObservableCollection<string> Video_Transitions_Names()Returns
- ObservableCollection<string>
-
An observable collection of strings containing the names of all supported transition types.
Remarks
This method returns the names from the VisioForge.Core.Types.X.VideoEdit.VideoTransitionType enumeration, excluding the "None" value. Use these names to discover available transition effects. Common transitions include crossfade, wipe variations, clock wipes, and iris effects.
OnError
Occurs when an error is detected in the video editing pipeline.
public event EventHandler<ErrorsEventArgs> OnErrorEvent Type
Remarks
This event provides detailed error information including error level and message. Subscribe to this event to handle errors gracefully and provide user feedback. If not handled, errors may be displayed through the video view if available. Messages from the cleanup after a session are raised on a thread-pool thread once it has finished, so they can arrive after VisioForge.Core.VideoEditX.VideoEditCoreX.Stop has returned or the next session has started. Those not yet raised when VisioForge.Core.VideoEditX.VideoEditCoreX.Dispose is called are dropped, and one already being raised can overlap it. The cleanup that VisioForge.Core.VideoEditX.VideoEditCoreX.Dispose runs itself reports on its thread, before it returns.
OnLicenseRequired
Occurs when the current editing configuration requires a specific SDK edition.
public event EventHandler<LicenseEventArgs> OnLicenseRequiredEvent Type
OnPause
Occurs when playback or rendering is paused.
public event EventHandler<EventArgs> OnPauseEvent Type
Remarks
This event fires when the media pipeline transitions from playing to paused state. Preview playback can be paused, but rendering operations typically run to completion without pause support.
OnProgress
Occurs periodically during rendering to report the progress of the output operation.
public event EventHandler<ProgressEventArgs> OnProgressEvent Type
Remarks
Progress events are raised approximately every 100 milliseconds during rendering operations. The event args include a percentage (0-100) indicating how much of the timeline has been processed. This event is primarily useful when rendering to file, not during preview playback.
OnResume
Occurs when paused playback resumes.
public event EventHandler<EventArgs> OnResumeEvent Type
Remarks
This event fires when the media pipeline transitions from paused back to playing state during preview playback.
OnStart
Occurs when playback or rendering starts successfully.
public event EventHandler<EventArgs> OnStartEvent Type
Remarks
This event fires once the media pipeline has prerolled the timeline (reached the paused state on its way to playing). It indicates that preview playback or rendering to file is about to begin. Raised on the pipeline's bus thread. A handler that throws is reported as an error and does not stop the pipeline.
OnStop
Occurs when playback or rendering stops: at the end of the timeline, on VisioForge.Core.VideoEditX.VideoEditCoreX.Stop, or when an error ends a render to a file.
public event EventHandler<StopEventArgs> OnStopEvent Type
Remarks
VisioForge.Core.Types.Events.StopEventArgs.Successful is false when a render's output file could not be finished: an
error ended the render (VisioForge.Core.VideoEditX.VideoEditCoreX.OnError reports it), or the encoders could not drain on
VisioForge.Core.VideoEditX.VideoEditCoreX.Stop. The event args also include the final position in the timeline. After this event, the
media pipeline is ready to be reconfigured and restarted.
PropertyChanged
Property changed event.
public event PropertyChangedEventHandler PropertyChanged