Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (35)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (7119)

  • use ffmpeg encode a video in android

    18 août 2014, par user2098010

    i followed below link for using ffmpeg in android
    http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/

    and done ! ndk-build

    i need to encode a video captured by phone camera for slow down

    i’ve using sample file in ffmpeg/sample...
    but i can’t get encoded a video(slow down)

    output video has 1sec playtime.
    few color are displayed !

    plz... help me

    i wanna sleep well...

     AVCodec *codec;
       AVCodecContext *c= NULL;
       int i, ret, x, y, got_output;
       FILE *f;
       AVFrame *frame;
       AVPacket pkt;
       uint8_t endcode[] = { 0, 0, 1, 0xb7 };

           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "%s",filename);

       /* find the mpeg1 video encoder */
       codec = avcodec_find_encoder(CODEC_ID_H263);
       if (!codec) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Codec not found");
           exit(1);
       }

       c = avcodec_alloc_context3(codec);
       if (!c) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Could not allocate video codec context");
           exit(1);
       }

       /* put sample parameters */
       c->bit_rate = 400000;
       /* resolution must be a multiple of two */
       c->width = 352;
       c->height = 288;
       /* frames per second */
       c->time_base= (AVRational){1,25};
       c->gop_size = 10; /* emit one intra frame every ten frames */
       c->pix_fmt = AV_PIX_FMT_YUV420P;


      // if(codec == AV_CODEC_ID_H264)
         // av_opt_set(c->priv_data, "preset", "slow", 0);

       /* open it */
       if (avcodec_open2(c, codec, NULL) < 0) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Could not open codec");
           exit(1);
       }

       f = fopen(filename, "wb");
       if (f == NULL) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Could not open");
           exit(1);
       }

       frame = avcodec_alloc_frame();
       if (!frame) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Could not allocate video frame");
           exit(1);
       }
       frame->format = c->pix_fmt;
       frame->width  = c->width;
       frame->height = c->height;

       /* the image can be allocated by any means and av_image_alloc() is
        * just the most convenient way if av_malloc() is to be used */
       ret = av_image_alloc(frame->data, frame->linesize, c->width, c->height,
                            c->pix_fmt, 32);
       if (ret < 0) {
           __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Could not allocate raw picture buffer");
           exit(1);
       }

       /* encode 1 second of video */
       for(i=0;i<250;i++) {
           av_init_packet(&pkt);
           pkt.data = NULL;    // packet data will be allocated by the encoder
           pkt.size = 0;

           fflush(stdout);
           /* prepare a dummy image */
           /* Y */
           for(y=0;yheight;y++) {
               for(x=0;xwidth;x++) {
                   frame->data[0][y * frame->linesize[0] + x] = x + y + i * 3;
               }
           }

           /* Cb and Cr */
           for(y=0;yheight/2;y++) {
               for(x=0;xwidth/2;x++) {
                   frame->data[1][y * frame->linesize[1] + x] = 128 + y + i * 2;
                   frame->data[2][y * frame->linesize[2] + x] = 64 + x + i * 5;
               }
           }

           frame->pts = i;

           /* encode the image */
           ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
           if (ret < 0) {
               __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Error encoding frame");
               exit(1);
           }

           if (got_output) {
               __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "encode the image Write frame pktsize  %d", pkt.size);
               fwrite(pkt.data, 1, pkt.size, f);
               av_free_packet(&pkt);
           }
       }

       /* get the delayed frames */
       for (got_output = 1; got_output; i++) {
           fflush(stdout);

           ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
           if (ret < 0) {
               __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "Error encoding frame");
               fprintf(stderr, "Error encoding frame\n");
               exit(1);
           }

           if (got_output) {
               __android_log_print(ANDROID_LOG_DEBUG, "BASEBALL", "get the delayed frames Write frame pktsize  %d", pkt.size);
               fwrite(pkt.data, 1, pkt.size, f);
               av_free_packet(&pkt);
           }
       }

       /* add sequence end code to have a real mpeg file */
       fwrite(endcode, 1, sizeof(endcode), f);
       fclose(f);

       avcodec_close(c);
       av_free(c);
       av_freep(&frame->data[0]);
       avcodec_free_frame(&frame);
  • while uploading video get screen shots with ffmpeg tool & php [on hold]

    4 décembre 2014, par ilinkthreesixty

    Can you tell me what is ffmpeg and for which purposes it is used in or with PHP ... ?

    I wanna learn it to create thumbnails while uploading a video to rotate them when mouse is over the video when it is done, It’s an effect which is used on dailymotion and even facebook is using it on it’s Album when mouse is hover over a user Album it rotate the thumbnails so i want to learn how to get thumbnail screen shots on the flying while video is uploading ... Hope you have got me.

  • Playing video from webcam in linux

    28 novembre 2014, par SounBum Song

    Im looking for some ways to stream video frame from webcam on python Tkinter.

    Im trying to get frames from webcam by ffmpeg/v4l2

    and stream it on Tkinter and send the frame to network simultaneously(dont wanna use ffserver).

    Im confusing that how I can get frame with ffmpeg/v4l2(which libraries should i use ?)

    How can I read the frame on Tkinter(Maybe Gstreamer) from ffmpeg/v4l2

    If my idea is wrong.... someone can give me a good direction ??