Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (88)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

Sur d’autres sites (9322)

  • Generating MPEG DASH videos which are compilant with HbbTV 1.5 standard

    6 mai 2014, par Kai Mysliwiec

    I am looking for a the command line options for ffmpeg, DASHEncoder and MP4Box to generate HbbTV 1.5 compilant MPEG DASH videos.

    See http://www.hbbtv.org/pages/about_hbbtv/specification.php for more information on the HbbTV 1.5 standard and its DASH profile which is used there.

  • Is there any way to compile ffmpeg library on Windows ?

    20 mars 2013, par AB1209

    Hi I have been working for weeks to compile ffmpeg library on Windows platform.But I found no way so far.Is it there any way to compile ffmpeg library on Windows 7.

    I am using Cygwin on Windows.
    Whenever I try to do ndk-build I get this message.

    Android NDK: ERROR:jni/yuv2rgb/Android.mk:ffmpeg-prebuilt: LOCAL_SRC_FILES points to a missing file
    Android NDK: Check that jni/ffmpeg-build/armeabi/libffmpeg.so exists  or that its path is correct
    /cygdrive/D/AndroidNDK/android-ndk-r8c/build/core/prebuilt-library.mk:43: *** Android NDK: Aborting    .  Stop.

    & while searching for solution of this error I found that I will have to compile the libraries first.For compiling by using ./build_android.sh. I got this error message.

    ./build_android.sh
    ./build_android.sh: line 72: ./configure: No such file or directory

    Please please guide me what should I do.

  • (not) Decoding h264 nals using ffmpeg

    28 janvier 2013, par Zetlb

    Im trying to decode h264 file ( h264 bitstream, without containter ) I have generated and I have a problem.
    I think h264 file is correct because I'm playing it using ffplay.
    The problem is that in the third frame I get an assert a exit.
    I read the nals and create packets using this function ( probably here is the error ) :

    Here is my code :

    int encode_nals( AVPacket *pkt, x264_nal_t *nals, int nnal, x264_picture_t* pPicture )
    {
       uint8_t* sei = NULL;
       int sei_size = 0;

       // first search NAL with SEI info to put it first
       //
       for (int i = 0; i < nnal; i++)
       {
           if ( nals[i].i_type == NAL_SEI )
           {
               sei_size = nals[i].i_payload;
               sei = (uint8_t*) av_malloc( sei_size );
           }
       }

       uint8_t *p;
       int i, size = sei_size, ret;

       if (!nnal)
           return 0;

       // obtain the size of the new packet
       //
       for (i = 0; i < nnal; i++)
           size += nals[i].i_payload;

       pkt->data = ( uint8_t*) av_malloc( size );
       p = pkt->data;

       /* Write the SEI at the beginning of the packet */
       if (sei_size > 0 && nnal > 0)
       {
           memcpy(p, sei, sei_size);
           p += sei_size;
           sei_size = 0;
           av_free( sei );
       }

       // write remaining NALs ( except NAL_SEI written first )
       //
       for (i = 0; i < nnal; i++)
       {
           if ( nals[i].i_type != NAL_SEI )
           {
               memcpy(p, nals[i].p_payload, nals[i].i_payload);
               p += nals[i].i_payload;
           }
       }
       // Complete packet info
       //
       pkt->pts = pPicture->i_pts;
       pkt->dts = pPicture->i_dts;
       pkt->size = size;
       pkt->flags |= AV_PKT_FLAG_KEY * pPicture->b_keyframe;

       return 1;
    }

    Also I have tried to write all the nal's p_payload in the packet with a single memcpy, something like this :

    int encode_nals( AVPacket *pkt, x264_nal_t *nals, int nnal, x264_picture_t* pPicture )
    {

       uint8_t *p;
       int i, size = 0, ret;

       if (!nnal)
           return 0;

       // obtain the size of the new packet
       //
       for (i = 0; i < nnal; i++)
           size += nals[i].i_payload;

       pkt->data = ( uint8_t*) av_malloc( size );
       p = pkt->data;
       memcpy( pkt->data, nals[0].p_payload, size );    

       // Complete packet info
       //
       pkt->pts = pPicture->i_pts;
       pkt->dts = pPicture->i_dts;
       pkt->size = size;
       pkt->flags |= AV_PKT_FLAG_KEY * pPicture->b_keyframe;

       return 1;
    }

    Both cases obtain the same error.

    After having the packets, I use a code like this to decode ( I have the packets in a vector ) :

    avcodec_init();  
    avcodec_register_all();  
    AVCodec* pCodec;  
    pCodec=avcodec_find_decoder(CODEC_ID_H264);  
    AVCodecContext* pCodecContext;  
    pCodecContext=avcodec_alloc_context();  
    avcodec_open(pCodecContext,pCodec);  
    pCodecContext->extradata = NULL;

    pCodecContext->flags    |= CODEC_FLAG_4MV;
    pCodecContext->flags     |= CODEC_FLAG_PART;
    pCodecContext->flags     |=CODEC_FLAG_TRUNCATED;
    pCodecContext->flags2  |=  CODEC_FLAG2_CHUNKS;
    pCodecContext->pix_fmt   =   PIX_FMT_YUV420P  /*It can be RGB also*/;
    pCodecContext->skip_frame = AVDISCARD_DEFAULT;
    pCodecContext->error_concealment = 3;
    pCodecContext->error_recognition = 1;
    pCodecContext->skip_loop_filter = AVDISCARD_DEFAULT;
    pCodecContext->workaround_bugs = 1;
    pCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
    pCodecContext->codec_id = CODEC_ID_H264;

    int iNumFrames = 0;
    unsigned int nNumPackets = m_vPackets.size();
    int frameFinished = 0;
    for (   auto it = m_vPackets.begin();
           it != m_vPackets.end();
           it++ )
    {
       frameFinished = 0;
       AVFrame* pFrame;
       pFrame = avcodec_alloc_frame();
       AVPacket* pPacket = *it;
       int iReturn = avcodec_decode_video2( pCodecContext, pFrame, &frameFinished, pPacket );
       if ( frameFinished )
       {
           DrawFrame( pFrame ); // this function is not implemented now.
           iNumFrames++;
       }
       av_free_packet( pPacket );
    }

    The result of the execution is that on the first two iterations avcodec_decode_video2 returns a positive value, frameFinished is filled with a positive value and pFrame is filled ( I didn't show the frame on screen yet, is my next step ), and the third iteration, the avcodec_decode_video2 causes an assert and abort.
    The assert is on file mpegvideo.c, on the function :

    static void update_noise_reduction(MpegEncContext *s)

    The assert is :

    assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3);

    Can anybody help me please ? what's wrong ?

    EDIT : The frames obtained on the first two calls of avcodec_decode_video2 aren't correct.

    Thanks
    Zetlb