Recherche avancée

Médias (91)

Autres articles (71)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • L’agrémenter visuellement

    10 avril 2011

    MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
    Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (5481)

  • 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

  • Revision 42b6791774 : Allow for re-encoding frame if high overshoot. For 1 pass CBR mode under screen

    7 juillet 2015, par Marco

    Changed Paths :
     Modify /vp9/encoder/vp9_encoder.c


     Modify /vp9/encoder/vp9_ratectrl.c


     Modify /vp9/encoder/vp9_ratectrl.h



    Allow for re-encoding frame if high overshoot.

    For 1 pass CBR mode under screen content mode :
    if pre-analysis (source temporal-sad) indicates significant
    change in content, then check the projected frame size after
    encode_frame(), and if size is above threshold, force re-encode
    of that frame at max QP.

    Change-Id : I91e66d9f3167aff2ffcc6f16f47f19f1c21dc688

  • ffmpeg rotate video according to sensor data

    6 septembre 2015, par oleg.semen

    I’m trying to scale videos down captured by the Android cellphones in order to reduce amount of data to be uploaded to the server. What I’m doing right now is :

    String.format("-i %s -vf \"scale='if(gt(a,1),-1,%d)':'if(gt(1,a),%d,-1)'\" -strict -2 %s", in, h, w, out);

    It scales down well. But users often hold their phoned in different orientation. When original video is played on a device it is rotated according to rotation saved in metadata. But after encoding video does not contain this information.

    How can I perform scaling that rotates video according to this data or at least to store this data in output file ?
    Thanks.