From 45ee8db7fd22ff9c9fe200802ed4e179000a5bb4 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Thu, 25 Feb 2010 15:51:44 +0100 Subject: Replaced mediainfo calls by getid3 --- includes/inc_files.php | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'includes/inc_files.php') diff --git a/includes/inc_files.php b/includes/inc_files.php index 266059d..06a9cc0 100755 --- a/includes/inc_files.php +++ b/includes/inc_files.php @@ -5,28 +5,14 @@ $audiotypes='mp3 aac wav '; function mediagetinfostream($stream = "") { - global $mediainfopath, $ffmpegpath; + global $ffmpegpath; // Get info - exec($mediainfopath ." \"" .$stream ."\"", $mediainfo); + $getid3 = new getID3; + $fileinfo = $getid3->analyze($stream); - $info = ""; - $title = ""; - - // Parse info - $count = count($mediainfo); - for ($i = 0; $i < $count; $i++) - { - if (!strncmp($mediainfo[$i], "Video", strlen("Video")) || !strncmp($mediainfo[$i], "Audio", strlen("Audio"))) - break; - - if (!strncmp($mediainfo[$i], "Format", strlen("Format"))) - $title = substr(strstr($mediainfo[$i], ": "), 2); - else if (!strncmp($mediainfo[$i], "Format/Info", strlen("Format/Info"))) - $title = substr(strstr($mediainfo[$i], ": "), 2); - else if (!strncmp($mediainfo[$i], "Duration", strlen("Duration"))) - $info = substr(strstr($mediainfo[$i], ": "), 2); - } + $title = $fileinfo['fileformat']; + $info = $fileinfo['playtime_string']; // Extract a thumbnail exec("rm ram/stream-tb.*"); -- cgit v1.2.3