
Recherche avancée
Autres articles (56)
-
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (5354)
-
Why does fluent-ffmpeg only work when it throws the error Output stream closed
29 mars 2024, par volume oneI am using fluent-ffmpeg to process a video file (and then upload that to Amazon S3). The code is very straightforward but it only works if :


- 

- pipe option
{end: true}
is set in.output()
- which has a side-effect that causes the following console log output








Processing : 19.261847354642416% done Processing :
32.365144874807335% done Processing : 48.80978326261429% done Processing : 78.35771917058617%
Processing : 91.49377493455148% done Processing :
99.91264359125745% done An error occurred : Output stream closed




Despite that error, it seems the file is generated correctly and it gets uploaded to Amazon S3 fine.


This is the fluent-ffmpeg code :


import {PassThrough} from 'node:stream';
import FFMpeg from 'fluent-ffmpeg';

let PassThroughStream = new PassThrough();

 FFMpeg('/testvideo.mp4')
 .videoCodec('libx264')
 .audioCodec('libmp3lame')
 .size(`640x480`)
 // Stream output requires manually specifying output formats
 .format('mp4')
 .outputOptions('-movflags dash')
 .on('progress', function (progress) {
 console.log('Processing: ' + progress.percent + '% done');
 })
 .on('error', function (err) {
 console.log('An error occurred: ' + err.message);
 })
 .on('end', function () {
 console.log('FFMpeg Processing finished!');
 })
 .output(PassThroughStream, {end: true})
 .run();

 // Now upload to S3
 try {
 await s3Upload({
 AWSS3Client: 'mys3client',
 Bucket: 'publicbucket,
 ACL: "public-read",
 ContentType: 'video/mp4',
 Key: 'whoever/whatever.mp4',
 Body: PassThroughStream
 });
 } catch (error) {
 console.log(`s3Upload error`, error)
 }



If I set the pipe
output()
option to{end: false}
then there is no error from fluent-ffmpeg and I get"Processing: 100% done FFMpeg Processing finished!"
as the final console log.

BUT the problem is that the
s3Upload()
does not do anything. There are no errors. Just no activity.

I feel very uncomfortable letting
fluent-ffmpeg
end in an error even if the code itself does the job intended. It will also cause testing to fail. What could be the issue ?

The command line code is :
ffmpeg -i https:/xxxbucket.s3.amazonaws.com/14555/file-example.mp4 -acodec libmp3lame -vcodec libx264 -filter:v scale=w=trunc(oh*a/2)*2:h=480 -f mp4 -movflags dash pipe:1


- pipe option
-
Failed to run the ffmpeg binary : The process "ffmpeg exceeded the timeout of 60 seconds
6 janvier 2024, par Sufian The GeekI am using FSPOSTER wordpress plugin to share videos on instagram as a reels and story. I have installed wordpress on amazon aws ec2 t2.micro. FsPoster required FFmpeg plugin to work with the videos.


Whenever I share the video, I get error after 60 seconds. There are some videos that are easily getting shared as a reel and story. I looked into the plugin code and changed every single timeout function value to 300 seconds including php.ini file. There are some libraries like symfony in the plugin, I also changed the timeout 60 sec to 300 seconds. Restarted the server and all but still getting the error.




Failed to run the ffmpeg binary : The process "'ffmpeg' -v error -y -i '/opt/bitnami/wordpress/wp-content/uploads/2024/01/videoWater-First-18.mp4' -vf 'crop=w=1280:h=720:x=0:y=0' -metadata:s:v rotate="" -f mp4 -c:v libx264 -preset fast -crf 24 -strict -2 -c:a aac -b:a 96k '/tmp/fs_65994ac0ddf8b.mp4'" exceeded the timeout of 60 seconds.




I am using bitnami wordpress on ec3 aws t2.micro that has 1 vcpu and 1 GB ram. I also switched to 2 vcpu and 8 gb ram but still this timeout issue.


-
Streaming without Content-Length in response
21 décembre 2023, par kainI'm using Node.js, Express (and connect), and fluent-ffmpeg.



We want to stream audio files that are stored on Amazon S3 through http.



We have all working, except that we would like to add a feature, the on-the-fly conversion of the stream through ffmpeg.



This is working well, the problem is that some browsers checks in advance before actually getting the file.



Incoming requests containing the Range header, for which we reply with a 206 with all the info from S3, have a fundamental problem : we need to know in advance the content-length of the file.



We don't know that since it is going through ffmpeg.



One solution might be to write out the resulting content-length directly on S3 when storing the file (in a special header), but this means we have to go through the pain of having queues to encode after upload just to know the size for future requests.
It also means that if we change compressor or preset we have to go through all this over again, so it is not a viable solution.



We also noticed big differencies in the way Chrome and Safari request the audio tag src, but this may be discussion for another topic.



Fact is that without a proper content-length header in response everything seems to break or browsers goes in an infinite loop or restart the stream at pleasure.



Ideas ?