
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (50)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (7171)
-
How to convert mp4 files into mp3 on button click using ffmpeg/php ?
4 juin 2019, par flashI am working on a php code as shown below where I am converting mp4 files into mp3 using system command ffmpeg (in the case statement below).
<?php
$mp4_files = preg_grep('~\.(mp4)$~', scandir($src_dir));
foreach ($mp4_files as $f)
{
$parts = pathinfo($f);
switch ($parts['extension'])
{
case 'mp4' :
$filePath = $src_dir . DS . $f;
system('ffmpeg -i ' . $filePath . ' -map 0:2 -ac 1 ' . $destination_dir . DS . $parts['filename'] . '.mp3', $result); // Through this command conversion happens.
}
}
$mp3_files = preg_grep('/^([^.])/', scandir($destination_dir));
?>After conversion, mp3 files goes into destination_dir. If new mp4 file arrives in $src_dir, the conversion usually happen on refresh of a page.
Once the conversion is complete, I am parsing everything into table as shown below :
<table>
<tr>
<th style="width:8%; text-align:center;">House Number</th>
<th style="width:8%; text-align:center;">MP4 Name</th>
<th style="width:8%; text-align:center;">Action/Status</th>
</tr>
<?php
$mp4_files = array_values($mp4_files);
$mp3_files = array_values($mp3_files);
foreach ($programs as $key => $program) {
$file = $mp4_files[$key];
$file2 = $mp3_files[$key]; // file2 is in mp3 folder
?>
<tr>
<td style="width:5%; text-align:center;"><span style="border: 1px solid black; padding:5px;"><?php echo basename($file, ".mp4"); ?></span></td>
<td style="width:5%; text-align:center;"><span style="border: 1px solid black; padding:5px;"><?php echo basename($file); ?></span></td>
<td style="width:5%; text-align:center;"><button style="width:90px;" type="button" class="btn btn-outline-primary">Gotd>
</button></td></tr>
<?php } ?>
</table>Problem Statement :
I am wondering what changes I should make in the php code above that on click of a Go button, conversion of individual mp4 into mp3 happen.
On clicking of Go button, individual mp3 file (from an mp4) belonging to an individual row should go inside destination directory ($destination_dir).
-
Anomalie #3017 : Gestion des versions de plugins
20 avril 2020, par RastaPopoulos ♥Mise à jour de la maquette, avec un container, trop grand mais de toute façon pour tester c’est bien de se mettre en affichage responsive et voir dans tous les cas, vu que 3.3 est semi-responsive maintenant.
Et surtout comme demandé avec un plugin qui encore plus de mises à jour possibles : corrective et mêmes DEUX majeures (ça peut très bien arriver). Cela dit, c’est bien que ça marche comme ça, mais avoir absolument tout ça à la fois ça n’arrivera à peu près jamais. :)
-
php run two commands in backgorund one by one
30 mars 2022, par RednBlackI have a problem in php/linux, described below :


I have to execute a linux command through shell_exec and run two commands.


$command1 = "ffmpeg -y -nostdin -hide_banner -re -i file.mp4 -c:a copy -c:v copy -f mpegts udp://127.0.0.1:1235 >/dev/null 2>>error.log & echo $! > file.pid";

$command2 = "php /home/update.php file.mp4 &"

shell_exec("(".$command1.") && (".$command2.")");



But they both get executed in same time I tried with semi-colon ( ;) operator but same result.


What I want to achieve is run first command no mater, if finished or exit with error then run second command, but both put on background so php will not hang.


Thank you.