Video

Get video source file metadata

GET
https://peertube2.cpy.re/api/v1/videos/{id}/source

Get metadata and download link of original video file

Parameters

idid | UUIDv4 | shortUUIDrequiredpath

The object id, uuid or short uuid

Response

successful operation

Response fields application/json
inputFilenamestring

Uploaded/imported filename

fileDownloadUrlstring

PeerTube >= 6.1 If enabled by the admin, the video source file is kept on the server and can be downloaded by the owner

resolutionVideoResolutionConstant

PeerTube >= 6.1

Show child attributes

resolutions and their labels for the video

Video resolution (0, 240, 360, 720, 1080, 1440 or 2160)

0 is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.

Example
240
labelstring
Example
240p
sizeinteger

PeerTube >= 6.1 Video file size in bytes

fpsnumber

PeerTube >= 6.1 Frames per second of the video file

widthinteger

PeerTube >= 6.1 Video stream width

heightinteger

PeerTube >= 6.1 Video stream height

createdAtstring<date-time>

Authorization

OAuth2oauth2

Authenticating via OAuth requires the following steps:

  • Have an activated account
  • Generate an access token for that account at /api/v1/users/token.
  • Make requests with the Authorization: Bearer <token> header
  • Profit, depending on the role assigned to the account

Note that the access token is valid for 1 day and is given along with a refresh token valid for 2 weeks.