getID3::CalculateCompressionRatioVideo() –
You appear to be a bot. Output may be restricted
Description
Usage
$bool = getID3::CalculateCompressionRatioVideo();
Parameters
Returns
bool
Source
File name: wordpress/wp-includes/ID3/getid3.php
Lines:
1 to 46 of 46
public function CalculateCompressionRatioVideo() { if (empty($this->info['video'])) { return false; } if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) { return false; } if (empty($this->info['video']['bits_per_sample'])) { return false; } switch ($this->info['video']['dataformat']) { case 'bmp': case 'gif': case 'jpeg': case 'jpg': case 'png': case 'tiff': $FrameRate = 1; $PlaytimeSeconds = 1; $BitrateCompressed = $this->info['filesize'] * 8; break; default: if (!empty($this->info['video']['frame_rate'])) { $FrameRate = $this->info['video']['frame_rate']; } else { return false; } if (!empty($this->info['playtime_seconds'])) { $PlaytimeSeconds = $this->info['playtime_seconds']; } else { return false; } if (!empty($this->info['video']['bitrate'])) { $BitrateCompressed = $this->info['video']['bitrate']; } else { return false; } break; } $BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y'] * $this->info['video']['bits_per_sample'] * $FrameRate; $this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed; return true; }