
Recherche avancée
Autres articles (37)
-
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) (...)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Problèmes fréquents
10 mars 2010, parPHP et safe_mode activé
Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site
Sur d’autres sites (6171)
-
Shazaam-esque music comparison [closed]
17 janvier 2021, par Matthew TripI have two files, a
Full.mp4
and aCut.mp4
I do not care about the video. I want to check ifCut
appears inFull
at any point. I have tried comparing the streams and their byte arrays but Rider keeps showing memory issues without an explanation. What is the general approach I should take ?

-
node-fluent-ffmpeg conversion to mp3 does not fire any "end" or "finish" event
27 février 2024, par 1voyI am downloading a video using ytdl-core and converting it to mp3 using node-fluent-ffmpeg. It seems that the code after the ffmpeg conversion gets executed before the conversion finishes as trying to upload the .mp3 file to a Google Cloud Storage bucket throws an error. I am trying to detect 'end' or 'finish' events but none are being triggered.


Code :


ytdl(url?.toString() as string)
 .once('data', (data) => {
 console.log('start', data);
 })
 .on('progress', async function (progress, downloaded, total) {
 console.log(parseInt(((downloaded / total) * 100).toString()) + '%');
 
 })
 .on('finish', async function () {
 console.log('Download finished...');
 
 console.log('using ffmpeg to convert into mp3');
 Ffmpeg({ source: `/Users/user/project/server/output/${videoId}.mp4` })
 .setFfmpegPath(ffmpeg.path)
 .toFormat('mp3')
 .saveToFile(`/Users/user/project/server/output/${videoId}.mp3`)
 .on('finish', () => {
 console.log('finished conversion');
 });
 console.log('after ffmpeg mp3 conversion');

 const storage = new Storage({
 keyFilename: `./key.json`,
 });

 const bucketName = 'bucketname';
 const bucket = storage.bucket(bucketName);
 let mp3_url;
 console.log(
 fs.existsSync(`/Users/user/project/server/output/${videoId}.mp3`)
 ); // returns false
 bucket.upload(
 `/Users/user/project/server/output/${videoId}.mp3`,
// Error uploading: Error: ENOENT: no such file or directory, open '/Users/me/project/server/output/RMvenf7E-Dg.mp3'
 {
 destination: `${userId}/${videoId}.mp3`,
 },
 function (err, file) {
 if (err) {
 console.error(`Error uploading: ${err}`);
 } else {
 console.log(`mp3 uploaded to ${bucketName}.`);
 console.log(file?.publicUrl());
 }
 }
 );

 
 .pipe(
 fs.createWriteStream(`/Users/me/project/server/output/${videoId}.mp4`)
 );

 console.log('after download and conversion');

 req.on('close', async () => {
 res.end();
 });



Error uploading: Error: ENOENT: no such file or directory, open '/Users/polo/makeklips/server/output/RMvenf7E-Dg.mp3'
[1] /Users/me/project/server/node_modules/.pnpm/fluent-ffmpeg@2.1.2/node_modules/fluent-ffmpeg/lib/processor.js:182
[1] handleExit(new Error('ffmpeg exited with code ' + code));
[1] ^
[1] Error: ffmpeg exited with code 1: Output #0, mp3, to '/Users/me/project/server/output/RMvenf7E-Dg.mp3':
[1] Output file #0 does not contain any stream



-
Threads creating process in infinite loop
10 décembre 2013, par bhupinderIn my application a thread runs while(1){} in it so thread terminates when my app is terminated by user.
Is it safe to do like this ? I am using while(1){} because my app continuously monitors devices on system.
After some time I am getting "(R6016) not enough space for thread data" on ffmpeg.
I read this but did not get solution of my problem :
http://support.microsoft.com/kb/126709
Thread description :
Thread uses ffmpeg and handle utility (http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx). within while(1){} loop.ffmpeg and handle is running through QProcess which I am deleting after process ends.
while(1){} loop waits for 5 seconds using
msleep(5000).