Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (64)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

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

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (6671)

  • Building Ffmpeg library for iOS6.0 ARMv7 Processor success but compile error

    5 avril 2013, par user1800270

    I'm trying to use the FFMPEG library in an XCode 4.5.1 project.
    And I'm trying to build it for ARMv7.

    I had already build library by use the method below (provide by Alex) :


    Here is my working Configure for cross-compiling FFmpeg on iOS 6 the arch is ARMv7

    NOTE : You must have to have gas-preprocessor.pl inside /usr/local/bin/ please do not continue until you have gas-preprocessor.pl on your bin directory

    Download FFmpeg 1.0 "Angel" from here

    Unzip it and place it somewhere i.e. your Desktop folder

    Open terminal and browse to unzipped FFmpeg folder

    Copy and paste the following command, (be patient will take a while)

    ./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' --enable-pic --enable-decoder=rawvideo --disable-asm

    Now type the following command on terminal make (wait a little more)

    Once it has finished now type on terminal sudo make install (wait again)

    Go to /usr/local/lib to find your freshly baked armv7 libs

    Enjoy !

    Alex


    But when i put the library into iFrameExtractor then compile it, then i get an error

    /ffmpeg/libavcodec/4xm.d:1 : syntax error near "xm"

    my Compilation environment is

    xcode 4.5.1 and ffmpeg 1.0

    platform : Mac OS X 10.7.5

    can anyone help me ??

  • ffmpeg conversion command to output to h.264 for iPad

    23 juin 2016, par janet-PCF

    I’m looking for a good (general) conversion command that will convert any input file to h.264 sized for the iPad.

    Currently I have this command that works, that was adapted from robert.swain

    With presets :

    $ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
            -vpre slow -vpre ipod640 -b 1200kb -threads 0 -f mp4 OUTPUT.mp4

    Long form, no presets :

    $ ffmpeg -i INPUT -acodec aac -ab 160000 -s 1024x768 -vcodec libx264 \
            -coder 1 -flags +loop -cmp +chroma \
            -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh \
            -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 \
            -i_qfactor 0.71 -b_strategy 2 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 \
            -bf 3 -refs 5 -directpred 3 -trellis 1 \
            -flags2 +bpyramid+mixed_refs+wpred+dct8x8+fastpskip -wpredp 2 \
            -rc_lookahead 50 -coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 \
            -level 30 -maxrate 10000000 -bufsize 10000000 -wpredp 0 -b 1200k \
            -threads 0 -f mp4 OUTPUT.mp4

    Note : I’m skipping the aspect ratio because we handle that in the program, and we only resize it if the input resolution is greater than the output resolution.

    If there’s any suggestions for improvement, we are looking to balance speed, quality and conversion time.

  • How to save an SDL bitmap to memory and load it back ?

    19 novembre 2012, par Nav

    I have a bunch of RWops functions :

    static int myseekfunc(SDL_RWops *context, int offset, int whence) { SDL_SetError("Can't seek in this kind of RWops"); return(-1); }
    static int myreadfunc(SDL_RWops *context, void *ptr, int size, int maxnum) { memset(ptr,0,size*maxnum); return(maxnum); }
    static int mywritefunc(SDL_RWops *context, const void *ptr, int size, int num) { return(num); }
    static int myclosefunc(SDL_RWops *context)
    {
     if(context->type != 0xdeadbeef) { SDL_SetError("Wrong kind of RWops for myclosefunc()"); return(-1); }
     free(context->hidden.unknown.data1);
     SDL_FreeRW(context);
     return(0);
    }

    // Note that this function is NOT static -- we want it directly callable from other source files
    SDL_RWops *MyCustomRWop()
    {
     SDL_RWops *c=SDL_AllocRW();
     if(c==NULL) return(NULL);

     c->seek =myseekfunc;
     c->read =myreadfunc;
     c->write=mywritefunc;
     c->close=myclosefunc;
     c->type =0xdeadbeef;
     printf("deadbeef=%d\n",c->type);
     c->hidden.unknown.data1=malloc(256);//IS THIS CORRECT?
     return(c);
    }

    with which I'm trying to write a BMP into memory and then extract it back. The below code is from tutorial02.
    Two problems I'm facing are :
    1. Unless I call SDL_DisplayYUVOverlay, the SDL_SaveBMP function outputs a blank BMP file to the hard disk. How can I output a BMP file without having to call SDL_DisplayYUVOverlay ?
    2. Although I'm able to save the BMP to memory with SDL_SaveBMP_RW and free the memory with filestream->close, I'm unable to load the BMP back from memory with SDL_SaveBMP. The application crashes while trying to load it. Is it because of the c->hidden.unknown.data1=malloc(256); code above ? What would be the right way of allocating this memory ?

     AVFormatContext *pFormatCtx = NULL;
     int             i, videoStream;
     AVCodecContext  *pCodecCtx = NULL;
     AVCodec         *pCodec = NULL;
     AVFrame         *pFrame = NULL;
     AVPacket        packet;
     SDL_Overlay     *bmp = NULL;
     SDL_Surface     *screen = NULL;
     SDL_Surface     *screen2 = NULL;
     SDL_Rect        rect;
    ....
    ....    
    if(frameFinished)

    {
    SDL_LockYUVOverlay(bmp);//-----------lock

    AVPicture pict;
    pict.data[0] = bmp->pixels[0];
    pict.data[1] = bmp->pixels[2];
    pict.data[2] = bmp->pixels[1];

    pict.linesize[0] = bmp->pitches[0];
    pict.linesize[1] = bmp->pitches[2];
    pict.linesize[2] = bmp->pitches[1];

    // Convert the image into YUV format that SDL uses
    sws_scale( sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pict.data, pict.linesize );

    SDL_UnlockYUVOverlay(bmp);//-----------unlock

    rect.x = 0;
    rect.y = 0;
    rect.w = pCodecCtx->width;
    rect.h = pCodecCtx->height;
    SDL_DisplayYUVOverlay(bmp, &rect);
    ++i;

    SDL_RWops *filestream = MyCustomRWop();//SDL_AllocRW();
    SDL_SaveBMP_RW (screen, filestream, i);
    screen2 = SDL_LoadBMP_RW(filestream,1);//LOADING IS THE PROBLEM HERE. DON'T KNOW WHY
    filestream->close;
    SDL_SaveBMP(screen, filepointer);