
Recherche avancée
Autres articles (33)
-
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. -
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 -
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 (...)
Sur d’autres sites (8444)
-
How do I install ffmpeg on one EC2 Amazon Linux instance that can stream a mp4 ? [closed]
12 septembre 2020, par starpebbleGood day. How can I install ffmpeg on an EC2 amazon linux machine that can stream a mp4 ?


The goal : an ffmpeg install on EC2 Amazon Linux that can stream one mp4 to one rtmps endpoint. Then, create an integration test suite with it.


Is it just me or is ffmpeg a little crippled on EC2 Amazon Linux ?


Example :


ffmpeg -re -i input.mp4 -c:v libx264 -b:v 6000K -maxrate 6000K -pix_fmt yuv420p -s 1920x1080 -profile:v main -preset veryfast -g 120 -x264opts "nal-hrd=cbr:no-scenecut” -acodec aac -ab 160k -ar 44100 -f flv rtmps:///app/



Linux OS :


Linux version 4.14.193-113.317.amzn1.x86_64 (mockbuild@koji-pdx-corp-builder-60005) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Thu Sep 3 19:08:08 UTC 2020



The stackoverflow answer to similar questions fail to install a ffmpeg that can stream.


An installation script such as Install FFMPEG Library on EC2 Server fail this year.


The static downloads referenced on John Van Sickle-FFmpeg Static Builds fail to stream to IVS. I tried the i686 release, my first guess for an x86_64 instance.


The git source tree compiled binary fails to stream. Example : The tip of the tree isn't what I expected because the binary fails to recognize switches like
-preset
.

I'd love to be able to explain streaming to anyone. Thanks.


-
fluent-ffmpeg sometimes crashes entire amazon ec2 instance
24 octobre 2020, par Mick MarsdenI have a nodejs application where I'm using fluent-ffmpeg to convert captured video files via the html
<input file="file" />
tag to mp4 format. I'm also using ffmpeg-static to provide static binaries for fluent-ffmpeg's file path. But in order for the conversion to happen, I upload the captured video file via multer, and when that completes, multer passes the video url to fluent-ffmpeg. The code looks like this :

app.post("/upload-and-convert", async function(req, res) {

 var filepath;
 var path;

 try {

 const upload = util.promisify(uploadVideo());

 await upload(req, res);

 console.log(req.file);
 console.log("Success");
 filepath = req.file.filename;
 console.log(filepath);
 path = './public/uploads/' + filepath;
 console.log(path);

 } catch (e) {
 let response_json = {
 success: false,
 };
 res.setHeader("content-type", "application/json");
 res.send(response_json);
 }

 if(path != undefined)
 {

 console.log("Path not undefined, going to start FFMPEG");
 ffmpeg(path)
 .format('mp4')
 .size('720x720').autopad()
 .on('end', function() {
 console.log('file has been converted successfully');
 })
 .on('error', function(err) {
 console.log('an error happened: ' + err.message);
 let response_json = {
 success: false,
 };
 res.setHeader("content-type", "application/json");
 res.send(response_json);
 })
 .save('./public/uploads/video.mp4')
 .on('end', function() {
 console.log('file has been saved successfully');
 let response_json = {
 success: true,
 fileURL: 'https://websiteurl/uploads/video.mp4'
 };
 res.setHeader("content-type", "application/json");
 res.send(response_json);
 })

 } else
 {
 let response_json = {
 success: false,
 };
 res.setHeader("content-type", "application/json");
 res.send(response_json);
 }
});



Most times, the code runs fine and returns the fileURL as intended. Sometimes however, it completely crashes the amazon ec2 instance, and requires the instance be rebooted before it works again. I've checked the logs, and the server-error logs output no issues. The server-out logs when it crashes outputs the final console log before ffmpeg starts :


console.log("Path not undefined, going to start FFMPEG");



The moment it reaches the
ffmpeg(path)
, it goes down. It doesn't log any error, even though I have included error handling on the operation.

This has stumped me for days. I cannot figure out the commonality to explain why sometimes it crashes, and sometimes it does not. Note that this even happened before I started using the ffmpeg-static package. My node version is 12.19.0, and ffmpeg-static currently installs ffmpeg at version 4.3.1 if I recall correctly.


If anyone could help that would be great.


-
Extract thumbnail from video in amazon s3 and store it in amazon s3 [closed]
24 juin 2021, par Kanav RainaI want to extract thumbnail from video and store it on s3.


import ffmpeg

url="https://link_to_s3_video.mp4"

(
 ffmpeg
 .input(url, ss='00:00:03') 
 .output("frame.png", pix_fmt='rgb24', frames='1') 
 .overwrite_output()
 .run()
)



I am able to extract image but now how should I pass this image to file_upload function and store it on s3


def file_upload(file, filename):
 link = f"https://{PUBLIC_BUCKET_NAME}.s3.us-east-2.amazonaws.com/images/{filename}"
 try:
 s3.Object(PUBLIC_BUCKET_NAME, f"images/{filename}").load()
 except ClientError as e:
 if e.response['Error']['Code'] == "404":
 try:
 s3_client.upload_fileobj(
 file,
 PUBLIC_BUCKET_NAME,
 f"images/{filename}",
 ExtraArgs={'ACL': 'public-read'}
 )

 return 200, link
 except ClientError as e:
 logging.error(e)
 return 500, ""
 else:
 return 500, ""
 else:
 return 409, link



Thanks