
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (103)
-
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 -
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 (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (8341)
-
Issue with video compression using HLS from laravel protonemedia/laravel-ffmpeg package
29 mars 2023, par Mateo KantociI'm using laravel-ffmpeg package in order to compress videos and save it as .m3u8.
In another words, I have a job that is gathering all uncompressed files and compress them 1by1 and save them to google cloud storage. Furthermore, compression is using exportForHLS from package and throws an error :


ProtoneMedia\LaravelFFMpeg\Exporters\HLSPlaylistGenerator::getStreamInfoLine(): Return value must be of type string, null returned in /var/www/html/ipaparazzo/vendor/pbmedia/laravel-ffmpeg/src/Exporters/HLSPlaylistGenerator.php:32



In some cases compression works but my job is failing for most of the time.


Anyone experienced similar issue ?


P.S. It is working as expected when using public storage.


This is my code exactly as per laravel-ffmpeg documentation :


->exportForHLS()
->setSegmentLength(10) // optional
->setKeyFrameInterval(48) // optional
->addFormat($lowBitrate, function($media) {
 $media->scale(426, 240);
})
->addFormat($midBitrate, function($media) {
 $media->scale(640, 360);
})
->addFormat($highBitrate, function($media) {
 $media->scale(640, 480);
})
->onProgress(function ($percentage) {
 echo "{$percentage}% transcoded\n";
})
->toDisk('gcs2')
->save($videoPath)
->cleanupTemporaryFiles();



-
Video compression ffmpeg node js in multiple user ?
12 octobre 2022, par jatin.rathodi have one query i am using ffmpeg packaege in node js to compress video in server side. but my question is when multiple user like 100k upload video in same time so it will work compression then upload part. currently have check 2 or 3 user it is working fine. Thanks Advance




const ffmpeg = require('fluent-ffmpeg');
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg');
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
const fs = require('fs');
// var filename = 'videos/big_buck_bunny_480p_10mb.mp4';

(function () {
 
 var ffmpeg = require('fluent-ffmpeg');
 function baseName(str) {
 var base = new String(str).substring(str.lastIndexOf('/') + 1); 
 if(base.lastIndexOf(".") != -1) {
 base = base.substring(0, base.lastIndexOf("."));
 } 
 return base;
 }

 var args = process.argv.slice(2);
 args.forEach(function (val, index, array) {
 var filename = val;
 var basename = baseName(filename);
 console.log(index + ': Input File ... ' + filename);
 
 ffmpeg(filename)
 // .output(basename + '-720x720_8.mp4')
 // .videoCodec('libx264')
 // //.noAudio()
 // // .aspect("1:1")
 // //.size('720x720')
 // .videoFilters('crop=540:960:540:960')
 // .videoFilters('crop=540:960')
 //.noAudio()
 //.aspect("1:1")
 //.aspectRatio("16:9")
 //.size('720x720')
 //.videoFilters('crop=720:720:580:1000')
 //.addOption('-vf scale=-2:720')
 //.videoFilters('crop=720:720:0:0.21')
 //.addOption('-vf setdar=1')
 //.videoFilters('crop=720:720:-540:960')
 //.preset('divx')

 .output(basename + '-720x720_22.mp4')
 .videoCodec('libx264')
 .addOption('-vf scale=720:-2') // landscap
 //.addOption('-vf scale=-2:720') // portrait

 //.addOption('-vf scale=480:480') // rectangle

 

 .on('error', function(err) {
 console.log('An error occurred: ' + err.message);
 
 }) 
 .on('progress', function(progress) { 
 console.log('... frames: ' + progress.frames);
 
 })
 .on('end', function() { 
 console.log('Finished processing'); 
 
 })
 .run();
 
 }); 
 
})();







-
ffmpeg module saving not working after compression
27 août 2022, par nickcoding2I'm just trying to save an mp4 to a different mp4 (before I even start playing around with the different compression settings). What exactly is going wrong here ?


const ffmpeg = require('ffmpeg');

try {
 var process = new ffmpeg('./original.mp4');
 process.then(function (video) {
 video
 .save('./new.mp4', function (error, file) {
 if (!error) {
 console.log('Video file: ' + file);
 } else {
 console.log(error)
 }
 });
 }, function (err) {
 console.log('Error: ' + err);
 });
} catch (e) {
 console.log(e.code);
 console.log(e.msg);
}



I get the following error :


Error: Command failed: ffmpeg -i ./original.mp4 ./new.mp4
/bin/sh: ffmpeg: command not found

 at ChildProcess.exithandler (child_process.js:390:12)
 at ChildProcess.emit (events.js:400:28)
 at maybeClose (internal/child_process.js:1055:16)
 at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
 killed: false,
 code: 127,
 signal: null,
 cmd: 'ffmpeg -i ./original.mp4 ./new.mp4'
}