Recherche avancée

Médias (91)

Autres articles (31)

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

  • 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<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'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(&pkt);
       pkt.data = NULL;    // packet data will be allocated by the encoder
       pkt.size = 0;
       frame->pts = counter;
       avcodec_encode_video2(c, &pkt, frame, &got_output);
       if (got_output)
       {
           //I think that  sending packet by rtmp  must be here!
           av_free_packet(&pkt);            

       }

    }
    // Get the delayed frames
    for (int got_output = 1,i=0; got_output; i++)
    {
       ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
       if (ret < 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(&pkt);      
           }
    }

    ///////////////////////////
    //Deinitialize encoder
    ///////////////////////////
    avcodec_close(c);
    av_free(c);
    av_freep(&frame->data[0]);
    avcodec_free_frame(&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.

  • flv reencode to mp4 for iphone/ipod via ffmpeg and x264 (quality issue)

    3 octobre 2011, par zeroasterisk

    There are a lot of questions on this topic, and I've read most of them and most of the google search results I could come up with.

    When I use FFMPEG to convert a FLV to a iphone3 compatble MP4 file, it just doesn't preserver enough of the quality. Yes, I've worked the hell out of -sameq and -b and -bt settings, text just isn't readable.

    Next I tried to split the video out and process it directly, using these instructions :
    https://sites.google.com/site/linuxencoding/x264-encoding-guide

    The problem is myplayer (via ffmpeg) was not able to determine the duration of the FLV (even though the metadata was set).

    (I assume) Because of that unknown duration, when I create the MP4 file, the resulting x264 file plays through super-fast while the audio plays at the normal rate.

    user@server:/tmp# mplayer -nosound -benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
    MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.

    Playing input.flv.
    libavformat file format detected.
    [flv @ 0x1202460]Estimating duration from bitrate, this may be inaccurate
    [lavf] stream 0: video (vp6f), -vid 0
    [lavf] stream 1: audio (nellymoser), -aid 0
    VIDEO:  [VP6F]  1680x992  0bpp  1000.000 fps   33.4 kbps ( 4.1 kbyte/s)
    Clip info:
    audiocodecid: 6
    audiodatarate: 86
    audiosamplerate: 44100
    audiosamplesize: 16
    audiosize: 6097005
    canSeekToEnd: true
    datasize: 8609138
    duration: 567
    framerate: 2
    hasAudio: true
    hasCuePoints: false
    hasKeyframes: true
    hasMetadata: true
    hasVideo: true
    height: 992
    lasttimestamp: 567
    metadatacreator: flvtool++ (Facebook, Motion project, dweatherford)
    stereo: false
    totalframes: 1043
    videocodecid: 4
    videodatarate: 33
    videosize: 2316256
    width: 1680
    Using (default) progressive frame mode.Opening video filter: [expand w=640 h=480]
    Expand: 640 x 480, -1 ; -1, osd: 0, aspect: 0.000000, round: 1
    Opening video filter: [scale w=0 h=0]
    Opening video filter: [dsize=640:480:0]
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash)
    ==========================================================================
    Audio: no sound
    Starting playback...
    Movie-Aspect is undefined - no prescaling applied.
    [swscaler @ 0x7f0c738b9620]Lanczos scaler, from yuv420p to yuv420p using MMX2
    VO: [yuv4mpeg] 640x480 => 641x480 Planar YV12

    I have also tried specifying FPS, but no change in results

    user@server:/tmp# mplayer -nosound -fps 25-benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --fps 25 --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'

    Can someone tell me how to either :

    1. fix my split A/V processing/timing/duration issues ?
    2. improve the
      quality of the FFMPEG conversion of FLV to iphone3 compatible
      format ?