Recherche avancée

Médias (91)

Autres articles (75)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

Sur d’autres sites (4453)

  • Problem opening xvid264 with avcodec_alloc_context(NULL)

    12 juillet 2024, par user3763774

    I want to multiplex audio and video together using the ffmpeg encoding library with xvid264rgb codec. I can open the codec when I create the context specifying that codec, but not if I use NULL for the argument with allocate context. My understanding is I need to use NULL so I can open the audio codec as well.

    


    In the example, the first open works with codec indicated in the allocate context. The second doesn't.

    


    #include &#xA;#include &#xA;#include &#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavutil></libavutil>opt.h>&#xA;#define WIDTH 400&#xA;#define HEIGHT 300&#xA;&#xA;const AVCodec *videocodec;&#xA;&#xA;bool init_video_encoder(AVCodecContext *c, int width, int height) {&#xA;    int ret;&#xA;    &#xA;    const AVRational tb_rat = {1, 30};&#xA;    const AVRational fr_rat = {30, 1};&#xA;&#xA;    fprintf(stderr, "init video encoder\n");&#xA;    // video&#xA;    //fprintf(stderr, "speed= %d \n", videocodec->speed);&#xA;    c->bit_rate = 400000;&#xA;    c->width = width;&#xA;    c->height = height;&#xA;    c->time_base = tb_rat;&#xA;    c->framerate = fr_rat;&#xA;    c->gop_size = 10;&#xA;    c->max_b_frames = 1;&#xA;    c->pix_fmt = AV_PIX_FMT_RGB24;&#xA;    if( videocodec->id == AV_CODEC_ID_H264 ) &#xA;        av_opt_set(c->priv_data, "preset", "slow", 0);&#xA;        &#xA;    ret = avcodec_open2(c, videocodec, NULL);&#xA;    if( ret &lt; 0 ) {&#xA;        fprintf(stderr, "failure to open codec: %s\n", av_err2str(ret));&#xA;        return false;&#xA;    }&#xA;    //avcodec_free_context(&amp;c);&#xA;    return true;&#xA;}&#xA;&#xA;int main(int argc, char **argv) {&#xA;&#xA;    AVCodecContext *context = NULL;&#xA;&#xA;    videocodec = avcodec_find_encoder_by_name("libx264rgb");&#xA;    if( videocodec == NULL ) {&#xA;        fprintf(stderr, "video encoder &#x27;libx264rgb&#x27; not found");&#xA;        exit;&#xA;    }&#xA;&#xA;    context = avcodec_alloc_context3(videocodec);&#xA;    if( context == NULL ) {&#xA;        fprintf(stderr, "could not allocate context with codec");&#xA;        return false;&#xA;    }&#xA;    if( init_video_encoder( context, WIDTH, HEIGHT ) ) &#xA;        fprintf(stderr, " success initializing video encoder case one\n");&#xA;    else&#xA;        fprintf(stderr, " failure to initialize video encoder case one\n");&#xA;    avcodec_close( context );&#xA;&#xA;    context = avcodec_alloc_context3(NULL);&#xA;    if( context == NULL ) {&#xA;        fprintf(stderr, "could not allocate context without codec");&#xA;        return false;&#xA;    }&#xA;    if( init_video_encoder( context, WIDTH, HEIGHT ) ) &#xA;        fprintf(stderr, " success initializing video encoder case two\n");&#xA;    else&#xA;        fprintf(stderr, " failure to initialize video encoder case two\n");&#xA;    avcodec_close( context );&#xA;}&#xA;

    &#xA;

    Here is the error message :

    &#xA;

    broken ffmpeg default settings detected&#xA;use an encoding preset (e.g. -vpre medium)&#xA;preset usage: -vpre <speed> -vpre <profile>&#xA;speed presets are listed in x264 --help&#xA;profile is optional; x264 defaults to high&#xA;failure to open codec: Generic error in an external library&#xA;failure to initialize video encoder case two&#xA;</profile></speed>

    &#xA;

    Is this the right approach to use ? How do I set the encoding preset ? The code appears already to do that.

    &#xA;

  • matroskadec : fix NULL pointer dereference

    16 octobre 2016, par Andreas Cadhalpun
    matroskadec : fix NULL pointer dereference
    

    The problem was introduced in commit 1273bc6.

    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>

    • [DH] libavformat/matroskadec.c
  • ffmpeg : Avoid null pointer dereferences

    2 avril 2015, par Himangi Saraogi
    ffmpeg : Avoid null pointer dereferences
    

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] ffmpeg.c