Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Error While Video preview...
12-16-2013, 10:12 PM
Post: #1
Getting Error While Video preview...
pls solve mai problem PHP Warning: Cannot modify header information - headers already sent by (output started at ..../plugins/video_plugin.php:67) in ...../icon.php on line 20
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes deep88's post:
demonhellions (11-29-2016)
12-16-2013, 11:53 PM
Post: #2
RE: Getting Error While Video preview...
Can you post video_plugin.php, icon.php so can we look at the problem?
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes aslan's post:
demonhellions (11-29-2016)
12-17-2013, 06:10 AM (This post was last modified: 12-17-2013 06:16 AM by deep88.)
Post: #3
RE: Getting Error While Video preview...
here is problem in icon.php,, it tries to send preview for other file extensions even 3gp,mp4..pls make it send preview for only .jar and .apk files



<?php
include "inc/init.php";
include "lib/pclzip.lib.php";

$plugins->run_hook("icon_top");

$file = substr(base64_decode($_GET["s"]),1);
$q = array("icon.png","ico.png","i.png","logo.png","icono.png","Icon.png","Ico.png","I.png","Icono.png","ICON.png","ICO.png","I.png","ICONO.png","ICON.PNG","ICO.PNG","I.PNG","ICONO.PNG","icons/icon.png","icons/ico.png","icons/i.png","icons/icono.png","drawable/icon.png","I","i1.png","AppIcon01.png");
$zip = new PclZip($file);
$ar = $zip->extract(PCLZIP_OPT_BY_NAME,$q,PCLZIP_OPT_EXTRACT_IN_OUTPUT);

$plugins->run_hook("icon");

if(!empty($ar)) {

header("Content-type: image/png");

}else {
$cz=file_get_contents(MAI_TPL."style/png/jar.png");
header("Content-type: image/png");
echo $cz;
}

$plugins->run_hook("icon_end");

here is video plugin<?php
/**
* Video preview Plugin - This will allow preview on video files
* author: ionutvmi
* 6 Oct 2012
*/

$plugins->add_hook("icon_top","video_get");
$plugins->add_hook("index_files","video_preview");
$plugins->add_hook("file","video_preview2");

function video_info(){
return array(
"name" => "Video Plugin",
"author" => "ionutvmi",
"author_site" => "http://master-land.net",
"description" => "This will allow preview on video files(requires ffmpeg installed)",
);
}


function video_preview(){
global $icon,$ext,$d;
if(in_array($ext->extension,array("3gp","mp4","avi","wmv")))
$icon = "/icon.php?s=".base64_encode($d->path);

}

function video_preview2($value){
global $ext,$icon,$show_icon,$file;
if(in_array($ext->extension,array("3gp","mp4","avi","wmv"))){
$new_icon = "/icon.php?s=".base64_encode($file->path);
$show_icon = str_replace($icon,$new_icon,$show_icon);
}


return $value;
}


function video_get(){
global $ext;
$file = MAI_ROOT.substr(base64_decode($_GET["s"]),1);
$info = (object)pathinfo($file);
if(!in_array($infhiroextension,array("3gp","mp4","avi","wmv")))
return true;

if(!extension_loaded('ffmpeg')){
$cz=file_get_contents(MAI_TPL."style/png/3gp.png");
header("Content-type: image/png");
echo $cz;
}


//video preview
$media = new ffmpeg_movie($file);
$k_frame=intval($media->getFrameCount());
$w=$media->GetFrameWidth();
$h=$media->GetFrameHeight();


$frame = $media->getFrame(10);
if ($frame) {
$gd1 = $frame->toGDImage();
$gd2 = imagecreatetruecolor(100,100);
imagecopyresampled($gd2, $gd1, 0,0,0,0, 100, 100, $w, $h);
if($gd2){
header('Content-Type: image/jpeg');
imagejpeg($gd2);
imagedestroy($gd1);
imagedestroy($gd2);
}
}
}
?>
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes deep88's post:
demonhellions (11-29-2016)
12-20-2013, 05:20 PM
Post: #4
RE: Getting Error While Video preview...
This is not a problem, of course its going to show for videos because its a video_plugin lol its not gona preview apk etc when its designed for previewing video.
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes craigibhoy's post:
demonhellions (11-29-2016)
12-20-2013, 06:06 PM
Post: #5
RE: Getting Error While Video preview...
bt why it showing error in error logs...
Find all posts by this user
Like Post Quote this message in a reply
[-] The following 1 user Likes deep88's post:
demonhellions (11-29-2016)
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)