Struct VideoTranscodeOptions

Source
pub struct VideoTranscodeOptions {
    pub bitrate: u32,
    pub width: u32,
    pub height: u32,
    pub audio_boost: Option<u8>,
    pub burn_subtitles: bool,
    pub containers: Vec<ContainerFormat>,
    pub video_codecs: Vec<VideoCodec>,
    pub video_limitations: Vec<Limitation<VideoCodec, VideoSetting>>,
    pub audio_codecs: Vec<AudioCodec>,
    pub audio_limitations: Vec<Limitation<AudioCodec, AudioSetting>>,
}
Expand description

Defines the media formats suitable for transcoding video. The server uses these settings to choose a format to transcode to.

The server is not very clever at choosing codecs that work for a given container format. It is safest to only list codecs and containers that work together.

Note that the server maintains default transcode profiles for many devices which will alter the supported transcode targets. By default for instance if the server thinks you are an Android client it will only offer stereo audio in videos. You can see these profiles in Resources/Profiles of the media server install directory. Individual settings in the profile can be overridden via the API however if you want to be sure of a clean slate use a generic client.

Fields§

§bitrate: u32

Maximum bitrate in kbps.

§width: u32

Maximum video width.

§height: u32

Maximum video height.

§audio_boost: Option<u8>

Audio gain from 0 to 100.

§burn_subtitles: bool

Whether to burn the subtitles into the video.

§containers: Vec<ContainerFormat>

Supported media container formats. Ignored for streaming transcodes.

§video_codecs: Vec<VideoCodec>

Supported video codecs.

§video_limitations: Vec<Limitation<VideoCodec, VideoSetting>>

Limitations to constraint video transcoding options.

§audio_codecs: Vec<AudioCodec>

Supported audio codecs.

§audio_limitations: Vec<Limitation<AudioCodec, AudioSetting>>

Limitations to constraint audio transcoding options.

Trait Implementations§

Source§

impl Clone for VideoTranscodeOptions

Source§

fn clone(&self) -> VideoTranscodeOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VideoTranscodeOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VideoTranscodeOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TranscodeOptions for VideoTranscodeOptions

Source§

fn transcode_parameters( &self, context: Context, protocol: Protocol, container: Option<ContainerFormat>, ) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,