Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (62)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (6133)

  • FFMpeg : how to blur two fixed regions at the bottom of the video file ?

    24 décembre 2022, par bully44

    I'm trying to blur to rectangular regions at the bottom of the video. Only short region around center should stay as it is, and 140 pixels regions on both sides should be blurred.
The left region is ok, but just cannot set correctly the right one. For visual reason, I'm displaying it higher, but I just cannot get x coordinate and size in correct position.

    


    ffmpeg -i Test1.mp4 -filter_complex  \
"[0:v]crop=iw/2-40:140:0:ih-140,avgblur=10[b0]; \
 [0:v]crop=iw/2-50:140:iw/2+200:ih-140,avgblur=5[b1]; \
 [0:v][b0]overlay=0:H-h[ovr0]; \
 [ovr0][b1]overlay=W/2+100:H-h-500" \
 -c:a copy -movflags +faststart Test_blur.mp4


    


    As FFMpeg newbie, I must be doing something obviously wrong.
Thanks in advance,
regards.

    


  • Create mp4 thumbnail in node.js

    21 mai 2015, par trdavidson

    new in node.js and aws framework so I apologize in advance. I am trying to configure the AWS DB of my app to automatically create thumbnails using AWS Lambda. This works great using the example provided by Amazon for regular .jpg images (walkthrough here : https://alestic.com/2014/11/aws-lambda-cli/).

    However to try and do the same operation for mp4 files seems exponentially more difficult. After some searching I found that it seems the way to do this is by using the ffmpeg module. The problem is that I do not at all understand the response object returned by aws, and thus am not sure how to manipulate it so that ffmpeg can use it.

    current code :

    // dependencies
    var async = require('async');
    var AWS = require('aws-sdk');
    var gm = require('gm')
               .subClass({ imageMagick: true }); // Enable ImageMagick integration.
    var util = require('util');
    var ffmpeg = require('ffmpeg');
    var stream = require('stream')

    // constants
    var MAX_WIDTH  = 250;
    var MAX_HEIGHT = 250;

    // get reference to S3 client
    var s3 = new AWS.S3();

    exports.handler = function(event, context) {
       // Read options from the event.
       console.log("Reading options from event:\n", util.inspect(event, {depth: 5}));
       var srcBucket = event.Records[0].s3.bucket.name;
       // Object key may have spaces or unicode non-ASCII characters.
       var srcKey    =
       decodeURIComponent(event.Records[0].s3.object.key.replace(/\+/g, " "));  
       var dstBucket = srcBucket + "small";
       var dstKey    = "small-" + srcKey;
    // Sanity check: validate that source and destination are different buckets.
    if (srcBucket == dstBucket) {
       console.error("Destination bucket must not match source bucket.");
       return;
    }

    // Infer the image type.
    var typeMatch = srcKey.match(/\.([^.]*)$/);
    if (!typeMatch) {
       console.error('unable to infer image type for key ' + srcKey);
       return;
    }
    var imageType = typeMatch[1];
    if (imageType != "mp4" && imageType != "avi") {
       console.log('skipping non-image ' + srcKey);
       return;
    }

    // Download the image from S3, transform, and upload to a different S3 bucket.
    async.waterfall([
       function download(next) {
           // Download the image from S3 into a buffer.

           s3.getObject({
                   Bucket: srcBucket,
                   Key: srcKey
               },
               next);
           },
       function tranform(response, next) {
           var instream = new stream.Readable();
           instream.push(response.Body)
           instream.push(null)

           var outstream = new stream();

           ffmpeg(instream)
           .screenshots({timestamps: 1, size: '200x200'})
           .output('screenshot.png')
           .output(outstream)
           .on('end', function(){
               console.log('screenshots finished processing son!')
           })

           gm(outstream, 'screenshot.png').size(function(err, size) {
               // Infer the scaling factor to avoid stretching the image unnaturally.
               var scalingFactor = Math.min(
                   MAX_WIDTH / size.width,
                   MAX_HEIGHT / size.height
               );
               var width  = scalingFactor * size.width;
               var height = scalingFactor * size.height;

               // Transform the image buffer in memory.
               this.resize(width, height)
                   .toBuffer(imageType, function(err, buffer) {
                       if (err) {
                           next(err);
                       } else {
                           next(null, response.ContentType, buffer);
                       }
                   });
           });
       },
       function upload(contentType, data, next) {
           // Stream the transformed image to a different S3 bucket.
           s3.putObject({
                   Bucket: dstBucket,
                   Key: dstKey,
                   Body: data,
                   ContentType: contentType
               },
               next);
           }
       ], function (err) {
           if (err) {
               console.error(
                   'Unable to resize ' + srcBucket + '/' + srcKey +
                   ' and upload to ' + dstBucket + '/' + dstKey +
                   ' due to an error: ' + err
               );
           } else {
               console.log(
                   'Successfully resized ' + srcBucket + '/' + srcKey +
                   ' and uploaded to ' + dstBucket + '/' + dstKey
               );
           }

           context.done();
       }
    );

    } ;

    Any suggestions are welcome ! Thanks

  • A late thanks to http://www.fugitives.ca/music/ for the homepage demo tunes

    6 mars 2011, par Scott Schiller

    m index.html A late thanks to http://www.fugitives.ca/music/ for the homepage demo tunes