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 copy of the value. Read more
1.0.0 · source§

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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