video.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html>
  3. <link rel="stylesheet" href="//cdn.rawgit.com/TeaMeow/TocasUI/master/dist/tocas.min.css">
  4. <head>
  5. <meta charset="utf-8">
  6. <title>Meow</title>
  7. <?php
  8. //Modify this if you need mmfpeg support
  9. // movie.avi.... name of the movie you want to take a screenshot from
  10. // 00:00:00.... Where in the movie do you wanna take your screenshot, 10 seconds from start? ex: 00:00:10
  11. // picname..... name your generated pic
  12. //exec("START ffmpeg.exe -vcodec png -i uploads/video/movie.avi -ss 00:00:10 -vframes frames picname%d.png");
  13. ?>
  14. </head>
  15. <body>
  16. <div class="ts container">
  17. <br>
  18. <h1>IMUS Laboratory </h1><br>
  19. <h2>ArOZ Video Bank</h2>
  20. <div class="ts pointing secondary big menu">
  21. <a class="item" href="index.php">Index</a>
  22. <a class="item" href="music.php">Music</a>
  23. <a class="active item" href="video.php">Video</a>
  24. <a class="item" href="upload/">Upload</a>
  25. <a class="item" href="upload/uploads/">Upload Dir</a>
  26. </div>
  27. <div class="ts segment">
  28. <p><br></p>
  29. <p>On this page, you can click "View" to stream a video from your server.
  30. <br>You can also download the video after you have entered the "view" page.
  31. <br>Make sure your browser support HTML5 player function :)</p>
  32. <p></p>
  33. <div class="ts top left attached label">Information</div>
  34. </div>
  35. <div class="ts container">
  36. <?php
  37. $dir = 'upload/uploads/video/';
  38. $files = scandir($dir);
  39. $linenumber = 0;
  40. foreach($files as $file){
  41. #echo substr_count($dir,"/") - 1 . '<br>';
  42. if ($linenumber >= substr_count($dir,"/") - 1){ #Bypass the fisrt two directory
  43. if (strpos($file, '.mp4') == True){
  44. #echo $file;
  45. echo '<div class="ts basic jumbotron" style="outline: solid #353535">';
  46. $filetitle = hex2bin(str_replace(".mp4","",str_replace("inith","",$file)));
  47. echo '<h4 class="ts header"><i class="video play outline icon"></i>' . $filetitle . "</h4>";
  48. echo substr(filesize($dir . $file)/1000000,0,4) . "MB [" . pathinfo($dir.$file)['extension'].']<br>';
  49. echo '<a class="ts mini primary button" href="vidplay.php?directory='. $dir .'&filename='.$file.'">View</a>';
  50. echo '</div>';
  51. }
  52. }
  53. $linenumber += 1;
  54. }
  55. ?>
  56. </div>
  57. <p align="right"><img class="ts small image" src="logo.png"></p>
  58. </body>
  59. </html>