PeerTube · Schema

VideoFile

VideoDecentralizedFederationOpen SourceActivityPubSelf-HostedStreaming

Properties

Name Type Description
id object
magnetUri string magnet URI allowing to resolve the video via BitTorrent without a metainfo file
resolution object
size integer Video file size in bytes
torrentUrl string Direct URL of the torrent file
torrentDownloadUrl string URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)
fileUrl string Direct URL of the video
playlistUrl string Playlist URL of the file if it is owned by a playlist
fileDownloadUrl string URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)
fps number Frames per second of the video file
width number **PeerTube >= 6.1** Video stream width
height number **PeerTube >= 6.1** Video stream height
metadataUrl string URL dereferencing the output of ffprobe on the file
hasAudio boolean **PeerTube >= 6.2** The file container has an audio stream
hasVideo boolean **PeerTube >= 6.2** The file container has a video stream
storage object
View JSON Schema on GitHub

JSON Schema

VideoFile.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/peertube/main/json-schema/VideoFile.json",
  "title": "VideoFile",
  "properties": {
    "id": {
      "$ref": "#/components/schemas/id"
    },
    "magnetUri": {
      "type": "string",
      "format": "uri",
      "description": "magnet URI allowing to resolve the video via BitTorrent without a metainfo file",
      "pattern": "/magnet:\\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i"
    },
    "resolution": {
      "$ref": "#/components/schemas/VideoResolutionConstant"
    },
    "size": {
      "type": "integer",
      "description": "Video file size in bytes"
    },
    "torrentUrl": {
      "type": "string",
      "description": "Direct URL of the torrent file",
      "format": "url"
    },
    "torrentDownloadUrl": {
      "type": "string",
      "description": "URL endpoint that transfers the torrent file as an attachment (so that the browser opens a download dialog)",
      "format": "url"
    },
    "fileUrl": {
      "type": "string",
      "description": "Direct URL of the video",
      "format": "url"
    },
    "playlistUrl": {
      "type": "string",
      "description": "Playlist URL of the file if it is owned by a playlist",
      "format": "url"
    },
    "fileDownloadUrl": {
      "type": "string",
      "description": "URL endpoint that transfers the video file as an attachment (so that the browser opens a download dialog)",
      "format": "url"
    },
    "fps": {
      "type": "number",
      "description": "Frames per second of the video file"
    },
    "width": {
      "type": "number",
      "description": "**PeerTube >= 6.1** Video stream width"
    },
    "height": {
      "type": "number",
      "description": "**PeerTube >= 6.1** Video stream height"
    },
    "metadataUrl": {
      "type": "string",
      "format": "url",
      "description": "URL dereferencing the output of ffprobe on the file"
    },
    "hasAudio": {
      "type": "boolean",
      "description": "**PeerTube >= 6.2** The file container has an audio stream"
    },
    "hasVideo": {
      "type": "boolean",
      "description": "**PeerTube >= 6.2** The file container has a video stream"
    },
    "storage": {
      "$ref": "#/components/schemas/FileStorage"
    }
  }
}