
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 (75)
-
Le profil des utilisateurs
12 avril 2011, parChaque 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 (...) -
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (5050)
-
Uncaught Alchemy\BinaryDriver\Exception\ExecutableNotFoundException
27 août 2018, par JassI have linux shared hosting and Goddady is not installing ffmpeg extension on it so I have to keep binary library within my code so I am using https://github.com/PHP-FFMpeg/PHP-FFMpeg/ and following following steps.
- I cloned project on on my local > windows 10 > laragon
- I did composer install
Now I called their example like following
require 'vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries' => 'F:/laragon/www/PHP-FFMpeg/src/FFMpeg',
'ffprobe.binaries' => 'F:/laragon/www/PHP-FFMpeg/src/FFMpeg',
'timeout' => 3600, // The timeout for the underlying process
'ffmpeg.threads' => 12, // The number of threads that FFMpeg should use
));
$video = $ffmpeg->open('1535349237.mp4');
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(2));
$frame->save('image.jpg');But I am getting following error.
Fatal error : Uncaught
Alchemy\BinaryDriver\Exception\ExecutableNotFoundException : Executable
not found, proposed : F :/laragon/www/PHP-FFMpeg/src/FFMpeg in
F :\laragon\www\PHP-FFMpeg\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php:160
Stack trace : #0
F :\laragon\www\PHP-FFMpeg\src\FFMpeg\Driver\FFProbeDriver.php(48) :
Alchemy\BinaryDriver\AbstractBinary::load(Array, NULL,
Object(Alchemy\BinaryDriver\Configuration)) #1
F :\laragon\www\PHP-FFMpeg\src\FFMpeg\FFProbe.php(226) :
FFMpeg\Driver\FFProbeDriver::create(Object(Alchemy\BinaryDriver\Configuration),
NULL) #2 F :\laragon\www\PHP-FFMpeg\src\FFMpeg\FFMpeg.php(117) :
FFMpeg\FFProbe::create(Array, NULL,
Object(Doctrine\Common\Cache\ArrayCache)) #3
F :\laragon\www\PHP-FFMpeg\index.php(6) : FFMpeg\FFMpeg::create(Array)4 main Next FFMpeg\Exception\ExecutableNotFoundException : Unable to load FFProbe in
F :\laragon\www\PHP-FFMpeg\src\FFMpeg\Driver\FFProbeDriver.php:50 Stack
trace : #0 F :\laragon\www\PHP-FFMpeg\src\FFMpeg\FFProbe.php(226) :
FFMpeg\Driver\FFProbeD in
F :\laragon\www\PHP-FFMpeg\src\FFMpeg\Driver\FFProbeDriver.php on line
50I tried to figure it out searching on github and google but no success so any suggestions please what could be the solution in this case ?
-
How to trim silence from audio with ffmpeg in php
6 mars 2016, par user3080392My hosting does not have ffmpeg’s
silenceremove
filter, so I’m trying to remove the beginning and end silence of an audio file withsilencedetect
then cut. I’m trying to do this programmatically with php. At this point, I can’t even detect the silence. I’ve tried :define('UPLOAD_DIR', $_SERVER['DOCUMENT_ROOT'].'/audiofiles/');
$filein = UPLOAD_DIR . "music.ogg";
$fileout = UPLOAD_DIR . "music_no_silence.ogg";
$fileouttxt = UPLOAD_DIR . "music_log.txt";
$ffmpeg = "/usr/local/ffmpeg/bin/ffmpeg";I first tried to put the ffmpeg command into a variable and then tried to access the output but was unable :
$output = shell_exec("$ffmpeg -i $filein -af silencedetect=n=-50dB:d=1");
echo $output;I then tried to create a.txt log of the conversion but the .txt file doesn’t show anything about the silencedetect. Furthermore, how would I be able to extract the info that I need programmatically from the .txt log in order to use it in php ?
shell_exec("$ffmpeg -i $filein -af silencedetect=n=-50dB:d=1 $fileout 2> $fileouttxt");
I’m basically trying to adapt the answer at http://stackoverflow.com/a/25698675 into php
Edit : Here’s kind of a hack way to do it :
define('UPLOAD_DIR', $_SERVER['DOCUMENT_ROOT'].'/audiofiles/');
$filein = UPLOAD_DIR . "music.ogg";
$fileout1 = UPLOAD_DIR . "music_out1.ogg";
$fileout2 = UPLOAD_DIR . "music_out2.ogg";
$ffmpeg = "/usr/local/ffmpeg/bin/ffmpeg";
$command = "$ffmpeg -i $filein -filter_complex silencedetect=n=-10dB:d=0.5 -y $fileout1 2>&1";
$output = array();
exec($command,$output);
$searchword1 = 'silence_end';
$endmatches = array_filter($output, function($var) use ($searchword1) {return preg_match("/\b$searchword1\b/i", $var);});
$endmatches = array_values($endmatches);
$parts1 = explode(" ",$endmatches[0]);
$a = $parts1[4];
$a = $a-.5;
$searchword2 = 'silence_start';
$startmatches = array_filter($output, function($var) use ($searchword2) {return preg_match("/\b$searchword2\b/i", $var);});
$startmatches = array_values($startmatches);
$parts2 = explode(" ",end($startmatches));
$b = $parts2[4];
$b = $b+.5;
$c = $b-$a;
exec("$ffmpeg -i $fileout1 -ss $a -t $c -y $fileout2 && rm $fileout1"); -
Play audio files on a guild channel (Not working on Ubuntu Server)
18 octobre 2018, par danielperales555I want to make a "soundboard" on my Discord Bot.
The bot is currently running on Ubuntu Server 18.04 in a VPS Hosting.
I installed ffmpeg via aptitude
apt-get install ffmpeg
, and the respective node modules on my project via npm :npm install ffmpeg-binaries --save
andnpm install node-opus --save
I have this provisional code :
//Command syntax: !play (sound)
if (!args[0]) return message.channel.send('noCorrectSyntax'); //args is provided by module.run
let sound = args[0];
let isReady = true;
if (isReady) {
isReady = false;
let voiceChannel = message.member.voiceChannel;
if (!voiceChannel) return message.channel.send('noChannel');
voiceChannel.join().then(connection =>{
const dispatcher = connection.playFile(`../resources/audios/${sound}.mp3`);
if (!dispatcher) return message.channel.send('soundNotFound');
console.log(`Playing ${sound} on ${message.member.voiceChannel.name}`);
dispatcher.on("end", end => {
voiceChannel.leave();
console.log(`Finished`);
});
}).catch(err => console.log(err));
isReady = true;
} else {
return message.channel.send('botNotAvailable');
}When my bot joins the voice room, it leaves instantly without playing the sound.
Am I doing something wrong by installing the ffmpeg codec this way ? Is a problem with the VPS ?
(I tried with a new bot, installing ffmpeg on windows and setting the environment variable path and it worked fine)
EDIT :
I listened for the "error" and "debug" events on the StreamDispatcher (as specified in https://discord.js.org/#/docs/main/stable/class/StreamDispatcher?scrollTo=e-error), but I don’t receive errors or debug info.
When I listen for the "speaking" event, is showed on my console as
false