Skip to content

GraphQL interface for Streaming package

This is a new GraphQL endpoint used to talk to the streaming package. Initially it will be used to grab transcoding session information.

Todo list:

  • Setup a new GraphQL Resolver
  • Implement sessions query
  • Ensure Admin authentication
  • Create new endpoint that translates a filelocator to a movie/episode(UUID)

How it works

A new GraphQL endpoint has been created in the streaming package (this to keep the current isolation plans). The metadata GraphQL interface still runs at /olaris/m/query however there is new endpoint now at /olaris/s/query solely for the streaming package. For now it just holds the current transcoding/transmuxing streams if any are busy.

For instance:

{
  "data": {
    "sessions": [
      {
        "sessionID": "session:CXmKVQSpEDtoUEWP",
        "fileLocator": "local#/home/maran/Videos/Movies/Bullets.of.Justice.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv",
        "lastAccessed": "2022-05-10 15:47:42.980925239 +0200 CEST m=+526.633315107",
        "userID": 1,
        "transcodingPercentage": 29,
        "lastRequestedSegmentIdx": 70,
        "throttled": true,
        "transcoded": false,
        "transmuxed": true,
        "bitRate": 6494736,
        "resolution": "1280x544",
        "container": "video/mp4",
        "codecs": "avc1.64001f",
        "codecName": "h264",
        "streamType": "video",
        "language": "",
        "title": ""
      },
      {
        "sessionID": "session:CXmKVQSpEDtoUEWP",
        "fileLocator": "local#/home/maran/Videos/Movies/Bullets.of.Justice.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv",
        "lastAccessed": "2022-05-10 15:47:42.980000171 +0200 CEST m=+526.632390039",
        "userID": 1,
        "transcodingPercentage": 10,
        "lastRequestedSegmentIdx": 70,
        "throttled": true,
        "transcoded": true,
        "transmuxed": false,
        "bitRate": 0,
        "resolution": "0x0",
        "container": "audio/mp4",
        "codecs": "eac3",
        "codecName": "",
        "streamType": "audio",
        "language": "eng",
        "title": "English"
      }
    ]
  }
}

An other GraphQL call has been added to metadata resolver to retrieve metadata information about a specific file. If you want to implement a nice looking interface for current streams on a client you can make it pretty with the information from this call. To take the example above you can now do.

{getMediaFileFromFileLocator(fileLocator: "local#/home/maran/Videos/Movies/Bullets.of.Justice.2019.720p.AMZN.WEB-DL.DDP5.1.H.264-NTG.mkv"){
  __typename
  ... on MovieFile{
    fileName
    movie{
      backdropPath
      posterURL
      title
    }
  }
}}

This should keep the packages isolated but also allows translations for clients.

Edited by Animazing

Merge request reports

Loading