
Recherche avancée
Autres articles (44)
-
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (6175)
-
Add "prefer_tcp" flag to "rtsp_flags"
4 mars 2014, par Andrey Utkin -
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



-
doc/fftools-common-opts : document ffmpeg -h bsf=bitstream_filter_name
8 juin 2019, par Jun Zhao