
Recherche avancée
Autres articles (56)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (8380)
-
D/Volley : [19782] BasicNetwork.logSlowRequests : HTTP response for request [closed]
12 juillet 2020, par nagaraj buganattiHi am facing some issues in php API please help with this


am getting this error




D/Volley : [19782] BasicNetwork.logSlowRequests : HTTP response for
request=<[ ]
http://crowninnovativesolutions.in/MRain/API/index.php?p=uploadVideo
0x70148da5 NORMAL 1> [lifetime=173386], [size=279], [rc=200],
[retryCount=0] D/respo : com.android.volley.ParseError :
org.json.JSONException : Value
libEGL : EGLNativeWindowType 0x796129e010
disconnect failed D/Volley : [1] Request.finish : 173486 ms : [ ]
http://crowninnovativesolutions.in/MRain/API/index.php?p=uploadVideo
0x70148da5 NORMAL 1



And My codes are


function uploadVideo()
{
 require_once("config.php");
 $input = @file_get_contents("php://input");
 $event_json = json_decode($input,true);
 //print_r($event_json);
 
 if(isset($event_json['fb_id']) && isset($event_json['picbase64']) && isset($event_json['videobase64']))
 { 
 $fb_id=htmlspecialchars(strip_tags($event_json['fb_id'] , ENT_QUOTES));
 $description=htmlspecialchars(strip_tags($event_json['description'] , ENT_QUOTES));
 $sound_id=htmlspecialchars(strip_tags($event_json['sound_id'] , ENT_QUOTES));
 $thum = $event_json['picbase64']['file_data'];
 $video = $event_json['videobase64']['file_data'];
 $gif = $event_json['gifbase64']['file_data'];
 
 $fileName=rand()."_".rand();
 $video_url="upload/video/".$fileName.".mp4";
 $thum_url="upload/thum/".$fileName.".jpg";
 $gif_url="upload/gif/".$fileName.".gif";
 
 /*list($type, $data) = explode(',', $data);
 list(, $data) = explode(',', $data);*/
 $thum = base64_decode($thum);
 
 file_put_contents("upload/thum/".$fileName.".jpg", $thum);
 
 /*picture resize*/
 // File and new size
 $filename = 'upload/thum/'.$fileName.'.jpg';
 $newfilename='upload/thum/'.$fileName.'.jpg';
 $percent = 0.4;
 
 // Get new sizes
 list($width, $height) = getimagesize($filename);
 $newwidth = $width * $percent;
 $newheight = $height * $percent;
 // Load
 $thumb = imagecreatetruecolor($newwidth, $newheight);
 $source = imagecreatefromjpeg($filename);
 // Resize
 $res=imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
 // Output
 imagejpeg($thumb,$newfilename);
 /*picture resize*/
 
 
 $video = base64_decode($video);
 
 file_put_contents("upload/video/".$fileName.".mp4", $video);
 
 /*video upload*/
 // File and new size
 $filename = 'upload/video/'.$fileName.'.mp4';
 $newfilename='upload/video/'.$fileName.'.mp4';
 $percent = 0.2;
 // Get new sizes
 list($width, $height) = getimagesize($filename);
 $newwidth = $width * $percent;
 $newheight = $height * $percent;
 // Load
 $thumb = imagecreatetruecolor($newwidth, $newheight);
 $source = imagecreatefromjpeg($filename);
 // Resize
 $res=imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
 // Output
 imagejpeg($thumb,$newfilename);
 
 /*video upload*/
 
 
 $gif = base64_decode($gif);
 
 $filename = 'upload/gif/'.$fileName.'.mp4';
 
 file_put_contents("upload/gif/".$fileName.".gif", $gif);
 
 
 
 $qrry_1="insert into videos(description,video,sound_id,fb_id,gif,thum)values(";
 $qrry_1.="'".$description."',";
 $qrry_1.="'".$video_url."',";
 $qrry_1.="'".$sound_id."',";
 $qrry_1.="'".$fb_id."',";
 $qrry_1.="'".$gif_url."',";
 $qrry_1.="'".$thum_url."'";
 $qrry_1.=")";
 if(mysqli_query($conn,$qrry_1))
 {
 $array_out = array();
 $array_out[] = 
 array(
 "response" => "file uploaded"
 );
 
 $output=array( "code" => "200", "msg" => $array_out);
 print_r(json_encode($output, true)); 
 }
 else
 {
 $array_out = array();
 $array_out[] = 
 array(
 "response" => "error in uploading files"
 );
 
 $output=array( "code" => "201", "msg" => $array_out);
 print_r(json_encode($output, true)); 
 }
 
 
 
 
 }
 else
 {
 $array_out = array();
 $array_out[] = 
 array(
 "response" => "json parem missing"
 );
 
 $output=array( "code" => "201", "msg" => $array_out);
 print_r(json_encode($output, true));
 }

}



