
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (42)
-
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 à (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (8630)
-
node.js - Error : ENOENT : no such file or directory, unlink
10 août 2020, par necrofaceI have the function below to convert a
.wav
file to.mp3
. As you can see, before using theffmpeg
module to convert the audio file, I already check if the file exists or not, then upon conversion, I only keep the new file and delete the old one. But occasionally the console throws me the errorError: ENOENT: no such file or directory, unlink
, which means that Iunlink
(delete) a non-existing file. I cannot understand why, because I already have an existence check even before the conversion, so it is supposed to have existed to be unlinked.


module.exports.convertAndMoveElastic = async (calllog) => {
 let { start, sip_uri, direction, source, destination } = calllog;
 const VNtimezoneOffset = 7 + new Date().getTimezoneOffset() / 60;
 const startTime = new Date(start + VNtimezoneOffset * 3600000 - 60000);
 const date = startTime.getDate() < 10 ? `0${startTime.getDate().toString()}` : startTime.getDate().toString();
 const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
 const month = months[startTime.getMonth()];
 const year = startTime.getFullYear().toString();
 sip_uri = sip_uri || (direction === 'outgoing' ? source : destination);
 const [extension, domain_name] = sip_uri.split("@");
 return new Promise(async (resolve, reject) => {
 const links = await getLinkWithElastic(calllog);
 if (!links) { return reject(); }
 let file_id, filepath;
 for (let link of links) {
 const { callid, sipCallid, uuid, record_path } = link._source;
 if (record_path) {
 let recordPathArr = record_path.split('/');
 file_id = recordPathArr[recordPathArr.length - 1].split('.')[0];
 filepath = path.resolve(base_directory, domain_name, 'archive', year, month, date, `${file_id}.wav`);
 }
 if (!file_id || !fs.existsSync(filepath)) {
 file_id = callid;
 filepath = path.resolve(base_directory, domain_name, 'archive', year, month, date, `${file_id}.wav`);
 }
 if (!file_id || !fs.existsSync(filepath)) {
 file_id = uuid;
 filepath = path.resolve(base_directory, domain_name, 'archive', year, month, date, `${file_id}.wav`);
 }
 if (fs.existsSync(filepath)) { break; }
 }
 if (!fs.existsSync(filepath)) { return reject(); }
 ffmpeg(filepath)
 .audioCodec('libmp3lame')
 .on('error', function (error) {
 reject(error);
 })
 .on('end', function () {
 resolve({ recordUrl: `${host}/record/download/${file_id}.mp3` });
 fs.unlinkSync(filepath);
 })
 .toFormat('mp3')
 .saveToFile(path.resolve(dest_directory, file_id + ".mp3"));
 });
};



-
"Error opening filters !" when using fluent-ffmpeg with Node
3 février 2015, par doremiI’m trying to get a basic example of html5 video streaming working in an express node app, but I keep running into ffmpeg errors that I’m unsure of how to resolve.
The input file/stream is the sample.mp4 located here.
Complete example :
var ffmpeg = require('fluent-ffmpeg');
var express = require('express');
var fs = require('fs');
var sampleApp = express();
var videoApp = express();
var SAMPLE_SERVER_PORT = 3000;
var VIDEO_SERVER_PORT = 5000;
sampleApp.get('/:video', function (req, res) {
var videoURL = 'http://localhost:' + VIDEO_SERVER_PORT + '/' + req.params.video;
return res.end('<video controls="controls" src=" + videoURL +"></video>');
});
videoApp.get('/:video', function(req, res) {
res.statusCode = 200;
res.setHeader('content-type','video/mp4');
var stream = fs.createReadStream('./samples/' + req.params.video);
var proc = ffmpeg(stream)
.format('mp4')
.size('320x?')
.videoBitrate('512k')
.videoCodec('libx264')
.fps(24)
.audioBitrate('96k')
.audioCodec('aac')
.audioFrequency(22050)
.audioChannels(2)
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
.pipe(res, { end:true });
});
var server = sampleApp.listen(SAMPLE_SERVER_PORT, function () {
console.log('Example app listening at http://%s:%s', server.address().address, SAMPLE_SERVER_PORT);
});
var videoServer = videoApp.listen(VIDEO_SERVER_PORT, function () {
console.log('Video Server listening at http://%s:%s', server.address().address, VIDEO_SERVER_PORT);
});The error (via console) :
an error happened: ffmpeg exited with code 1: Error opening filters!
ffmpeg configuration :
./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass \
--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-libfaac --enable-libfdk-aacAny input would be greatly appreciated.
-
NODE.JS using audioconcat , configured ffmpeg but still have prob
11 mai 2018, par Adnan KhanWant to concatenate two audio files. i used an npm package known as audioconcat but when i installed and configured the below code i am confronted with the following error
Error: Error: Cannot find ffmpeg
at E:\VoiceMan\registercheck\node_modules\fluent-ffmpeg\lib\processor.js:136:22
at E:\VoiceMan\registercheck\node_modules\fluent-ffmpeg\lib\capabilities.js:123:9
at E:\VoiceMan\registercheck\node_modules\async\dist\async.js:356:16
at nextTask (E:\VoiceMan\registercheck\node_modules\async\dist\async.js:5057:29)
at E:\VoiceMan\registercheck\node_modules\async\dist\async.js:5064:13
at apply (E:\VoiceMan\registercheck\node_modules\async\dist\async.js:21:25)
at E:\VoiceMan\registercheck\node_modules\async\dist\async.js:56:12
at E:\VoiceMan\registercheck\node_modules\async\dist\async.js:840:16
at E:\VoiceMan\registercheck\node_modules\fluent-ffmpeg\lib\capabilities.js:116:11
at E:\VoiceMan\registercheck\node_modules\fluent-ffmpeg\lib\utils.js:223:16
ffmpeg stderr: undefinedThen I put my problem on stackoverflow. A kind developer suggest me to install ffmpeg also. which i successfully installed and set there path variables but now i am having another issue which tells me that no such file are directry found..i placed my audio files in the same folder of this module.
here is the errorworking11
working1123423423423
ffmpeg process started: ffmpeg -i concat:audio/a(1).m4a|audio/a(2).m4a|audio/a(3).m4a -y -acodec copy all.m4a
Error: Error: ffmpeg exited with code 1: concat:audio/a(1).m4a|audio/a(2).m4a|audio/a(3).m4a: No such file or directory
at ChildProcess.<anonymous> (C:\Projects\audio\node_modules\fluent-ffmpeg\lib\processor.js:182:22)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
ffmpeg stderr: ffmpeg version N-90173-gfa0c9d69d3 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libas
s --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --ena
ble-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack -
-enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidst
ab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda
--enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 13.100 / 58. 13.100
libavformat 58. 10.100 / 58. 10.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
concat:audio/a(1).m4a|audio/a(2).m4a|audio/a(3).m4a: No such file or directory
</anonymous>here is my code :
var audioconcat = require('audioconcat')
var songs = [
'a(1).mp3',
'a(2).mp3',
'a(3).mp3'
]
console.log("working11")
audioconcat(songs)
.concat('all.mp3')
.on('start', function (command) {
console.log('ffmpeg process started:', command)
})
.on('error', function (err, stdout, stderr) {
console.error('Error:', err)
console.error('ffmpeg stderr:', stderr)
})
.on('end', function (output) {
console.error('Audio created in:', output)
})
console.log("working1123423423423")