Table of Contents

Class MJPEGOutput

Namespace
VisioForge.Core.Types.Output
Assembly
VisioForge.Core.dll

Represents configuration settings for MJPEG (Motion JPEG) network streaming output.

public sealed class MJPEGOutput : INetworkStreamingOutput

Inheritance

Implements

Inherited Members

Remarks

MJPEG streaming transmits video as a continuous sequence of JPEG images over HTTP, making it simple to implement and widely compatible with web browsers and HTTP clients. Each frame is independently compressed as a JPEG image, providing good quality and easy seeking but at the cost of larger bandwidth compared to modern codecs like H.264.

MJPEG streaming characteristics:

  • No client-side decoder required (works in any web browser)
  • Very low latency suitable for real-time monitoring
  • Each frame is independent (I-frame only, no temporal compression)
  • Higher bandwidth usage compared to H.264/H.265
  • Simple HTTP-based protocol easy to implement

Common use cases:

  • IP cameras and security systems
  • Low-latency monitoring and surveillance
  • Web-based video streaming without plugins
  • Compatibility with legacy systems

Constructors

MJPEGOutput(int)

Initializes a new instance of the VisioForge.Core.Types.Output.MJPEGOutput class with the specified port.

public MJPEGOutput(int port)

Parameters

port int

The TCP port number for the HTTP streaming server.

Remarks

Creates an MJPEG streaming output configuration that will listen on the specified port. The built-in HTTP server will handle client connections and stream MJPEG video to connected clients.

Properties

Port

Gets or sets the TCP port number for the MJPEG HTTP streaming server.

public int Port { get; set; }

Property Value

int

Remarks

Common port choices:

  • 80: Standard HTTP port (requires administrator privileges)
  • 8080: Common alternative HTTP port
  • 8081-8099: Typical ports for streaming servers

Ensure the port is not already in use and that firewall rules allow incoming connections if streaming to external clients. Clients can access the stream via HTTP at: http://server_ip:port/

Methods

Load(string)

Deserializes MJPEG output settings from a JSON string.

public static MJPEGOutput Load(string json)

Parameters

json string

The JSON string containing the serialized MJPEG output settings.

Returns

MJPEGOutput

A new VisioForge.Core.Types.Output.MJPEGOutput instance with settings restored from the JSON string.

Exceptions

JsonException

Thrown when the JSON string is invalid or cannot be deserialized to an MJPEGOutput object.

Save()

Serializes the current MJPEG output settings to a JSON string.

public string Save()

Returns

string

A JSON string representation of the MJPEG streaming configuration.

Remarks

The resulting JSON contains the port configuration and can be restored using the VisioForge.Core.Types.Output.MJPEGOutput.Load(System.String) method.