Android code


-
PHP/ffmpeg (Windows 7) : - Permission Denied. Tried everything, but still doesn't work
14 janvier, par user365465I have a command-line PHP script that, when given the folder name as an argument when executing the script, will find all images in said folder and resize them using FFmpeg. Problem is, I always get a Permission Denied error in FFmpeg when it attempts to get at the files within the folder. This is while being on Windows 7.



The big problem is that I've tried every solution that keeps popping up on the interwebs when I search for how to fix it. I've changed the settings in Avast !, did the attrib command (both as normal and "Run as Administrator") to unmark as read-only, took ownership of the folder both via command line and using that GUI takeown context menu thing everyone keeps throwing around (obviously before my efforts to mark everything as not-read-only), messed with permissions, everything. I keep searching and searching for a solution, but all of the sites keep throwing out the same things over and over again - things that I've already tried multiple times. I'm at the end of my rope here. All I want to do is resize images quickly and automatically so I can put them up on my website, yet this has been a massive headache...



Please help me ! :(



Update (Additional Points) :



- 

-
The error is through FFmpeg, not PHP. FFmpeg spits out the permission denied error, the script just continues doing what it does normally (or, at least, it would if it weren't for my die statement that kicks in in the event of FFmpeg failing).
-
FFmpeg will execute just fine if it's run normally through the command line instead of through the script. However, this does not help the problem of me having to resize hundreds of photos by hand !
-
I'm just running this script in the normal terminal using the CLI engine. Weird use for PHP, I know, but since I already knew how to work with FFmpeg in PHP (but in Linux !) so I figured I might as well use the code as a normal, stand-alone program...
-
FFmpeg spits out the same error regardless of which PHP function is used to execute it. It happens for shell_exec, exec, passthru, and system.










-
-
PHP/ffmpeg (Windows 7) : - Permission Denied. Tried everything, but still doesn't work
27 octobre 2014, par user365465I have a command-line PHP script that, when given the folder name as an argument when executing the script, will find all images in said folder and resize them using FFmpeg. Problem is, I always get a Permission Denied error in FFmpeg when it attempts to get at the files within the folder. This is while being on Windows 7.
The big problem is that I’ve tried every solution that keeps popping up on the interwebs when I search for how to fix it. I’ve changed the settings in Avast !, did the attrib command (both as normal and "Run as Administrator") to unmark as read-only, took ownership of the folder both via command line and using that GUI takeown context menu thing everyone keeps throwing around (obviously before my efforts to mark everything as not-read-only), messed with permissions, everything. I keep searching and searching for a solution, but all of the sites keep throwing out the same things over and over again - things that I’ve already tried multiple times. I’m at the end of my rope here. All I want to do is resize images quickly and automatically so I can put them up on my website, yet this has been a massive headache...
Please help me ! :(
Update (Additional Points) :
-
The error is through FFmpeg, not PHP. FFmpeg spits out the permission denied error, the script just continues doing what it does normally (or, at least, it would if it weren’t for my die statement that kicks in in the event of FFmpeg failing).
-
FFmpeg will execute just fine if it’s run normally through the command line instead of through the script. However, this does not help the problem of me having to resize hundreds of photos by hand !
-
I’m just running this script in the normal terminal using the CLI engine. Weird use for PHP, I know, but since I already knew how to work with FFmpeg in PHP (but in Linux !) so I figured I might as well use the code as a normal, stand-alone program...
-
FFmpeg spits out the same error regardless of which PHP function is used to execute it. It happens for shell_exec, exec, passthru, and system.
-