Recherche avancée

Médias (91)

Autres articles (30)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

Sur d’autres sites (3940)

  • split video (avi/h264) on keyframe

    30 novembre 2012, par m.sr

    Hallo.

    I have a big video file. ffmpeg, tcprobe and other tool say, it is an h264-stream in an AVI-container.

    Now i'd like to cut out small chunks form the video.

    1. Problem : The index of the video seam corrupted/destroyed. I kind of fixed this via mplayer -forceidx -saveidx <indexfile> <bigvideofile></bigvideofile></indexfile>. The Problem here is, that I'm now stuck with mplayer/mencoder which can use this index file via -loadidx <indexfile></indexfile>. I have tried correcting the index like described in man aviindex (mplayer -frames 0 -saveidx mpidx broken.avi ; aviindex -i mpidx -o tcindex ; avimerge -x tcindex -i broken.avi -o fixed.avi), but this didn't fix my video - meaning that most tools i've tested couldn't search in the video file.

    2. Problem : I cut out parts of the video via following command : mencoder -loadidx in.idx -ss 8578 -endpos 20 -oac faac -ovc x264 -sws 9 -lavfopts format=mp4 -x264encopts <lotsofopts> -of lavf -vf scale=800:-10,harddup in.avi -o out.mp4</lotsofopts>. Now here the problem is, that some videos are corrupted at the beginning. I think this is because the fact, that i do not necessarily cut at keyframe.

    Questions :

    1. What is the best way to fix the index of an avi "inline" so that every tool can again work as expected with it ?

    2. How can i split at the keyframes ? Is there an mencoder-option for this ?

    3. Are Keyframes coming in a frequency ? How to find out this frequency ? (So with a bit of math it should be possible to calculate the next keyframe and cut there)

    4. Is ther perhaps some completely other way to split this movie ? Doing it by hand is no option, i've to cut out 1000+ chunks ...

    Thanks a lot !

  • Video Concatenation or Merging

    19 juin 2013, par 2vision2

    I need to join/merge/concatenate more than two different video files (Eg :3gp, mp4 ) in android platform and need to store them as mp4 file.

    So far from my analysis, I’ve seen people referring FFMPEG for these purposes.

    Is FFMPEG available for android ? Or any other alternative packages available for video concatenation ?

    Can FFMPEG concatenate two different kinds of Video files ?(Eg : Combination of mp4 and 3gp)

    Update : Can OpenGL be helpful for merging more than two videos along with audio ?

  • How to publish selfmade stream with ffmpeg and c++ to rtmp server ?

    25 octobre 2013, par Alexandr R

    Have a nice day to you, people !

    I am writing an application for Windows that will capture the screen and send the stream to Wowza server by rtmp (for broadcasting). My application use ffmpeg and Qt.
    I capture the screen with WinApi, convert a buffer to YUV444(because it's simplest) and encode frame as described at the file decoding_encoding.c (from FFmpeg examples) :

    ///////////////////////////
    //Encoder initialization
    ///////////////////////////
    avcodec_register_all();
    codec=avcodec_find_encoder(AV_CODEC_ID_H264);
    c = avcodec_alloc_context3(codec);
    c->width=scr_width;
    c->height=scr_height;
    c->bit_rate = 400000;
    int base_num=1;
    int base_den=1;//for one frame per second
    c->time_base= (AVRational){base_num,base_den};
    c->gop_size = 10;
    c->max_b_frames=1;
    c->pix_fmt = AV_PIX_FMT_YUV444P;
    av_opt_set(c->priv_data, "preset", "slow", 0);

    frame = avcodec_alloc_frame();
    frame->format = c->pix_fmt;
    frame->width  = c->width;
    frame->height = c->height;

    for(int counter=0;counter&lt;10;counter++)
    {
    ///////////////////////////
    //Capturing Screen
    ///////////////////////////
       GetCapScr(shotbuf,scr_width,scr_height);//result: shotbuf is filled by screendata from HBITMAP
    ///////////////////////////
    //Convert buffer to YUV444 (standard formula)
    //It&#39;s handmade function because of problems with prepare buffer to swscale from HBITMAP
    ///////////////////////////
       RGBtoYUV(shotbuf,frame->linesize,frame->data,scr_width,scr_height);//result in frame->data
    ///////////////////////////
    //Encode Screenshot
    ///////////////////////////
       av_init_packet(&amp;pkt);
       pkt.data = NULL;    // packet data will be allocated by the encoder
       pkt.size = 0;
       frame->pts = counter;
       avcodec_encode_video2(c, &amp;pkt, frame, &amp;got_output);
       if (got_output)
       {
           //I think that  sending packet by rtmp  must be here!
           av_free_packet(&amp;pkt);            

       }

    }
    // Get the delayed frames
    for (int got_output = 1,i=0; got_output; i++)
    {
       ret = avcodec_encode_video2(c, &amp;pkt, NULL, &amp;got_output);
       if (ret &lt; 0)
           {
               fprintf(stderr, "Error encoding frame\n");
               exit(1);
           }
           if (got_output)
           {
           //I think that  sending packet by rtmp  must be here!
           av_free_packet(&amp;pkt);      
           }
    }

    ///////////////////////////
    //Deinitialize encoder
    ///////////////////////////
    avcodec_close(c);
    av_free(c);
    av_freep(&amp;frame->data[0]);
    avcodec_free_frame(&amp;frame);

    I need to send video stream generated by this code to RTMP server.
    In other words, I need c++/c analog for this command :

    ffmpeg -re -i "sample.h264" -f flv rtmp://sample.url.com/screen/test_stream

    It's useful, but I don't want to save stream to file, I want to use ffmpeg libraries for realtime encoding screen capture and sending encoded frames to RTMP server inside my own application.
    Please give me a little example how to initialize AVFormatContext properly and to send my encoded video AVPackets to server.

    Thanks.