
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (42)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6857)
-
How to keep personally identifiable information safe
23 janvier 2020, par Joselyn Khor -
What is PII ? Your introduction to personally identifiable information
-
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).