Recherche avancée

Médias (3)

Mot : - Tags -/collection

Autres articles (95)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (6399)

  • Use Java FFmpeg wrapper, or simply use Java runtime to execute FFmpeg ?

    8 décembre 2024, par Beier

    I'm pretty new to Java, and need to write a program that listens to video conversion instructions and convert the video once a new instruction arrives (instructions are stored in Amazon SQS, but it's irrelevant to my question).

    


    I'm facing a choice, either use Java runtime to exec FFmpeg conversion (like from command line), or I can use an FFmpeg wrapper written in Java.

    


    http://fmj-sf.net/ffmpeg-java/getting_started.php

    


    I'd much prefer using Java runtime to exec FFmpeg directly, and avoid using java-ffmpeg wrapper as I have to learn the library.

    


    So my question is this : Are there any benefits using java-ffmpeg wrapper over exec FFmpeg directly using Runtime ?

    


    I don't need FFmpeg to play videos, just convert videos.

    


  • 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 ?

  • Read H264 streaming from Elp H264 with OpenCV + Python

    3 février 2017, par Francesco Paissan

    I’m trying to read an udp streaming of a H264 encoded image. The software structure is like follows :

    On a BeagleBoneBlack (Ubuntu 16.04) I’ve an Elp H264 cam (see here : https://www.amazon.com/ELP-Support-Android-Windows-Surveillance/dp/B00VDSBH9G ). I stream frames with ffmpeg on a Unicast UDP Stream.

    I want to read this images from python and opencv to be able to process them.

    I tried with this simple code to see if the cap is opened or not :

    import cv2
    try:
        cap = cv2.VideoCapture("udp://localhost:1234/")
       cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('H', '2', '6', '4'));
    except Exception, e:
       print str(e)

    But when I run this script python says :

    DtsGetHWFeatures : Create File Failed DtsGetHWFeatures : Create File
    Failed Running DIL (3.22.0) Version DtsDeviceOpen : Opening HW in mode
    0 DtsDeviceOpen : Create File Failed libva info : VA-API version 0.38.1
    libva info : va_getDriverName() returns -1 libva error :
    va_getDriverName() failed with unknown libva error,driver_name=(null)
    libva info : VA-API version 0.38.1 libva info : va_getDriverName()
    returns -1 libva error : va_getDriverName() failed with unknown libva
    error,driver_name=(null) libva info : VA-API version 0.38.1 libva info :
    va_getDriverName() returns -1 libva error : va_getDriverName() failed
    with unknown libva error,driver_name=(null) libva info : VA-API version
    0.38.1 libva info : va_getDriverName() returns -1 libva error : va_getDriverName() failed with unknown libva error,driver_name=(null)
    GStreamer Plugin : Embedded video playback halted ; module vaapidecode
    reported : Could not initialize supporting library. OpenCV
    Error : Unspecified error (GStreamer : unable to start pipeline ) in
    cvCaptureFromCAM_GStreamer, file /builddir/build/BUILD/opencv-
    2.4.12.3/modules/highgui/src/cap_gstreamer.cpp, line 816 /builddir/build/BUILD/opencv-2.4.12.3/modules/highgui/src/cap_gstreamer.cpp:816 :
    error : (-2) GStreamer : unable to start pipeline in function
    cvCaptureFromCAM_GStreamer

    Can anybody help me ?

    Thanks,

    Francesco.