Advertisement
Guest User

php

a guest
Mar 20th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2. $joinVideosTXT="joinVideos.txt";
  3. $joinVideos=fopen($joinVideosTXT,"w+");
  4.  
  5.  
  6.  
  7.  
  8.  
  9. //Writes "joinVideos.txt"
  10. $video="nameVideo1";
  11. $video2="nameVideo2";
  12. $pathVideo=$video.".webm";
  13. $pathVideo2=$video2.".webm";
  14. $strVideo="file '".$pathVideo."'"."\r\n";
  15. $strVideo2="file '".$pathVideo2."'"."\r\n";
  16.  
  17. fwrite($joinVideos, $strVideo);
  18. fwrite($joinVideos, $strVideo2);
  19. fclose($joinVideos);
  20.  
  21.  
  22.  
  23. $ffmpeg="ffmpeg.exe";
  24. $videoFinal="videoFinal.webm";
  25.  
  26. // unlink($videoFinal);//remove previous $videoFinal
  27. $cmd="$ffmpeg -f concat -i " .$joinVideosTXT." -c copy ".$videoFinal;
  28.  
  29.  
  30. system($cmd);
  31.  
  32. ?>
  33.  
  34.  
  35. <video controls="controls">
  36. <source src="videoFinal.webm" type="video/webm">
  37. </video>
  38. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement