
Recherche avancée
Autres articles (88)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
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 (...)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.
Sur d’autres sites (5938)
-
Unhandled stream error in pipe : write EPIPE in Node.js
28 novembre 2013, par Michael RomanenkoThe idea is to serve screenshots of RTSP video stream with Express.js server. There is a continuously running spawned openRTSP process in flowing mode (it's stdout is consumed by another ffmpeg process) :
function spawnProcesses (camera) {
var openRTSP = spawn('openRTSP', ['-c', '-v', '-t', camera.rtsp_url]),
encoder = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vcodec', 'libvpx', '-r', 10, '-f', 'webm', 'pipe:1']);
openRTSP.stdout.pipe(encoder.stdin);
openRTSP.on('close', function (code) {
if (code !== 0) {
console.log('Encoder process exited with code ' + code);
}
});
encoder.on('close', function (code) {
if (code !== 0) {
console.log('Encoder process exited with code ' + code);
}
});
return { rtsp: openRTSP, encoder: encoder };
}
...
camera.proc = spawnProcesses(camera);There is an Express server with single route :
app.get('/cameras/:id.jpg', function(req, res){
var camera = _.find(cameras, {id: parseInt(req.params.id, 10)});
if (camera) {
res.set({'Content-Type': 'image/jpeg'});
var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
ffmpeg.stdout.pipe(res);
} else {
res.status(404).send('Not found');
}
});
app.listen(3333);When i request
http://localhost:3333/cameras/1.jpg
i get desired image, but from time to time app breaks with error :stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: write EPIPE
at errnoException (net.js:901:11)
at Object.afterWrite (net.js:718:19)Strange thing is that sometimes it successfully streams image to
res
stream and closes child process without any error, but, sometimes, streams image and falls down.I tried to create
on('error', ...)
event handlers on every possible stream, tried to changepipe(...)
calls toon('data',...)
constructions, but could not succeed.My environment : node v0.10.22, OSX Mavericks 10.9.
UPDATE :
I wrapped
spawn('ffmpeg',...
block with try-catch :app.get('/cameras/:id.jpg', function(req, res){
....
try {
var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
ffmpeg.stdout.pipe(res);
} catch (e) {
console.log("Gotcha!", e);
}
....
});... and this error disappeared, but log is silent, it doesn't catch any errors. What's wrong ?
-
How to capture a log message coming out of node JS spawn ffmpeg command
17 janvier 2014, par keenanI am trying to find the silent parts of an audio recording. This command does exactly what I want on my local machine.
ffmpeg -i http://twf-audio.s3.amazonaws.com/uploads/DBC50460-9A5C-4174-9885-07337A582D58_1377839443598_tell.m4a -af silencedetect=n=-40dB:d=0.2 -f null -
It sends a bunch of messages to the command line including these last three which are the lines of data that I need. (for reference : ffmpeg silencedetect docs)
[silencedetect @ 0x7feea040cf20] silence_start : 0.0321995
[silencedetect @ 0x7feea040cf20] silence_end : 0.975238 | silence_duration : 0.943039
[silencedetect @ 0x7feea040cf20] silence_start : 1.47184
I cannot figure out how to get that message out. Here is the nodejs code that is running. The only event that is triggered is the 'exit'. I thought that "pipe:1" sends output to stdout but that does not do anything.
var ffmpeg = spawn('ffmpeg', ['-i',filename,'-af','silencedetect=n=-40dB:d=0.2', '-f', 'null','-y', 'pipe:1' ]);
ffmpeg.on('message', function(data) {
console.log('ffmpeg2 PARENT got message:', JSON.stringify(data));
});
ffmpeg.stdout.on('data', function(data) {
console.log('ffmpeg stdout data = '+JSON.stringify(data) );
});
ffmpeg.on('exit', function (code, signal) {
console.log('child process exited with code:' + code + ' signal:' + signal);
}); -
error in ffmpeg when sending image from pipe via php
12 décembre 2013, par Abdul Aliused the following tutorial to send an uploaded image to ffmpeg from php via pipe.
however it raises an eror saying that the pipe has invalid data in it.
pipe:: Invalid data found when processing input
following is the php code for uploading an image file
$tempPath = $_FILES['vdofile']['tmp_name'];
print_r($tempPath);
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("file", "error-output.txt", "a") // stderr is a file to write to
);
$img = imagecreatefromjpeg($tempPath);
$proc = proc_open("ffmpeg image2pipe -i - -y image.jpg", $descriptorspec, $pipes);
if (is_resource($proc)) {
/*
* $pipes[0] = write something to command being run
* $pipes[1] = read something from command
* $pipes[2] = error from command
*/
fwrite($pipes[0], $_FILES['vdofile']['tmp_name']);
fclose($pipes[0]);
}
proc_close($proc);
?>and simple html uploading code is as follows :
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" />
<input type="submit" value="Upload" />
</form>the error file generated is as follows :
ffmpeg version N-58485-ga12b4bd Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 26 2013 22:07:02 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 55.100 / 52. 55.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.102 / 55. 21.102
libavdevice 55. 5.101 / 55. 5.101
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
pipe:: Invalid data found when processing inputany assistance will be appreciated.
**
EDIT
**
the code still produces an error :
ffmpeg version N-58485-ga12b4bd Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 26 2013 22:07:02 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 55.100 / 52. 55.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.102 / 55. 21.102
libavdevice 55. 5.101 / 55. 5.101
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
[image2pipe @ 00000000029ee0a0] Could not find codec parameters for stream 0 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
pipe:: could not find codec parametersthe following ffmpeg comand is called from within php like above :
ffmpeg -f image2pipe -i - -vcodec mjpeg -vframes 1 -an -f mjpeg image.mp4