
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (112)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
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 (...)
Sur d’autres sites (12562)
-
FFMPEG node.js using with ytdl
25 juin 2024, par zlEloI have nodejs javascript code and I want that the video and the audio is downloaded, to combine it with ffmpeg. First, the video is longer that it should be, idk why. Second, the ffmpeg is not working because I'm getting an error, that ffmpeg can't find (but I installed fluent-ffmpeg via npm correctly)


My code :


const fs = require('fs');
const ytdl = require('ytdl-core');
const ffmpeg = require('fluent-ffmpeg');



// Function to download the youtube video
function download() {
 const linkInput = document.getElementById('linkInp');
 const resolution = document.getElementById('resolution');
 const videoTitle = document.getElementById('videoTitle');
 const videoAuthor = document.getElementById('videoAuthor');
 const videoUploadDate = document.getElementById('videoUploadDate');
 const videoPicture = document.getElementById('videoPic');
 const link = linkInput.value;
 console.log('Downloading following video from link: ', link, ' with resolution id: ', resolution.value);

 ytdl.getInfo(link).then((info) => {
 const format = ytdl.chooseFormat(info.formats, { quality: `${resolution.value}` });
 const videoFilePath = `${info.videoDetails.title}.${format.container}`;
 const audioFilePath = `${info.videoDetails.title}.mp3`;

 // before download, collect meta datas
 videoTitle.innerHTML = info.videoDetails.title;
 videoAuthor.innerHTML = info.videoDetails.author.name;
 videoUploadDate.innerHTML = info.videoDetails.uploadDate;
 videoPicture.src = info.videoDetails.thumbnails[0].url;

 // start downloading the video
 ytdl.downloadFromInfo(info, { format: format }).pipe(fs.createWriteStream(videoFilePath));

 // download audio separately
 ytdl.downloadFromInfo(info, { filter: 'audioonly' }).pipe(fs.createWriteStream(audioFilePath)).on('finish', () => {
 // merge video and audio after both are downloaded
 ffmpeg()
 .input(videoFilePath)
 .input(audioFilePath)
 .videoCodec('copy')
 .audioCodec('copy')
 .save(`${info.videoDetails.title}_with_audio.${format.container}`)
 .on('end', () => {
 console.log('Video with audio merged successfully!');
 fs.unlink(videoFilePath, (err) => {
 if (err) console.error(err);
 });
 fs.unlink(audioFilePath, (err) => {
 if (err) console.error(err);
 });
 });
 });

 }).catch((err) => {
 console.error(err);
 document.getElementById('msg').style.display = 'block';
 document.getElementById('message').innerHTML = err;
 });
}



Thanks for every help !


-
ERROR : "Cannot Find FFMPEG" on Google Cloud Compute Engine Debian Wheezy 7.8 Managed Instance even though it's installed
4 octobre 2015, par DynamoBoosterI wrote a Node.JS application that uses the
fluent-ffmpeg
module to watermark videos uploaded on the platform. I pushed the code to a my Google Cloud Compute Engine project, and every time I getError : Cannot Find FFMPEG
. I ssh’d into the instance once it was created and ran these commands to installFFMPEG
before actually testing out the code. I am not sure what is causing the error because after this I am positive thatFFMPEG
is installed.sudo apt-get update
sudo apt-get install -y ffmpeg
export FFMPEG_PATH="/usr/bin/ffmpeg"
export FFPROBE_PATH="/usr/bin/ffprobe"Below is my FFMPEG code
function generate_thumbnail(name, path){
logging.info("Generating Thumbnail");
ffmpeg(path)
.setFfmpegPath('/usr/bin/ffmpeg')
.setFfprobePath('/usr/bin/ffprobe')
.on('end', function() {
upload_thumbnail(name);
logging.info("Thumbnail Generated and uploaded");
return;
})
.on('error', function(err, stdout, stderr) {
logging.info('ERROR: ' + err.message);
logging.info('STDERR:' + stderr);
})
.on('start', function(commandLine) {
logging.info(commandLine);
})
.screenshots({
count: 1,
filename: name + '_thumbnail.png',
folder: 'public/images/thumbnails/'
});
} -
ERROR : "Cannot Find FFMPEG" on Google Cloud Compute Engine Debian Wheezy 7.8 Managed Instance even though it's installed
17 mai 2021, par DynamoBoosterI wrote a Node.JS application that uses the
fluent-ffmpeg
module to watermark videos uploaded on the platform. I pushed the code to a my Google Cloud Compute Engine project, and every time I getError : Cannot Find FFMPEG
. I ssh'd into the instance once it was created and ran these commands to installFFMPEG
before actually testing out the code. I am not sure what is causing the error because after this I am positive thatFFMPEG
is installed.


sudo apt-get update
sudo apt-get install -y ffmpeg
export FFMPEG_PATH="/usr/bin/ffmpeg"
export FFPROBE_PATH="/usr/bin/ffprobe"




Below is my FFMPEG code



function generate_thumbnail(name, path){
 logging.info("Generating Thumbnail");
 ffmpeg(path)
 .setFfmpegPath('/usr/bin/ffmpeg') 
 .setFfprobePath('/usr/bin/ffprobe')
 .on('end', function() {
 upload_thumbnail(name);
 logging.info("Thumbnail Generated and uploaded");
 return;
 })
 .on('error', function(err, stdout, stderr) {
 logging.info('ERROR: ' + err.message);
 logging.info('STDERR:' + stderr);
 })
 .on('start', function(commandLine) {
 logging.info(commandLine);
 })
 .screenshots({
 count: 1,
 filename: name + '_thumbnail.png',
 folder: 'public/images/thumbnails/'
 });
}