ffmpegjs.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. include '../auth.php';
  3. ?>
  4. <html>
  5. <head>
  6. <meta charset="UTF-8">
  7. <script type='text/javascript' charset='utf-8'>
  8. // Hides mobile browser's address bar when page is done loading.
  9. window.addEventListener('load', function(e) {
  10. setTimeout(function() { window.scrollTo(0, 1); }, 1);
  11. }, false);
  12. </script>
  13. <link href="../script/tocas/tocas.css" rel='stylesheet'>
  14. <script src="../script/jquery.min.js"></script>
  15. <title>AOB ffmpeg experimental</title>
  16. <style type="text/css">
  17. body {
  18. padding-top: 4em;
  19. background-color: rgb(250, 250, 250);
  20. overflow: scroll;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <?php
  26. if (isset($_GET['cmd']) && $_GET['cmd'] != ""){
  27. $command = $_GET['cmd'];
  28. }else{
  29. $command = "-help";
  30. }
  31. if (isset($_GET['filename']) && $_GET['filename'] != ""){
  32. $filename = $_GET['filename'];
  33. }else{
  34. die("Undefined converting filename");
  35. }
  36. ?>
  37. <div class="ts container" >
  38. <div id="terminal">
  39. <div class="terminal-top-bar">
  40. ffmpeg-all-codecs.js browser based media converter interface (experimental)
  41. </div>
  42. <div class="terminal-header">
  43. <input id="input" value="<?php echo $command;?>" style="width:50%;"/>
  44. <button id="run" class="ts button">Run Command</button>
  45. </div>
  46. <pre id="output" style="word-wrap: break-word; width:100%;height:720px;overflow-y: scroll;">Loading JavaScript files (it may take a minute)</pre>
  47. </div>
  48. <div id="files"></div>
  49. </div>
  50. <script>
  51. var targetFile = "<?php echo $filename;?>";
  52. </script>
  53. <script type='text/javascript' src='terminal.js'></script>
  54. </body>
  55. </html>