mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
Video
(Video)
Overview
API Calls that perform operations with Plex Media Server Videos
Available Operations
- GetTimeline - Get the timeline for a media item
- StartUniversalTranscode - Start Universal Transcode
GetTimeline
Get the timeline for a media item
Example Usage
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
GetTimelineRequest req = new GetTimelineRequest() {
RatingKey = 23409D,
Key = "/library/metadata/23409",
State = LukeHagar.PlexAPI.SDK.Models.Requests.State.Playing,
HasMDE = 1D,
Time = 2000D,
Duration = 10000D,
Context = "home:hub.continueWatching",
PlayQueueItemID = 1D,
PlayBackTime = 2000D,
Row = 1D,
};
var res = await sdk.Video.GetTimelineAsync(req);
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetTimelineRequest | ✔️ | The request object to use for the request. |
Response
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTimelineBadRequest | 400 | application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.GetTimelineUnauthorized | 401 | application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4xx-5xx | / |
StartUniversalTranscode
Begin a Universal Transcode Session
Example Usage
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Requests;
using LukeHagar.PlexAPI.SDK.Models.Components;
var sdk = new PlexAPI(
accessToken: "<YOUR_API_KEY_HERE>",
xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40"
);
StartUniversalTranscodeRequest req = new StartUniversalTranscodeRequest() {
HasMDE = 1D,
Path = "/library/metadata/23409",
MediaIndex = 0D,
PartIndex = 0D,
Protocol = "hls",
FastSeek = 0D,
DirectPlay = 0D,
DirectStream = 0D,
SubtitleSize = 100D,
Subtites = "burn",
AudioBoost = 100D,
Location = "lan",
MediaBufferSize = 102400D,
Session = "zvcage8b7rkioqcm8f4uns4c",
AddDebugOverlay = 0D,
AutoAdjustQuality = 0D,
};
var res = await sdk.Video.StartUniversalTranscodeAsync(req);
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
StartUniversalTranscodeRequest | ✔️ | The request object to use for the request. |
Response
StartUniversalTranscodeResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| LukeHagar.PlexAPI.SDK.Models.Errors.StartUniversalTranscodeBadRequest | 400 | application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.StartUniversalTranscodeUnauthorized | 401 | application/json |
| LukeHagar.PlexAPI.SDK.Models.Errors.SDKException | 4xx-5xx | / |