mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
97 KiB
97 KiB
TranscodeSubtitlesRequest
Example Usage
import {
TranscodeSubtitlesLocation,
TranscodeSubtitlesProtocol,
TranscodeSubtitlesRequest,
TranscodeSubtitlesSubtitles,
} from "@lukehagar/plexjs/models/operations";
import { AdvancedSubtitles, BoolInt, TranscodeType } from "@lukehagar/plexjs/models/shared";
let value: TranscodeSubtitlesRequest = {
transcodeType: TranscodeType.Video,
advancedSubtitles: AdvancedSubtitles.Burn,
audioBoost: 50,
audioChannelCount: 5,
autoAdjustQuality: BoolInt.True,
autoAdjustSubtitle: BoolInt.True,
directPlay: BoolInt.True,
directStream: BoolInt.True,
directStreamAudio: BoolInt.True,
disableResolutionRotation: BoolInt.True,
hasMDE: BoolInt.True,
location: TranscodeSubtitlesLocation.Wan,
mediaBufferSize: 102400,
mediaIndex: 0,
musicBitrate: 5000,
offset: 90.5,
partIndex: 0,
path: "/library/metadata/151671",
peakBitrate: 12000,
photoResolution: "1080x1080",
protocol: TranscodeSubtitlesProtocol.Dash,
secondsPerSegment: 5,
subtitleSize: 50,
subtitles: TranscodeSubtitlesSubtitles.None,
videoBitrate: 12000,
videoQuality: 50,
videoResolution: "1080x1080",
xPlexClientProfileExtra:
"add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash)",
xPlexClientProfileName: "generic",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
accepts |
shared.Accepts | ➖ | Indicates the client accepts the indicated media types | |
clientIdentifier |
string | ➖ | An opaque identifier unique to the client | abc123 |
product |
string | ➖ | The name of the client product | Plex for Roku |
version |
string | ➖ | The version of the client application | 2.4.1 |
platform |
string | ➖ | The platform of the client | Roku |
platformVersion |
string | ➖ | The version of the platform | 4.3 build 1057 |
device |
string | ➖ | A relatively friendly name for the client device | Roku 3 |
model |
string | ➖ | A potentially less friendly identifier for the device model | 4200X |
deviceVendor |
string | ➖ | The device vendor | Roku |
deviceName |
string | ➖ | A friendly name for the client | Living Room TV |
marketplace |
string | ➖ | The marketplace on which the client application is distributed | googlePlay |
transcodeType |
shared.TranscodeType | ✔️ | Type of transcode media | |
transcodeSessionId |
string | ➖ | Transcode session UUID | |
advancedSubtitles |
shared.AdvancedSubtitles | ➖ | Indicates how incompatible advanced subtitles (such as ass/ssa) should be included: * 'burn' - Burn incompatible advanced text subtitles into the video stream * 'text' - Transcode incompatible advanced text subtitles to a compatible text format, even if some markup is lost |
burn |
audioBoost |
number | ➖ | Percentage of original audio loudness to use when transcoding (100 is equivalent to original volume, 50 is half, 200 is double, etc) | 50 |
audioChannelCount |
number | ➖ | Target video number of audio channels. | 5 |
autoAdjustQuality |
shared.BoolInt | ➖ | Indicates the client supports ABR. | 1 |
autoAdjustSubtitle |
shared.BoolInt | ➖ | Indicates if the server should adjust subtitles based on Voice Activity Data. | 1 |
directPlay |
shared.BoolInt | ➖ | Indicates the client supports direct playing the indicated content. | 1 |
directStream |
shared.BoolInt | ➖ | Indicates the client supports direct streaming the video of the indicated content. | 1 |
directStreamAudio |
shared.BoolInt | ➖ | Indicates the client supports direct streaming the audio of the indicated content. | 1 |
disableResolutionRotation |
shared.BoolInt | ➖ | Indicates if resolution should be adjusted for orientation. | 1 |
hasMDE |
shared.BoolInt | ➖ | Ignore client profiles when determining if direct play is possible. Only has an effect when directPlay=1 and both mediaIndex and partIndex are specified and neither are -1 | 1 |
location |
operations.TranscodeSubtitlesLocation | ➖ | Network type of the client, can be used to help determine target bitrate. | wan |
mediaBufferSize |
number | ➖ | Buffer size used in playback (in KB). Clients should specify a lower bound if not known exactly. This value could make the difference between transcoding and direct play on bandwidth constrained networks. | 102400 |
mediaIndex |
number | ➖ | Index of the media to transcode. -1 or not specified indicates let the server choose. | 0 |
musicBitrate |
number | ➖ | Target bitrate for audio only files (in kbps, used to transcode). | 5000 |
offset |
number | ➖ | Offset from the start of the media (in seconds). | 90.5 |
partIndex |
number | ➖ | Index of the part to transcode. -1 or not specified indicates the server should join parts together in a transcode | 0 |
path |
string | ➖ | Internal PMS path of the media to transcode. | /library/metadata/151671 |
peakBitrate |
number | ➖ | Maximum bitrate (in kbps) to use in ABR. | 12000 |
photoResolution |
string | ➖ | Target photo resolution. | 1080x1080 |
protocol |
operations.TranscodeSubtitlesProtocol | ➖ | Indicates the network streaming protocol to be used for the transcode session: * 'http' - include the file in the http response such as MKV streaming * 'hls' - hls stream (RFC 8216) * 'dash' - dash stream (ISO/IEC 23009-1:2022) |
dash |
secondsPerSegment |
number | ➖ | Number of seconds to include in each transcoded segment | 5 |
subtitleSize |
number | ➖ | Percentage of original subtitle size to use when burning subtitles (100 is equivalent to original size, 50 is half, ect) | 50 |
subtitles |
operations.TranscodeSubtitlesSubtitles | ➖ | Indicates how subtitles should be included: * 'auto' - Compute the appropriate subtitle setting automatically * 'burn' - Burn the selected subtitle; auto if no selected subtitle * 'none' - Ignore all subtitle streams * 'sidecar' - The selected subtitle should be provided as a sidecar * 'embedded' - The selected subtitle should be provided as an embedded stream * 'segmented' - The selected subtitle should be provided as a segmented stream |
Burn |
videoBitrate |
number | ➖ | Target video bitrate (in kbps). | 12000 |
videoQuality |
number | ➖ | Target photo quality. | 50 |
videoResolution |
string | ➖ | Target maximum video resolution. | 1080x1080 |
xPlexClientProfileExtra |
string | ➖ | See Profile Augmentations . | add-limitation(scope=videoCodec&scopeName=*&type=upperBound&name=video.frameRate&value=60&replace=true)+append-transcode-target-codec(type=videoProfile&context=streaming&videoCodec=h264%2Chevc&audioCodec=aac&protocol=dash) |
xPlexClientProfileName |
string | ➖ | Which built in Client Profile to use in the decision. Generally should only be used to specify the Generic profile. | generic |
xPlexSessionIdentifier |
string | ➖ | Unique per client playback session. Used if a client can playback multiple items at a time (such as a browser with multiple tabs) |