Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (103)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • 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 (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11857)

  • avformat_open_input fails only with a custom IO context

    19 janvier 2017, par Tim

    Running into an odd issue with avformat_open_input, it is failing with :

    Invalid data found when processing input

    But this only happens when I attempt to read the file using a custom AVIOContext.

    My custom code is as follows (error checking omitted for clarity) :

    auto fmtCtx = avformat_alloc_context();
    auto ioBufferSize = 32768;
    auto ioBuffer = (unsigned char *)av_malloc(ioBufferSize);
    auto ioCtx = avio_alloc_context(ioBuffer,
                                   ioBufferSize,
                                   0,
                                   reinterpret_cast<void>(this),
                                   &amp;imageIORead,
                                   NULL,
                                   &amp;imageIOSeek));

    fmtCtx -> pb = ioCtx;
    fmtCtx -> flags |= AVFMT_FLAG_CUSTOM_IO;

    int err = avformat_open_input(&amp;fmtCtx, NULL, NULL, NULL);
    </void>

    imageIOSeek is never called, but properly handles the whence parameter including the AVSEEK_SIZE option. My file data is already loaded in memory, so imageIORead is trivial (returning 0 at EOF) :

    int imageIORead(void *opaque, uint8_t *buf, int buf_size) {
       Image *d = (Image *)buf;
       int rc = std::min(buf_size, static_cast<int>(d->data.size() - d->pos));

       memcpy(buf, d->data.data() + d->pos, rc);
       d->pos += rc;
       return rc;
    }
    </int>

    The data being read is loaded from a file on disk :

    /tmp/25.jpeg

    The following code is able to open and extract the image correctly :

    auto fmtCtx = avformat_alloc_context();
    int err = avformat_open_input(&amp;fmtCtx, "/tmp/25.jpeg", NULL, NULL);

    The project is using a minified version of libavformat including only the formats we need. I don’t believe this is the cause of the problem since the file can be open and handled properly when the path is specified. I haven’t seen any configure options specifically targeting support for custom IO contexts.

    This is the image in question : 25.jpeg

  • avformat/mxfenc : allow more bits for variable part in uuid generation

    14 mars 2022, par Marton Balint
    avformat/mxfenc : allow more bits for variable part in uuid generation
    

    Also make sure we do not change the product UID.

    Signed-off-by : Marton Balint <cus@passwd.hu>

    • [DH] libavformat/mxfenc.c
    • [DH] tests/ref/fate/copy-trac4914
    • [DH] tests/ref/fate/mxf-d10-user-comments
    • [DH] tests/ref/fate/mxf-opatom-user-comments
    • [DH] tests/ref/fate/mxf-reel_name
    • [DH] tests/ref/fate/mxf-user-comments
    • [DH] tests/ref/fate/time_base
    • [DH] tests/ref/lavf/mxf
    • [DH] tests/ref/lavf/mxf_d10
    • [DH] tests/ref/lavf/mxf_dv25
    • [DH] tests/ref/lavf/mxf_dvcpro50
    • [DH] tests/ref/lavf/mxf_opatom
    • [DH] tests/ref/lavf/mxf_opatom_audio
  • Rails ActionController::Live - Sends everything at once instead of async

    28 janvier 2016, par Michael B

    I have an issue with rails ActionController::Live

    In the end I want to show the progress of FFMPEG to the user, but for now I want to get this minimal example running :

    Rails media_controller.rb :

    class MediaController &lt; ApplicationController
     include ActionController::Live

     def stream
       puts "stream function loaded"

         response.headers['Content-Type'] = 'text/event-stream'
         i = 0
         begin
           response.stream.write "data: 1\n\n"
           sleep 0.5
           i += 1
           puts "response... data: " + i.to_s
         end while i &lt; 10
       response.stream.close
     end
    end

    Javascript :

    source = new EventSource("/test/0");
    source.addEventListener("message", function(response) {
     // Do something with response.data
     console.log('I have received a response from the server: ' + response);
    }, false);

    When I navigate to the site, there are no JavaScript Errors showing. As soon as I navigate to the site, the "stream"-Action of the MediaController gets successfully called. I can verify this, by looking at the Server-Console. It gives me the following output. After every response line, there is a 500ms delay, like expected :

    stream function loaded
    response... data: 1
    response... data: 2
    response... data: 3
    response... data: 4
    response... data: 5
    response... data: 6
    response... data: 7
    response... data: 8
    response... data: 9
    response... data: 10
    Completed 200 OK in 5005ms (ActiveRecord: 0.8ms)

    On the JavaScript Side, it gives me the following Output :

    (10x) I have received a response from the server: [object MessageEvent]

    But the problem is here, that it sends all these 10 Messages from the server after 5 seconds at the same time ! The expected behavior however is, that it should send me 1 message every 0.5 seconds !

    So what am I doing wrong here ? Where is the error ?

    Screenshot Rails Console / JavaScript Console