Get mp4 files from directory and show in datatable.

Get mp4 files from directory and show in datatable.

classic12classic12 Posts: 228Questions: 60Answers: 4

I have the following to obtain the file list.


<?php echo "Here are our files"; $path = "."; $dh = opendir($path); $i=1; while (($file = readdir($dh)) !== false) { if($file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin") { echo "<a href='$path/$file'>$file</a><br /><br />"; $i++; } } closedir($dh); <?php > ?>

I now need to show a thumbnail of each video in a cell with a start stop buttons for each video.

Anyone already done this ?

Cheers

Steve Warby

Answers

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    First thing to do would be to extract a thumbnail for each video. That is well outside the scope of DataTables I'm afraid. I'd suggest checking out vlc's command line or libav.

    Allan

This discussion has been closed.