Recherche avancée

Médias (1)

Mot : - Tags -/livre électronique

Autres articles (54)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

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

Sur d’autres sites (10428)

  • How to force usage of specific codec with ffmpeg ?

    4 septembre 2013, par Srv19

    I am trying to read a certain video file using ffmpeg, and have run into a bit of trouble.

    This is the code that starts to read it :

    int _tmain(int argc, _TCHAR* argv[])
    {
       if (argc < 2)
       {
           fprintf( stderr, "Filename is needed as an argument\n" );  
           return 1;  
       }
       /* register all formats and codecs */
       av_register_all();
       AVFormatContext* fmt_ctx = NULL;
       /* open input file, and allocate format context */
       const char *src_filename = argv[1];
       if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
           fprintf(stderr, "Could not open source file %s\n", src_filename);
           abort();
       }
       /* retrieve stream information */
       AVDictionary *      options;
       int res = avformat_find_stream_info(fmt_ctx, &options);
       if (res < 0) {
           fprintf(stderr, "Could not find stream information\n");
           abort();
       }
       ...
    }

    I am consistently getting the following message :

    [avi @ 005f2fe0] Could not find codec parameters for stream 0 (Video :
    none (GREY / 0x59455247), 1280x1024) : unknown codec

    Consider increasing the value for the 'analyzeduration' and 'probesize' options

    I get the same message when i run ffmpeg tool on the same file.

    However, i know what is in the video stream - raw video data with YUV8 format. In fact, when i pass that to ffmpeg via -c:v rawvideo option, there is no problem. Recoding, transforming etc - ffmpeg does it like the magic tool it is.

    Now, the question is : when using ffmpeg api, what is the equivalent of that option ? I desperately need access to the frames of file.

  • Merge commit 'd7320ca3ed10f0d35b3740fa03341161e74275ea'

    31 octobre 2017, par James Almer
    Merge commit 'd7320ca3ed10f0d35b3740fa03341161e74275ea'
    

    * commit 'd7320ca3ed10f0d35b3740fa03341161e74275ea' :
    arm : Avoid using .dn register aliases

    Merged-by : James Almer <jamrial@gmail.com>

    • [DH] configure
    • [DH] libavcodec/arm/vc1dsp_init_neon.c
    • [DH] libavcodec/arm/vc1dsp_neon.S
  • C++ ffmpeg sws_getCachedContext seg fault when reading opengl buffer

    3 juillet 2022, par user19068953

    I made a program that draws some stuff on opengl, then reads the frames on the screen as rgba and encodes it as a yuv420 video, but I get a segfault when I try to send the red opengl frame to sws_getCachedContext. I used the muxing.c as the encoder and my code is as follows (I used align 256 because i have another framebuffer that uses 128) :

    &#xA;

        constexpr int ALIGNMENT = 256;&#xA;    if (posix_memalign((void**)&amp;state.glBuffer, ALIGNMENT, gl_width * gl_height * 4) != 0) &#xA;    {&#xA;        VI_ERROR("Couldn&#x27;t allocate frame buffer ");&#xA;        return false;&#xA;    }&#xA;    REGISTER("done, returning");&#xA;    return true;&#xA;

    &#xA;

    Then i read the frame after drawing the stuff i want :

    &#xA;

            glReadPixels(0, 0,&#xA;                 gl_width, gl_height, &#xA;                 GL_RGBA, GL_UNSIGNED_BYTE, &#xA;                 (GLvoid*) state.glBuffer);&#xA;

    &#xA;

    The window is the same size as the gl_buffer (I know the result will be flipped, thats ok)

    &#xA;

    And finally i send it to the encoder(rgb_data is glBuffer) :

    &#xA;

    void video_encoder::set_frame_yuv_from_rgb(AVFrame *frame, struct SwsContext *sws_context) {&#xA;    const int in_linesize[1] = { 4 * width };&#xA;&#xA;width = gl_width;&#xA;height = gl_height;&#xA;sws_context = sws_getCachedContext(sws_context,&#xA;        width, height, AV_PIX_FMT_RGBA,&#xA;        width, height, AV_PIX_FMT_YUV420P,&#xA;        0, 0, 0, 0);&#xA;        &#xA;sws_scale(sws_context, (const uint8_t * const *)&amp;rgb_data, in_linesize, 0,&#xA;        height, frame->data, frame->linesize);&#xA;}&#xA;

    &#xA;

    I get a seg fault on sws_getCachedContext any idea why this happens and how do i fix it ?

    &#xA;

    Edit : width = 512, height = 256, valgrind says : Invalid read of size 16.

    &#xA;