
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (52)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (8651)
-
Converting ffmpeg & ffprobe outputs to variables in an ffmpeg AWS Lambda Layer
7 mars 2019, par GracieI have two tasks I am trying to perform with the ffmpeg AWS Lambda layer.
1) Convert an audio file from stereo to mono (with ffmpeg)
2) Get the duration of the audio file and pass the result to a variable (with ffprobe)
const { spawnSync } = require("child_process");
const { readFileSync, writeFileSync, unlinkSync } = require("fs");
const util = require('util');
var fs = require('fs');
exports.handler = (event, context, callback) => {
// Windows 10 ffmpeg command to convert stereo to ffmpeg is
// ffmpeg -i volando.flac -ac 1 volando-mono.flac
// Convert from stereo to mono
spawnSync(
"/opt/bin/ffmpeg",
[
"-i",
`volando.flac`,
"-ac",
"1",
`/tmp/volando-mono.flac`
],
{ stdio: "inherit" }
);
//Pass result to a variable
//var duration = stdio;
//Read the content from the /tmp directory
fs.readdir("/tmp/", function (err, data) {
if (err) throw err;
console.log('Contents of tmp file: ', data);
});
// Get duration of Flac file
// Windows 10 ffmpeg command is
// ffprobe in.wav -show_entries stream=duration -select_streams a -of compact=p=0:nk=1 -v 0
spawnSync(
"/opt/bin/ffprobe",
[
`in.wav`,
"-show_entries",
"stream=duration",
"-select_streams",
"a",
"-of",
"compact=p=0:nk=1",
"-v",
"0"
],
{ stdio: "inherit" }
//Pass result to a variable
//var duration = stdio;
);
};Can anyone who has had success with this ffmpeg Lambda layer help get an output for these commands ?
Here are some resources regarding the FFmpeg Lambda layer :
https://serverless.com/blog/publish-aws-lambda-layers-serverless-framework/
https://github.com/serverlesspub/ffmpeg-aws-lambda-layer
https://devopstar.com/2019/01/28/serverless-watermark-using-aws-lambda-layers-ffmpeg/ -
How to generate video thumbnail in NodeJs ?
8 septembre 2020, par SchülerI am trying to generate video thumbnail but I am not getting an idea how to do that, I tried using fluent-ffmpeg & Video-thumbnail libraries but I don't know how to use them. Please, someone, help me
Note I cannot usersocket.io in my project



I have tried this



const ffmpeg = require('fluent-ffmpeg');
const ffmpeg_static = require('ffmpeg-static'); 
 ffmpeg(req.file.path)
 .screenshots({
 timestamps: [0.0],
 filename: 'xx.png',
 folder: upload_folder
 }).on('end', function() {
 console.log('done');
 });




getting this error



events.js:183
 throw er; // Unhandled 'error' event
 ^

Error: Cannot find ffmpeg



-
How can I get duration of a video in java program using ffmpeg ?
4 mars 2019, par J JainI want to get duration of video and save it to database. I am running a java program to convert video into mp4 format, after conversion I want to get the duration of video.
[How to extract duration time from ffmpeg output ?
I have gone threw this link, that command is running well in cmd, but it is giving ’exit code = 1’ with java program.
Here is code :-
String videoDuration = "" ;
List args1 = new ArrayList() ;args1.add("ffmpeg");
args1.add("-i");
args1.add(videoFilePath.getAbsolutePath());
args1.add("2>&1");
args1.add("|");
args1.add("grep");
args1.add("Duration");
args1.add("|");
// args.add("awk");
// args.add("'" + "{print $2}" + "'");
// args.add("|");
args1.add("tr");
args1.add("-d");
args1.add(",");
String argsString = String.join(" ", args1);
try
{
Process process1 = Runtime.getRuntime().exec(argsString);
logger.debug(strMethod + " Process started and in wait mode");
process1.waitFor();
logger.debug(strMethod + " Process completed wait mode");
// FIXME: Add a logger increment to get the progress to 100%.
int exitCode = process1.exitValue();
if (exitCode != 0)
{
throw new RuntimeException("FFmpeg exec failed - exit code:" + exitCode);
}
else
{
videoDuration = process1.getOutputStream().toString();
}
}
catch (IOException e)
{
e.printStackTrace();
new RuntimeException("Unable to start FFmpeg executable.");
}
catch (InterruptedException e)
{
e.printStackTrace();
new RuntimeException("FFmpeg run interrupted.");
}
catch (Exception ex)
{
ex.printStackTrace();
}
return videoDuration;Updated Code :-
List<string> args1 = new ArrayList<string>();
args1.add("ffprobe");
args1.add("-i");
args1.add(videoFilePath.getAbsolutePath());
args1.add("-show_entries");
args1.add("format=duration");
args1.add("-v");
args1.add("quiet");
args1.add("-of");
args1.add("csv=\"p=0\"");
args1.add("-sexagesimal");
String argsString = String.join(" ", args1);
try
{
Process process1 = Runtime.getRuntime().exec(argsString);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
</string></string>