Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (85)

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

  • 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" ;

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (10783)

  • cinedec : report white balance gain coefficients using metadata

    9 novembre 2014, par Peter Ross
    cinedec : report white balance gain coefficients using metadata
    

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

    • [DH] libavformat/cinedec.c
  • FFMPEG convert Black&White AVI into h264 that works inside a HTML5 Video tag

    7 mai 2014, par Eager to Learn

    I would like to convert an existing black and white AVI into h264 that works inside an Html5 video tag.

    I’m currently using this ffmpeg command :
    Ffmpeg -i 0 -y -c:v libx264 1

    where 0 is the avi file and 1 is the output h264 file.

    This command does not work for me, it does produce the h264 but it does not play anywhere else than inside a VCL player (go figure).

    Anybody out there, please please help !!!

  • FFMPEG : Displaying a white screen using ffplay via a custom decoder

    11 décembre 2013, par Zax

    I have created a dummy decoder, Here in its decode function, i would be assigning the output file pointer with a YUV420 data filled with 255 (i.e. a white screen).

    I also have a corresponding probe function for my dummy decoder, where it takes an dummy input file and based on some checking i return AVPROBE_SCORE_MAX. This probe section works perfectly fine and invokes my custom dummy decoder.

    The AVCodec structure of for my dummy decoder is as shown below :

    AVCodec ff_dummyDec_decoder = {
       .name           = "dummyDec",
       .type           = AVMEDIA_TYPE_VIDEO,
       .id             = AV_CODEC_ID_MYDEC,
       .priv_data_size = sizeof(MYDECContext),
       .pix_fmts       = (const enum AVPixelFormat[]) {AV_PIX_FMT_YUV420P},
       .init           = dummyDec_decode_init,
       .close          = dummyDec_decode_close,
       .decode         = dummyDec_decode_frame,
    };

    Where,

    .init -> is a pointer to a function that performs my decoder related initializations
    .close -> is a pointer to a function that frees all memory that was allocated during initialization
    .decode -> is pointer to a function that decodes a frame.

    The definitions for the above functions is shown below :

    #include
    #include
    #include "avcodec.h"

    unsigned char *yPtr=NULL;
    unsigned char *uPtr=NULL;
    unsigned char *vPtr=NULL;

    int memFlag=0;//If memFlag is zero then allocate memory for YUV data

    int width=416;//Picture width and height that i want to display in ffplay
    int height=240;

    static int dummyDec_decode_frame(AVCodecContext *avctx, void *data,
                                int *got_frame_ptr, AVPacket *avpkt)
    {
       AVFrame *frame=data; //make frame point to the pointer on which output should be mapped
       printf("\nDecode function entered\n");
       frame->width=width;
       frame->height=height;
       frame->format=AV_PIX_FMT_YUV420P;

       //initialize frame->linesize[] array
       avpicture_fill((AVPicture*)frame, NULL, frame->format,frame->width,frame->height);

       frame->data[0]=yPtr;
       frame->data[1]=uPtr;
       frame->data[2]=vPtr;

       *got_frame_ptr = 1;

       printf("\nGotFramePtr set to 1\n");

       return width*height+(width/2)*(height/2)+(width/2)*(height/2);//returning the amount of bytes being used
    }

    static int dummyDec_decode_init(AVCodecContext *avctx)
    {
       printf("\nDummy Decoders init entered\n");

       //Allocate memory for YUV data
       yPtr=(unsigned char*)malloc(sizeof(unsigned char*)*width*height);
       uPtr=(unsigned char*)malloc(sizeof(unsigned char*)*width/2*height/2);
       vPtr=(unsigned char*)malloc(sizeof(unsigned char*)*width/2*height/2);

       if(yPtr == NULL || uPtr ==NULL ||vPtr==NULL)
           exit(0);

       //set allocated memory with 255 i.e white color
      memset(yPtr,255,width*height);
      memset(uPtr,255,width/2*height/2);
      memset(vPtr,255,width/2*height/2);
    }

    static int dummyDec_decode_close(AVCodecContext *avctx)
    {
       free(yPtr);
       free(uPtr);
       free(vPtr);
    }

    From the dummyDec_decode_frame() function, i'm returning the number of bytes that are being used to display the white colour. Is this right ? Secondly, I have no parser for my decoder, because i'm just mapping a yuv buffer containing white data to AVFrame structure pointer.

    The command that i use for executing is :

    ./ffplay -vcodec dummyDec -i input.bin

    The output is an infinite loop with the following messages :

    dummyDec probe entered

    Dummy Decoders init entered

    Decode function entered

    GotFramePtr set to 1

    Decode function entered

    GotFramePtr set to 1

    Decode function entered

    GotFramePtr set to 1

    .

    .

    .(the last two messages keep repeating)

    Where is it i'm going wrong ? is it the absence of parser or something else ? I'm unable to proceed because of this. Please provide your valuable answers. Thanks in advance.

    —Regards