I’m completely new to php. i need to play a video in vlc using php in local server apache. i hav following files in /var/www : a.mp4 , sample.php nd vlc file which i copied from file system.
sample.php
<?php
if(isset($_POST['request']))
{
echo system('vlc a.mp4');
}
?>
<html>
<body>
<form method="POST" action="sample.php" >
<br>
<input<?php ?> type="submit" name="request" value="play" />
</body>
</html>
please help..
You can’t do what you are trying. I guess that you are really trying to send the movie to the client and have their video player (be it VLC or whatever) play it. To do that, consider this: Playing Videos in HTML.
If you think about server actually trying to do what you are suggesting, get do some math and figure out the bandwidth required (I get about 20MB/s at 640×480 resolution with 16 bit color and 30 frames / s).