Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (37)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (5244)

  • Revision 29746 : Gestion de la file d’attente

    8 juillet 2009, par kent1@… — Log

    Gestion de la file d’attente

  • RGB to x264 : Strange color render

    16 janvier 2014, par Maypeur

    i’m trying to make a video from an OpenGl context.

    I’m Using glReadPixel, to be sure RGB buffer data is Ok i save it into a bmp file, wich i can read correctly.

    My .h264 video is encoded but there are some artefact and i don’t understand why.
    I tried a lot of different parameters for the x264_param_t but anything better !

    Bitmap saved (OpenGL real data) : Bitmap from OpenGl (1mo)

    Raw h264 with error : Raw h264 video (1mo)

    OpenGl ReadPixel :

    int nSize = ClientHeight * ClientWidth * 3;
    GLubyte *inBuff = new GLubyte[nSize];
    glReadBuffer(GL_FRONT);
    glReadPixels(0, 0, ldwidth, ldheight, GL_BGR, GL_UNSIGNED_BYTE, inBuff);

    The params define :

    x264_param_default(&mX264_param_t);
    x264_param_default_preset(&mX264_param_t, "placebo", "film");

    mX264_param_t.i_csp = X264_CSP_BGR;
    mX264_param_t.i_threads = 6;
    mX264_param_t.i_width = mWidth;
    mX264_param_t.i_height = mHeight;

    mX264_param_t.i_fps_num = mFps;
    mX264_param_t.i_fps_den = 1;

    // Intra refres:
    mX264_param_t.i_keyint_max = mFps;
    mX264_param_t.b_intra_refresh = 1;

    //Rate control:
    mX264_param_t.rc.i_rc_method = X264_RC_CRF;
    mX264_param_t.rc.f_rf_constant = 25;
    mX264_param_t.rc.f_rf_constant_max = 35;

    int bps = 5000;
    mX264_param_t.rc.i_bitrate = bps;
    mX264_param_t.rc.i_vbv_max_bitrate = bps;
    mX264_param_t.i_bframe = 2;
    mX264_param_t.i_keyint_min = mFps / 4;
    //For streaming:
    mX264_param_t.b_repeat_headers = 1;
    mX264_param_t.b_annexb = 1;
    mX264_param_t.i_log_level = X264_LOG_DEBUG;
    x264_param_apply_profile(&mX264_param_t, "baseline");

    mpEncoder = x264_encoder_open(&mX264_param_t);
    x264_encoder_parameters(mpEncoder, &mX264_param_t);



    mpPictureOut = new x264_picture_t();
    mpPictureIn = new x264_picture_t();

    x264_picture_alloc(mpPictureIn, X264_CSP_BGR | X264_CSP_VFLIP, mWidth, mHeight);

    Then the encoding loop :

    mpPictureIn->img.i_csp = X264_CSP_BGR;

    mpPictureIn->img.i_plane = 1;
    mpPictureIn->img.i_stride[0] = 3 * mWidth;
    mpPictureIn->img.plane[0] = rgbframe;

    mpPictureIn->i_pts = mFrameCount;
    mpPictureIn->i_type = X264_TYPE_AUTO;

    mpPictureOut->i_pts = mFrameCount;

    int i_nals;
    x264_nal_t* nals;
    int frame_size = x264_encoder_encode(mpEncoder, &nals, &i_nals, mpPictureIn, mpPictureOut);

    if(frame_size > 0)
    {
    mpFileOut->write_frame(nals[0].p_payload, frame_size, mpPictureOut);
    mFrameCount++;
    }

    The write frame :

    int TVideoFileWriter::write_frame(uint8_t *p_nalu, int i_size, x264_picture_t *p_picture)
    {
    if(fwrite(p_nalu, i_size, 1, mFileHandle))
       return i_size;
    return -1;
    }
  • Creating automated ffmpeg converter

    27 janvier 2019, par Jeffrey Moser

    I am trying to create an automated process using ffmpeg and am having issues understanding how to adapt the code to automator.

    The code works beautifully in the terminal, but requires each filename to me entered manually. I am trying to automate the process.

    for f in "$@"
    do

    FILE= "$f"
    OUT=${FILE/mp4/png}
    OUT_WIDTH=10800
    OUT_HEIGHT=3600

    eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width "${FILE}")
    IN_WIDTH=${streams_stream_0_width}
    IN_HEIGHT=${streams_stream_0_height}

    eval $(ffprobe -v error -of flat=s=_ -count_frames -select_streams v:0 -show_entries stream=nb_read_frames "${FILE}")
    IN_FRAMES=${streams_stream_0_nb_read_frames}

    W_TILES=$(bc <<< "(sqrt($OUT_WIDTH*$IN_FRAMES*$IN_HEIGHT/($IN_WIDTH*$OUT_HEIGHT))+3)")
    H_TILES=$(bc <<< "(sqrt($OUT_HEIGHT*$IN_FRAMES*$IN_WIDTH/($OUT_WIDTH*$IN_HEIGHT)))")

    W_SHRUNK=$(bc <<< "$OUT_WIDTH/$W_TILES")
    H_SHRUNK=$(bc <<< "$OUT_HEIGHT/$H_TILES")

    ffmpeg -i "${FILE}" -vf "hflip,transpose=cclock,scale=${H_SHRUNK}:${W_SHRUNK},tile=${H_TILES}x${W_TILES},transpose=clock,hflip,scale=${OUT_WIDTH}x${OUT_HEIGHT}" -an -sn -vsync 0 "${OUT}"


    done

    I expected the code to produce an image of every frame of the film. But instead I got a massive error message.

    The action “Run Shell Script” encountered an error: “-: line 5: /Users/jeffreymoser/21 A New Dawn.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/22 Battle Hymn.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/23 Reckless.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/24 Showdown.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found
    -: line 5: /Users/jeffreymoser/25 Wedding Bells.mp4: Permission denied
    -: line 14: ffprobe: command not found
    -: line 18: ffprobe: command not found
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 1: parse error
    (standard_in) 2: parse error
    (standard_in) 2: parse error
    -: line 29: ffmpeg: command not found