Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

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

Autres articles (74)

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

  • How to use the ffmpeg library to transpose a video ?

    12 décembre 2013, par beni

    I'm trying to develop an video recorder and playback app in Android. So, I'm using the ffmpeg library and I've compiled the library to use in the project.

    I record a video and when I playback, in some devices don't recognize the orientation matrix, so I want to develop with the ffmpeg library a C method to do this order :

    ffmpeg -i f.mp4 -vf "transpose=1" -r 24 -sameq f2.mp4"

    I found this documentation but don't help me, because don't use the AVFilter and AVFilterContext classes.

    http://dranger.com/ffmpeg/tutorial01.html

    http://cekirdek.pardus.org.tr/ ismail/ffmpeg-docs/structAVFilterContext.html

    http://ffmpeg.org/doxygen/trunk/api-example_8c-source.html

    Now I only have the opening and closing video file

    Here my code :

    /*open the video file*/
    if ((lError = av_open_input_file(&gFormatCtx, gFileName, NULL, 0, NULL)) !=0 ) {
       LOGE(1, "Error open video file: %d", lError);
       return; //open file failed
    }
    /*retrieve stream information*/
    if ((lError = av_find_stream_info(gFormatCtx)) < 0) {
       LOGE(1, "Error find stream information: %d", lError);
       return;
    }
    /*find the video stream and its decoder*/
    gVideoStreamIndex = av_find_best_stream(gFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &lVideoCodec, 0);
    if (gVideoStreamIndex == AVERROR_STREAM_NOT_FOUND) {
       LOGE(1, "Error: cannot find a video stream");
       return;
    } else {
    LOGI(10, "video codec: %s", lVideoCodec->name);
    }
    if (gVideoStreamIndex == AVERROR_DECODER_NOT_FOUND) {
       LOGE(1, "Error: video stream found, but no decoder is found!");
       return;
    }  
    /*open the codec*/
    gVideoCodecCtx = gFormatCtx->streams[gVideoStreamIndex]->codec;
    LOGI(10, "open codec: (%d, %d)", gVideoCodecCtx->height, gVideoCodecCtx->width);
    #ifdef SELECTIVE_DECODING
    gVideoCodecCtx->allow_selective_decoding = 1;
    #endif
    if (avcodec_open(gVideoCodecCtx, lVideoCodec) < 0) {
    LOGE(1, "Error: cannot open the video codec!");
       return;
    }
    LOGI(10, "get video info ends");

    How can I transpose the video using the ffmpeg library ?

  • How to achive better quality with libav on android surface ?

    16 novembre 2018, par iLobanov

    Playing video from RTSP stream on Android surface using solution from this repo
    https://github.com/alexandruc/android-ffmpeg-player/blob/master/android-ffmpeg-player/jni/ffmpeg-player.c

    Video is playng but have a lot of glitches especially when something moving.
    Have not enought expirience using libav.
    Will be happy if someone can help or give links on some tutorials or community.

    Here is the function to display video on surface.

    void* decodeAndRender(void *voidArgs) {
    auto *args = (decode_args*)voidArgs;
    CamCon* cc = getCamCon(args->name);

    ANativeWindow_Buffer    windowBuffer;
    AVPacket                packet;
    int                     i=0;
    int                     frameFinished;
    int                     lineCnt;

    int counter = 0;
    while(av_read_frame(cc->formatCtx, &packet)>=0 && cc->isConnect) {
       counter = 1;
       // Is this a packet from the video stream?
       if(packet.stream_index==cc->videoStreamIdx) {
           // Decode video frame
           avcodec_decode_video2(cc->codecCtx, cc->decodedFrame, &frameFinished, &packet);
           // Did we get a video frame?
           if(frameFinished) {
               // RECORD video
               if(cc->isRecord)
                   recordMP4(packet, cc);

               // DISPLAY video
               // Convert the image from its native format to RGBA
               sws_scale (
                       cc->sws_ctx,
                       (uint8_t const * const *)cc->decodedFrame->data,
                       cc->decodedFrame->linesize,
                       0,
                       cc->codecCtx->height,
                       cc->frameRGBA->data,
                       cc->frameRGBA->linesize
               );
               // lock the window buffer
               if (ANativeWindow_lock(cc->window, &windowBuffer, NULL) < 0) {
                   LOGE("cannot lock window");
               } else {
                   // draw the frame on buffer
                   LOGI("copy buffer %d:%d:%d", cc->displayWidth, cc->displayHeight, cc->displayWidth * cc->displayHeight*4);
                   LOGI("window buffer: %d:%d:%d", windowBuffer.width,
                        windowBuffer.height, windowBuffer.stride);
                   memcpy(windowBuffer.bits, cc->buffer,  cc->displayWidth * cc->displayHeight * 4);
                   // unlock the window buffer and post it to display
                   ANativeWindow_unlockAndPost(cc->window);
                   // count number of frames
                   ++i;
               }
           }
       }
       // Free the packet that was allocated by av_read_frame
       av_free_packet(&packet);
    }
    LOGI("total No. of frames decoded and rendered %d", i);
    finish(args->env, args->name);

    }

  • Anomalie #3714 : squelette article : documents dupliqués en cas de majuscule

    22 février 2016, par b b

    Niveau "ergo", les modèles proposés dans les boîtes des documents de l’objet en cours d’édition sont bien présentés en minuscules. D’ailleurs, un double clic sur le modèle souhaité l’insert automatiquement dans le texte à la position du curseur. Peut-être est-ce point que tu as oublié de montrer à ton "élève" lors de la "formation" ?