Recherche avancée

Médias (91)

Autres articles (110)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (13945)

  • ffmpeg chromakey filter : blend parameter does not what it should

    5 mai 2017, par Mat

    I want to remove greenscreen background and am not completely satisfied with what I have achieved because I still have green borders (especially on semi-transparent areas like hair, when I move my head).

    The documentation for the blend-parameter of chromakey filter says

    blend

    Blend percentage.

    0.0 makes pixels either fully transparent, or not transparent at all.

    Higher values result in semi-transparent pixels, with a higher transparency the more similar the pixels color is to the key color.

    So I reckoned, I could use this to minimise greenscreen bleeding (is this the term ?) when removing the background with a command like this :

    ffmpeg -i DSCN0015.MOV -vf "[in] hqdn3d=4:4:8:8 [dn]; [dn] scale=iw*3:-1 [sc]; [sc] chromakey=0x005d0b:0.125:0.0 [out]" -r 24 -an -c:v ffvhuff 4.mov

    But when I use anything else than 0.0 for blend, it seems to determine some kind of MINIMUM transparency and the entire frame is affected.

    Here are some pics to visualize : the first is the raw material from the camera. the 2nd shows what I get with blend=0.0 and the last one shows the problem : blend=0.5, but the whole frame is almost completely transparent.

    [Raw material as from camera]

    [blend=0.0]

    [blend=0.5]

  • Detecting Successful Conversion with ffmpeg

    22 février 2017, par J M

    I have code that scans a file system for videos files encoded with H.264 and re-encodes them with H.265. It runs pretty much on its own constantly, generating various log files for me to review periodically.

    One thing that I want to further improve is the successful conversion detection. Right now, a file returns as being successfully converted after it meets these criteria/checks :

    1. The output file exists
    2. ffprobe can detect that the output file is in hevc format
    3. The duration of the output file matches that of the input file (within 3 seconds)
    4. The length of the output file is greater than 30 MB (it’s rare that I have a video so short where after conversion it is less than this, usually this happens when an error occurs or conversion terminates early).

    Obviously, this is rather computationally intense as there are many file checks to confirm all of this information. I do this because if the file is detected as successful conversion, the old file is overwritten and the new converted file takes it’s place. I don’t want to overwrite a file because I overlooked a scenario where I think conversion is successful but was in fact not. The files are under a crashplan constant backup, so I don’t lose them, but I also do not go through and review every file.

    So, my basic question is if you see any area of improvement for this detection. My goal is to determine, to my best extent, if after conversion the video remains "playable". So deciding programmatically how/what that means is what I’m attempting to do.

    I can post code if you want it (powershell), but the question seems independent of actual program language choice.

  • AWS Lambda function for modify video

    4 février 2017, par Gold Fish

    I want to create a Lambda function that invoked whenever someone uploads to the S3 bucket. The purpose of the function is to take the uploaded file and if its a video file (mp4) so make a new file which is a preview of the last one (using ffmpeg). The Lambda function is written in nodejs.
    I took the code here for reference, but I do something wrong for I get an error saying that no input specified for SetStartTime :

    //dependecies
    var async = require('async');
    var AWS = require('aws-sdk');
    var util = require('util');
    var ffmpeg = require('fluent-ffmpeg');

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


    exports.handler = function(event, context, callback) {
       // 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;
       var dstKey    = "preview_" + srcKey;

       // Sanity check: validate that source and destination are different buckets.
       if (srcBucket == dstBucket) {
           callback("Source and destination buckets are the same.");
           return;
       }

       // Infer the video type.
       var typeMatch = srcKey.match(/\.([^.]*)$/);
       if (!typeMatch) {
           callback("Could not determine the video type.");
           return;
       }
       var videoType = typeMatch[1];
       if (videoType != "mp4") {
           callback('Unsupported video type: ${videoType}');
           return;
       }

       // Download the video from S3, transform, and upload to a different S3 bucket.
       async.waterfall([
           function download(next) {
               // Download the video from S3 into a buffer.
               s3.getObject({
                       Bucket: srcBucket,
                       Key: srcKey
                   },
                   next);
               },
           function transform(response, next) {
           console.log("response.Body:\n", response.Body);
           ffmpeg(response.Body)
               .setStartTime('00:00:03')
               .setDuration('10')   //.output('public/videos/test/test.mp4')
           .toBuffer(videoType, 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 modify ' + srcBucket + '/' + srcKey +
                       ' and upload to ' + dstBucket + '/' + dstKey +
                       ' due to an error: ' + err
                   );
               } else {
                   console.log(
                       'Successfully modify ' + srcBucket + '/' + srcKey +
                       ' and uploaded to ' + dstBucket + '/' + dstKey
                   );
               }

               callback(null, "message");
           }
       );
    };

    So what am I doing wrong ?