
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (64)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (7628)
-
Fluent-FFmpeg Blocks any server activity
3 mars 2013, par user2009114I'm having an issue where fluent-ffmpeg will actually make the server hang until it has transcoded a video. I have a script checking if any files need transcoding with Meteor.js server and then calling a fluent-ffmpeg process if needed for those videos. However, when I do this, the server actually can't do anything until fluent-ffmpeg is down transcoding the videos. It just hangs. Is there a way I can get around this ? Can I spawn another thread with node.js for this ? Or maybe there is a setting in fluent ffmpeg that will allow a workaround ?
Here is my code :
var x = 0;
var transcodeAll = function(files){
console.log("X", x);
dead_transcode(files[x],function(){
x++;
console.log("In callback");
if(x/ Remove ".." etc
var rootfile = path.join(rootPath, file);
var output = file.substr(0, file.lastIndexOf('.')) || file;
newfile = path.join(rootPath, "/transcoded"+output +".mp4");
console.log(rootfile);
console.log(newfile);
lock=true;
var proc = new ffmpeg({ source: rootfile, priority: 10 })
.toFormat('mp4')
//.withVideoBitrate('1500k')
.withVideoCodec('libx264')
//.withSize('720x?')
//.withAudioBitrate('128k')
.withAudioCodec('libfaac')
.saveToFile(newfile, function(stdout, stderr) {
console.log('file has been converted succesfully');
lock = false;
console.log(stdout);
console.log(stderr);
callback();
});
} -
FFMpeg + Beanstalk : How to pass the processes to it
14 juillet 2012, par Ilia RostovtsevI'm working around on the video web site ! I have a simple PHP function that is used to start complicated conversion processes. The problem is that FFMpeg and Mencoder are extremely resourceful and having one process of it is something that makes httpd slow down but multiple processes just hang it completely. I want to my conversion processes with Beanstalk (or anything else). Everything is working well right now : converting, logging and etc.
My concrete question is : How to transfer my current jobs to Beanstalk ?
I have very simple PHP code :
RunInBackground('convert.php', array($initial_file_name, $vid), $LogFilePath);
And the function looks also quite clear :
function RunInBackground($sPHPFile, $aParam = array(), $sLogFile = '')
{
global $config;
$sCmd = $config['phppath'] . ' ' . $config['BASE_DIR'] . '/' . $sPHPFile;
foreach ($aParam as $s)
{
$sCmd .= ' ' . $s;
}
$sCmd .= ' > ' . ($sLogFile != '' ? $config['BASE_DIR'] . '/' . $sLogFile : '/dev/null');
if ( iBgProc($sCmd) )
{
return true;
}
else
{
return false;
}
}
function iBgProc($sCmd, $iPrio = 0)
{
if ($iPrio)
{
$iPID = shell_exec("nohup nice -n $iPrio $sCmd 2> /dev/null & echo $!");
}
else
{
$iPID = shell_exec("nohup $sCmd 2> /dev/null & echo $!");
}
return($iPID);
}Now what would Beanstalk correct code would look like so these processes would NOT start all at the same time if multiple videos are uploaded ?
If you believe that for my needs is better to use something else but Beanstalk and you know how to implement it, I would be still happy to see it !
Thanks !
-
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