<?php /** * Created by PhpStorm. * User: Ferdi * Date: 15.12.2015 * Time: 13:12 */ require_once '../autoload.php'; use quality\QualityApi; $foldername = "content"; $files = array(); if (file_exists($foldername) || mkdir($foldername)) { $qualityApi = new QualityApi(); $qualitiesListFile = fopen($foldername . "\\qualitiesList.txt", "w") or die("Unable to open file!"); fwrite($qualitiesListFile, $qualityApi->getQualityIdsJson()); fclose($qualitiesListFile); array_push($files, $foldername . "\\qualitiesList.txt"); $qualityTestsListFile = fopen($foldername . "\\qualityTestsList.txt", "w") or die("Unable to open file!"); fwrite($qualityTestsListFile, $qualityApi->getQualityTestIdsJson()); fclose($qualityTestsListFile); array_push($files, $foldername . "\\qualityTestsList.txt"); //Save all Qualities //First general, then PSNR ans SSIM $qualityFolder = $foldername . "\\qualities"; if (file_exists($qualityFolder) || mkdir($qualityFolder)) { foreach ($qualityApi->getQualityIds()->getAllIds() as $qualityId) { $qualityFolder = $foldername . "\\qualities\\" . $qualityId; if (file_exists($qualityFolder) || mkdir($qualityFolder)) { $qualityInfoFile = fopen($qualityFolder . "\\info.txt", "w") or die("Unable to open file!"); fwrite($qualityInfoFile, $qualityApi->getQualityWithIdJson($qualityId));
</div> --> <!-- Bitdash Player --> <div class="ui styled fluid accordion" style="margin-bottom: 16px;margin-top: 16px"> <div class="title"> <i class="dropdown icon"></i> Video </div> <div class="content" style="display: hidden"> <div id="player"></div> </div> </div> <script type="text/javascript"> <?php $qualityApi = new QualityApi(); ?> var conf = { key: "<?php echo $qualityApi->getPlayerkey(); ?> ", source: { dash: "<?php echo $qualityTest->mpdUrl; ?> " } }; var player = bitdash('player');
<?php /** * Created by PhpStorm. * User: Ferdi * Date: 11.12.2015 * Time: 03:29 */ require_once '../quality/QualityApi.php'; use quality\QualityApi; if (isset($_GET['originalUrl']) && isset($_GET['mpdUrl']) && (strlen($_GET['originalUrl']) > 0 && strlen($_GET['mpdUrl']) > 0) && isset($_GET['local'])) { $api = new QualityApi(); $local = $_GET['local']; if (!isset($_GET['numberOfThreads'])) { $_GET['numberOfThreads'] = 1; } if (!isset($_GET['numberOfFrames'])) { $_GET['numberOfFrames'] = -1; } //create Quality if ($local == 'false') { $id = $api->createQuality($_GET['originalUrl'], $_GET['mpdUrl'], $_GET['numberOfThreads'], $_GET['numberOfFrames'], false); } else { $id = $api->createQuality($_GET['originalUrl'], $_GET['mpdUrl'], $_GET['numberOfThreads'], $_GET['numberOfFrames'], true); } //Evaluate Result if ($id != -1) { $_GET = array(); header("Location: http:ShowQuality.php?id=" . $id); } else { $_GET['error'] = '1';
<?php /** * Created by PhpStorm. * User: Ferdi * Date: 07.12.2015 * Time: 10:58 */ require_once '../autoload.php'; use quality\QualityApi; $quality = new QualityApi(); ?> <!doctype html> <html> <head> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="../styles/main.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script type="text/javascript" src="../charts/simpleGoogleBarChart.js"></script> <script src="//bitmovin-a.akamaihd.net/bitdash/latest/bitdash.min.js"></script> <!-- Accordions --> <script> $(function() { $( "#accordion_representations" ).accordion({ collapsible: true }); }); $(function() { $( "#accordion_player" ).accordion({
} .wireframe { margin-top: 2em; } .ui.footer.segment { margin: 5em 0em 0em; padding: 5em 0em; } </style> <script> $( document ).ready(function() { var hitslineChart = dc.compositeChart("#psnr_values"); var data = <?php $api = new QualityApi(); echo $api->getDCJSDataWithId("testvideo"); ?> ; /*var data = [ {frame: 0, b4000: 43.34, b8000: 50.6}, {frame: 1, b4000: 45.34, b8000: 51.6}, {frame: 2, b4000: 42.34, b8000: 49.6}, {frame: 3, b4000: 46.34, b8000: 52.6}, {frame: 4, b4000: 41.34, b8000: 48.6}, {frame: 5, b4000: 47.34, b8000: 53.6}, {frame: 6, b4000: 40.34, b8000: 47.6}, {frame: 7, b4000: 43.34, b8000: 50.6} ];*/ var ndx = crossfilter(data);
<?php /** * Created by PhpStorm. * User: Ferdi * Date: 11.12.2015 * Time: 03:29 */ require_once '../autoload.php'; use quality\QualityApi; if (isset($_GET['originalUrl']) && isset($_GET['mpdUrl']) && (strlen($_GET['originalUrl']) > 0 && strlen($_GET['mpdUrl']) > 0)) { $api = new QualityApi(); if (!isset($_GET['threadCountMin'])) { $_GET['threadCountMin'] = 1; } if (!isset($_GET['threadCountMax'])) { $_GET['threadCountMax'] = 1; } if (!isset($_GET['threadStepSize'])) { $_GET['threadStepSize'] = 1; } if (!isset($_GET['threadRepetitons'])) { $_GET['threadRepetitons'] = 1; } //create Quality $id = $api->createQualityTest($_GET['originalUrl'], $_GET['mpdUrl'], $_GET['threadCountMin'], $_GET['threadCountMax'], $_GET['threadStepSize'], $_GET['threadRepetitons']); //Evaluate Result if ($id != -1) { $_GET = array(); header("Location: http:ShowQualityTest.php?id=" . $id); } else {
<td><?php echo QualityApi::getFormattedtiemString($quality->timeNeeded) . " " . $quality->timeNeeded; ?> </td> </tr> <tr class="alt"> <td>Number of threads:</td> <td><?php echo $quality->numberOfThreads; ?> </td> </tr> <tr> <td>Time per Thread:</td> <td><?php echo QualityApi::getFormattedtiemString($quality->timeNeeded / $quality->numberOfThreads); ?> </td> </tr> <tr class="alt"> <td>Number of frames:</td> <td><?php echo $quality->numberOfFrames; ?> </td> </tr> <tr> <td>Original Video:</td> <td><a href="<?php echo $quality->originalUrl; ?>
/** * Created by PhpStorm. * User: Ferdi * Date: 15.12.2015 * Time: 18:45 */ require_once '../quality/QualityApi.php'; use quality\QualityApi; $ids = array(); if (isset($_GET['ids'])) { $ids = $_GET['ids']; } if (count($ids) < 2 || count($ids) > 3) { header("Location: http:ShowAllQualities.php"); } $qualityApi = new QualityApi(); function shortenURL($url) { $offset = 0; if (stringStartsWith($url, "https")) { $offset = 9; } else { if (stringStartsWith($url, "http")) { $offset = 8; } } $main = substr($url, 0, strpos($url, "/", $offset)); $file = strrchr($url, "/"); return $main . "/..." . $file; } function filenameFromURL($url)
<?php /** * Created by PhpStorm. * User: ferdinand * Date: 2/28/16 * Time: 4:24 PM */ require_once '../quality/QualityApi.php'; use quality\QualityApi; $qualityApi = new QualityApi(); $currentId = null; if (isset($_GET["id"])) { $currentId = $_GET["id"]; } ?> <!DOCTYPE html> <html lang="en"> <head> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script src="//bitmovin-a.akamaihd.net/bitdash/latest/bitdash.min.js"></script> <!-- menu --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <link rel="stylesheet" type="text/css" href="../styles/main.css"> <script type="text/javascript" src="../../Semantic-UI-master/dist/components/accordion.js"></script> <script type="text/javascript" src="../../Semantic-UI-master/dist/components/dropdown.js"></script>