title;
$videoAuthor = $video_info->author;
$videoDurationSecs = $video_info->lengthSeconds;
$videoDuration = secToDuration( $videoDurationSecs );
$videoChannel = $video_info->author;
// Begin_ViewCount
$extract_video_view = $video_info->viewCount;
$videoViews = bytes( $extract_video_view );
// End_ViewCount
// change hqdefault.jpg to default.jpg for downgrading the thumbnail quality
$videoThumbURL = "https://i1.ytimg.com/vi/{$video_id}/hqdefault.jpg";
$librethumb = $video_info->videoThumbnails[0]->url;
// Extract videos from JSON
$streamFormats = $video_info->formatStreams;
// Downloads
$downloads = $video_info->formatStreams;
///// Beaking DRM!!!
// Check standar video into URL
$url_standar = video_exists( $streamFormats[0]->url );
// format video DRM
$formatdrm = $streamFormats[0]->type;
// nodes
$node0 = "https://invidio.us/latest_version?id={$video_id}&itag=18&local=true";
$node1 = "https://invidious.snopyta.org/latest_version?id={$video_id}&itag=18&local=true";
// explain DRM
$drmv = "https://archive.org/download/libreweb/rms-drm.webm";
$node0on = video_exists( $node0 );
$node1on = video_exists( $node1 );
// check nodes
if ( $node0on === TRUE ) {
$breakurl = $node0;
} elseif ( $node1on === TRUE ) {
$breakurl = $node1;
} else {
$breakurl = $drmv;
$formatdrm = 'video/webm';
}
if ( $url_standar === FALSE ) {
// Liberty data
$breakquality = trim( $streamFormats[0]->resolution, 'p' );
$breaklink = <<
EOT;
$downloadFormat = $downloads[0]->container;
$downloadQuality = $streamFormats[0]->resolution;
$breakdownload = <<
{$downloadFormat}
{$downloadQuality}
EOT;
} else {
$breaklink = '';
$breakdownload = '';
}
///// End Beaking DRM!!!
// // Captions
// $streamCaptions = $video_info->captions;