
Recherche avancée
Autres articles (86)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
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 (...)
Sur d’autres sites (13469)
-
ffmpeg-php loading videos but not generating jpeg (thumbnails)
16 mars 2021, par Ali HamdarThe website is now running on :
finlandbooking.online


Sorry for this noob question first of all.
This is a social media script, when you upload a video, it shows a black thumbnail - you can play the video, but the thumbnail is black. I checked the issue with developers tools, it seems that it's showing error 404 - image not found. ffmpeg, as far as I understood, is supposed to generate an image and display it as a thumbnail. The image is supposed to be located in /uploads/images/ - Kindly check this part of the code and let me know why it's not working :


else if ($action == 'upload_post_video') {
if (empty($cl["is_logged"])) {
 $data['status'] = 400;
 $data['error'] = 'Invalid access token';
}
else {
 $data['err_code'] = "invalid_req_data";
 $data['status'] = 400;
 $post_data = $me['draft_post'];

 if (not_empty($_FILES['video']) && not_empty($_FILES['video']['tmp_name'])) {
 if (empty($post_data)) {
 $post_id = cl_create_orphan_post($me['id'], "video");
 $post_data = cl_get_orphan_post($post_id);

 cl_update_user_data($me['id'],array(
 'last_post' => $post_id
 ));
 }

 if (not_empty($post_data) && $post_data["type"] == "video") {
 if (empty($post_data['media'])) {
 $file_info = array(
 'file' => $_FILES['video']['tmp_name'],
 'size' => $_FILES['video']['size'],
 'name' => $_FILES['video']['name'],
 'type' => $_FILES['video']['type'],
 'file_type' => 'video',
 'folder' => 'videos',
 'slug' => 'original',
 'allowed' => 'mp4,mov,3gp,webm',
 );

 $file_upload = cl_upload($file_info);
 $upload_fail = false;
 $post_id = $post_data['id'];

 if (not_empty($file_upload['filename'])) {
 try {
 require_once(cl_full_path("core/libs/ffmpeg-php/vendor/autoload.php"));

 $ffmpeg = new FFmpeg(cl_full_path($config['ffmpeg_binary']));
 $thumb_path = cl_gen_path(array(
 "folder" => "images",
 "file_ext" => "jpeg",
 "file_type" => "image",
 "slug" => "poster",
 ));

 $ffmpeg->input($file_upload['filename']);
 $ffmpeg->set('-ss','3');
 $ffmpeg->set('-vframes','1');
 $ffmpeg->set('-f','mjpeg');
 $ffmpeg->output($thumb_path)->ready();
 } 

 catch (Exception $e) {
 $upload_fail = true;
 }

 if (empty($upload_fail)) {
 $img_id = $db->insert(T_PUBMEDIA, array(
 "pub_id" => $post_id,
 "type" => "video",
 "src" => $file_upload['filename'],
 "time" => time(),
 "json_data" => json(array(
 "poster_thumb" => $thumb_path
 ),true)
 ));

 if (is_posnum($img_id)) {
 $data['status'] = 200;
 $data['video'] = array(
 "source" => cl_get_media($file_upload['filename']),
 "poster" => cl_get_media($thumb_path),
 );
 }
 }
 }
 }
 else {
 $data['err_code'] = "total_limit_exceeded";
 $data['status'] = 400;
 }
 }
 else {
 cl_delete_orphan_posts($me['id']);
 cl_update_user_data($me['id'],array(
 'last_post' => 0
 ));
 }
 }
}



}


-
How to get your Piwik plugin translated in many languages ?
About a year ago we introduced the Piwik Marketplace to make it easy for developers to share their plugins with all Piwik users.
As Piwik is currently available in 54 languages we would love to have as many plugins as possible available in at least a few of those languages.
Currently most plugins on the Marketplace are only available in English and sometimes some other languages. To improve this situation, we offer plugin developers the possibility to use the power of our translators community to get their plugins translated.
Some plugin developers are already using this service and some very popular plugins like BotTracker or CustomOptOut have already been translated in more than 10 languages !
Getting translations for your plugin
As long as you are developing an open source plugin hosted on Github, you may get in touch with us (translations@piwik.org) in order to get your plugin translated by the Piwik translators community.
You will need an account on Transifex.com. If you use Transifex with a social login, please ensure to set a password in your account settings. This will be required for fetching new translations into your plugin repository.
Importing your plugin’s strings in the translation platform
While doing the initial setup for your plugin, we will import your english translation file (
en.json
) in your Github plugin repository and we will configure an auto-update for this file. Source strings on Transifex will automatically synchronise with your plugin repository. When you change any string in youren.json
translation file, the updated English strings will automatically be imported in Transifex.How to fetch your plugins translations into your repository
As soon as we have set up your plugin within our Piwik project on Transifex and there are new translations available, you will be able to update your plugin translations using the Piwik console. You will need a locally installed Piwik with development mode enabled, and your plugin installed. To update the translations go to the Piwik directory on your development box and execute the following command :
./console translations:update -u {YourTransifexUserName} -p {YourTransifexPassword} -P {YourPluginName}
We are looking forward to seeing your Piwik plugins available in more languages ! For more information, check out our Translations plugin developer guide.
Happy hacking,
-
How to get your Piwik plugin translated in many languages ?
About a year ago we introduced the Piwik Marketplace to make it easy for developers to share their plugins with all Piwik users.
As Piwik is currently available in 54 languages we would love to have as many plugins as possible available in at least a few of those languages.
Currently most plugins on the Marketplace are only available in English and sometimes some other languages. To improve this situation, we offer plugin developers the possibility to use the power of our translators community to get their plugins translated.
Some plugin developers are already using this service and some very popular plugins like BotTracker or CustomOptOut have already been translated in more than 10 languages !
Getting translations for your plugin
As long as you are developing an open source plugin hosted on Github, you may get in touch with us (translations@piwik.org) in order to get your plugin translated by the Piwik translators community.
You will need an account on Transifex.com. If you use Transifex with a social login, please ensure to set a password in your account settings. This will be required for fetching new translations into your plugin repository.
Importing your plugin’s strings in the translation platform
While doing the initial setup for your plugin, we will import your english translation file (
en.json
) in your Github plugin repository and we will configure an auto-update for this file. Source strings on Transifex will automatically synchronise with your plugin repository. When you change any string in youren.json
translation file, the updated English strings will automatically be imported in Transifex.How to fetch your plugins translations into your repository
As soon as we have set up your plugin within our project Piwik on Transifex and there are new translations available, you will be able to update your plugin translations using the Piwik console. You will need a locally installed Piwik with development mode enabled, and your plugin installed. To update the translations go to the Piwik directory on your development box and execute the following command :
./console translations:update -u {YourTransifexUserName} -p {YourTransifexPassword} -P {YourPluginName}
We are looking forward to seeing your Piwik plugins available in more languages ! For more information, check out our Translations plugin developer guide.
Happy hacking,