
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (36)
-
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 (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7779)
-
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


-
Amazon S3 : how to combine all images into a video ?
9 septembre 2021, par scientifficI'm in my Rails app, I enable users to upload images, which get processed using ffmpeg to create a video slideshow.



I have this working locally, but am wondering how to do this when deploying the app using Heroku. In particular, I know Heroku has limited storage and has a read-only filesystem, so using Carrierwave without S3 or an external storage option doesn't seem like an option.



But how would I run a task like the following using S3, where I combine all images into a video ?



The ffmpeg command is



ffmpeg -r 5 -i https://s3.amazonaws.com/[]/uploads/image/image_file/26/img%03d.jpg output.mp4 -y




And the AWS "folder" contains the following :
https://s3.amazonaws.com/[]/uploads/image/image_file/26/img001.jpg
https://s3.amazonaws.com/[]/uploads/image/image_file/26/img002.jpg
https://s3.amazonaws.com/[]/uploads/image/image_file/26/img003.jpg



When I try to do the following, I get an error with ffmpeg not knowing what to do with :



https://s3.amazonaws.com/[]/uploads/image/image_file/26/img%03d.jpg




Note, this whole video compilation process works fine for me locally, so I know in theory it should work.