
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (7)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (2724)
-
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>