
Advanced search
Other articles (55)
-
Le profil des utilisateurs
12 April 2011, byChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 November 2010, byAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 May 2011, byDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
On other websites (3931)
-
fftools/ffmpeg_mux: replace monotonous with monotonic
29 August 2023, by Leo Izen -
How to convert mp4 files into mp3 on button click using ffmpeg/php?
4 June 2019, by 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).
-
Faster way of getting number of key frames than "show_frames" in ffprobe?
19 November 2016, by Will TowerI’m making a little in-house utility using
ffmpg
andffprobe
. Works fine and does what is needed: give a count of the number of key frames in a video file plus some other details.Alas, with the large video files this will be used on it can take many seconds for
show_frames
to return – and I then have to parse the JSON dump of frame data and keep a running count of the total key frames.Is there a faster way? Perhaps it is listed in the "stream" or "format" data dumps and I am not recognizing what it is being called? I’ve been through the
ffmpg
andffprobe
docs and didn’t find anything else.