
Recherche avancée
Autres articles (79)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
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" (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (10878)
-
Parsing the STDERR output of node.js child_process line by line
3 janvier 2012, par primerI'm writing a simple online conversion tool using FFMPEG and Node.js. I'm trying to figure out how to parse each line of the conversion output received from FFMPEG and only display pertinent results client side in the browser. In my case I want the encoding time counter that FFMPEG spits out on the command line.
My function thus far is :
function metric(ffmpeg, res) {
ffmpeg.stdout.on('data', function(data) {
res.writeHead(200, {'content-type': 'text/html'});
res.write('received upload:\n\n');
console.log(data);
});
ffmpeg.stderr.on('data', function (data) {
var temp += data.toString();
var lines = temp.split('\n');
//for debugging purposes
for(var i = 0;icode>What this ends up returning is multiple arrays, each of which includes the data from the previous array as well as the next data chunk. For example, the function returns array 1 :0=>A, 1=>B, array 2 :0=>A, 1=>B, 2=>C, array 3 :0=>A, 1=>B, 2=>C, 3=>D, and so on.
I'm quite new to Node so I'm probably missing something simple. Any guidance would be much appreciated !
-
Why reading line by line and feeding ffmpeg removes leading character gradually ? [closed]
27 juillet 2021, par Ibn FulanAs I was answering this question, I tried two ways to read my script to read timestamps line by line.


#! /bin/bash
x="00:00:00"
z=0
filename=$(basename -- "$2")
ext="${filename##*.}"
while read y
do
echo $x
ffmpeg -hide_banner -loglevel error -i $2 -ss $x -to $y -c copy $filename$z.$ext
let "z=z+1"
x=$y 
done < $1




And


#! /bin/bash
x="00:00:00"
z=0
filename=$(basename -- "$2")
ext="${filename##*.}"
while IFS=, read -r y
do
echo $x
ffmpeg -hide_banner -loglevel error -i $2 -ss $x -to $y -c copy $filename$z.$ext
let "z=z+1"
x=$y 
done < $1




From this file


00:02:30
00:04:40
00:07:00
00:09:00 
00:10:00



In both they gradually start omitting first letter and then again start reading them


00:00:00
00:02:30
0:04:40
0:07:00
:09:00 
00:10:00



What's the proper way to read the file ?


-
Changelog : add missing empty line after the version line
16 février 2013, par Stefano SabatiniChangelog : add missing empty line after the version line