video.php 2.5 KB

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