FulcrumFS FulcrumFS
FulcrumFS FulcrumFS
DocFX + Singulink = ♥

Search Results for

    Class VideoProcessingOptions

    Represents options for configuring VideoProcessor's video file processing.

    Inheritance
    object
    VideoProcessingOptions
    Implements
    IEquatable<VideoProcessingOptions>
    Namespace: FulcrumFS.Videos
    Assembly: FulcrumFS.Videos.dll
    Syntax
    public sealed record VideoProcessingOptions : IEquatable<VideoProcessingOptions>

    Properties

    Name Description
    AudioQuality

    Gets or initializes the quality to use for audio encoding.

    Default is Medium.

    AudioReencodeMode

    Gets or initializes the behavior for re-encoding audio streams.

    AudioSourceValidation

    Gets or initializes the options for validating audio streams in the source video before processing.

    Default is None.

    ForceProgressiveDownload

    Gets or initializes a value indicating whether to ensure the 'moov atom' in an MP4 file is at the beginning of the file.

    Note: this does not enable true streaming, but it does allow playback to begin before the entire streams are downloaded.

    ForceProgressiveFrames

    Gets or initializes a value indicating whether to force progressive frames in the output video streams, as opposed to interlaced frames.

    Note: when set to true, any interlaced video in the source will be deinterlaced.

    Note: when set to false, the original video may still be deinterlaced if deemed necessary by the processing pipeline, e.g., for scaling.

    ForceSquarePixels

    Gets or initializes a value indicating whether to force square pixels in the output video streams.

    Note: when set to true, if the source video has non-square pixels (i.e., a sample aspect ratio different from 1:1), the video will be rescaled to have square pixels.

    Note: when set to false, scaling the video will preserve the original display aspect ratio by adjusting the pixel dimensions and sample aspect ratio accordingly.

    ForceValidateAllStreams

    Gets or initializes a value indicating whether to force validation of all streams, as opposed to assuming they're valid.

    This can be useful to catch potentially invalid streams or other issues that might cause problems during playback, or potentially indicate a malicious stream (e.g., maybe some players interpret that particular invalid sequence in a problematic way), but has a significant performance impact (i.e., slower processing) due to requiring to decode all streams, compared to assuming they're valid and using the copy codec where possible (the performance difference is lower as a percent when re-encoding is already required).

    Note: when enabled, duration is also validated based on the actual measured duration of each stream, rather than just the claimed duration.

    It can be safe to disable this when the source video is from a trusted source, if you prefer better performance over ensuring catching potential errors.

    Default is true.

    FpsOptions

    Gets or initializes the options for limiting the frames per second (FPS) of the video.

    If set to null, the video will not be resampled.

    MaxChannels

    Gets or initializes the maximum number of audio channels to include in the output stream.

    Note: if the source has more channels than this value, channels will be downmixed.

    MaxSampleRate

    Gets or initializes the maximum sample rate (in Hz) for the audio stream (any rates above this will be downsampled).

    MaximumBitsPerChannel

    Gets or initializes the maximum bits per channel to use for video encoding.

    Default is Bits8.

    MaximumChromaSubsampling

    Gets or initializes the maximum chroma subsampling to use for video encoding.

    Default is Subsampling420.

    MetadataStrippingMode

    Gets or initializes a value indicating whether to strip metadata and/or thumbnails from this file.

    Note: metadata includes container metadata, stream metadata, chapters, stream groups and programs; but does not include side data (including rotation info / transformation matrix), attachments, and dispositions.

    Note: currently stream groups and programs do not always copy correctly in preserving metadata mode.

    Note: also, not all "metadata" is successfully copied either, some fields may be missing, changed, or added, even in preserve mode.

    Note: incompatible/unrecognized metadata may be remapped on a best-effort basis, may be lost, or might cause an exception to be thrown when remuxing.

    Note: attachments currently show up under unrecognized streams, so they are currently controlled by TryPreserveUnrecognizedStreams between different container formats or re-encoding streams.

    Note: metadata is correctly preserved when the source file is copied as-is, but in other cases, metadata copying is subject to the aforementioned considerations.

    Note: some metadata might appear as unrecognized streams (e.g., as a data stream), which is controlled by TryPreserveUnrecognizedStreams.

    Preserve

    Gets a predefined instance of VideoProcessingOptions that always preserves the original streams and file when possible.

    ProgressCallback

    Gets or initializes the progress callback, which gets invoked with the current approximate progress (between 0.0 and 1.0).

    Default is null.

    RemapHDRToSDR

    Gets or initializes a value indicating whether to remap HDR to SDR for any HDR streams.

    Note: this uses a basic tone-mapping algorithm and may not produce optimal results for all content.

    Note: if the video is re-encoded, it will always be converted to SDR regardless of this setting, as currently we do not support encoding to HDR.

    RemoveAudioStreams

    Gets or initializes a value indicating whether to remove all audio streams from the output video.

    Default is false.

    ResizeOptions

    Gets or initializes the options for resizing the video.

    If set to null, the video will not be resized unless required.

    Default is null.

    ResultAudioCodecs

    Gets or initializes the allowable result audio codecs.

    Any streams of the audio not matching one of these codecs will be re-encoded to use one of them.

    Audio streams already using one of these codecs may be copied without re-encoding, depending on AudioReencodeMode.

    When audio streams are re-encoded, they are re-encoded to the first codec in this list.

    Providing an empty list is not allowed.

    ResultFormats

    Gets the result media container formats that the video processor can output.

    If re-encoding is required, or other modifications (e.g., metadata changes) are requested, and the source format does not support writing, the first format in the list is used, so it must be writable as per SupportsWriting - otherwise, non-writable formats will only be emitted when copying the file in full with no modifications.

    ResultVideoCodecs

    Gets or initializes the allowable result video codecs.

    Any streams of the video not matching one of these codecs will be re-encoded to use one of them.

    Video streams already using one of these codecs may be copied without re-encoding, depending on VideoReencodeMode.

    When video streams are re-encoded, they are re-encoded to the first codec in this list.

    Providing an empty list is not allowed.

    SourceAudioCodecs

    Gets the source audio codecs for this mapping (it matches any of these, but all streams must match).

    Default is AllSourceCodecs.

    SourceFormats

    Gets the source media container formats that the video processor can process.

    Default is AllSourceFormats.

    SourceVideoCodecs

    Gets the source video codecs for this mapping (it matches any of these, but all streams must match).

    Default is AllSourceCodecs.

    StandardizedH264AACMP4

    Gets a predefined instance of VideoProcessingOptions that always re-encodes to standardized H.264 video stream/s (60fps max, 8 bits per channel, 4:2:0 chroma subsampling, SDR, square pixels, and progressive frames) and standardized AAC audio stream/s (48kHz max, stereo max) in an MP4 container, while attempting to preserve all metadata other than thumbnails by default. Does not preserve unrecognized streams.

    Note: to ensure you get a stream that corresponds to a real level (e.g., 6.2), you must set the appropriate resolution limit (based on your frame rate limit) yourself via ResizeOptions.

    StandardizedHEVCAACMP4

    Gets a predefined instance of VideoProcessingOptions that always re-encodes to standardized HEVC video stream/s (60fps max, 8 bits per channel, 4:2:0 chroma subsampling, SDR, square pixels, progressive frames, and hvc1 tag) and standardized AAC audio stream/s (48kHz max, stereo max) in an MP4 container, while attempting to preserve all metadata other than thumbnails by default. Does not preserve unrecognized streams.

    Note: to ensure you get a stream that corresponds to a real level (e.g., 6.2), you must set the appropriate resolution limit (based on your frame rate limit) yourself via ResizeOptions.

    TryPreserveUnrecognizedStreams

    Gets or initializes a value indicating whether to try to preserve unrecognized streams in the output video.

    Each unrecognised stream that is not compatible with the output container format will be dropped when true, or all will be dropped when false.

    Note: unrecognized streams include attachments, subtitles, data streams, and any streams not recognized by ffmpeg. We reserve the right to recognize additional stream types in the future, such as subtitle streams.

    Note: some metadata might appear as unrecognized streams (e.g., as a data stream).

    VideoCompressionLevel

    Gets or initializes the compression level to use for video encoding.

    Note: does not affect quality, only affects file size and encoding speed trade-off.

    Default is Medium.

    VideoQuality

    Gets or initializes the quality to use for video encoding.

    Default is Medium.

    VideoReencodeMode

    Gets or initializes the behavior for re-encoding video streams.

    VideoSourceValidation

    Gets or initializes the options for validating video streams in the source video before processing.

    Default is None.

    © Singulink. All rights reserved.