Peertube API : get width and height of a video?

I need to get the width and the height of a video, through the REST API.

I thought that would be at /videos/{id}, but I can’t find them. Is this information available somewhere else ? The only alternative I can think of right now, is to use the GetID3 php library on the first fileUrl link /videos/{id} provides.

This sample code gets the dimensions of a Peertube video through getID3.

Given that :
=> $video is filled with the output of API call /videos/{id}
=> your server has rw access to the ./tmp folder
=> getID3 library is available on your server in the ./getID3-master folder (see

$video = json_decode($video);
$file = tempnam('tmp','getid3');
if (file_put_contents($file, file_get_contents($video->files[0]->fileUrl, false, null, 0, 1000000))) {
  if (require_once('getID3-master/getid3/getid3.php')) {
    $getID3 = new getID3;
    $ThisFileInfo = $getID3->analyze($file);
  $dimensions = array('width' => $ThisFileInfo['video']['resolution_x'], 'height' => $ThisFileInfo['video']['resolution_y']);

(Adapted from user Windoves at