public static function getMediaInfo($input, $type = null)
    {
        // Just making sure everything goes smooth
        if (substr($input, 0, 2) == '-i') 
        {
            $input = substr($input, 3);
        }

        switch ($type) 
        {
            case 'json':
                $command = self::getProbePath().' -v quiet -print_format json -show_format -show_streams -pretty -i '.$input.' 2>&1';
                $output  = shell_exec($command);
                $output  = json_decode($output, true);
                break;

            case 'xml':
                $command = self::getProbePath().' -v quiet -print_format xml -show_format -show_streams -pretty -i '.$input.' 2>&1';
                $output  = shell_exec($command);
                break;

            case 'csv':
                $command = self::getProbePath().' -v quiet -print_format csv -show_format -show_streams -pretty -i '.$input.' 2>&1';
                $output  = shell_exec($command);
                break;
            
            default:
                $command = self::getProbePath().' -v quiet -print_format json -show_format -show_streams -pretty -i '.$input.' 2>&1';
                $output  = shell_exec($command);
                $output  = json_decode($output, true);
                break;
        }

        return $output;
    }