Recherche avancée

Médias (91)

Autres articles (60)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (8332)

  • 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
  • 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;
    }
  • Evolution #2050 (Fermé) : site vide au début

    25 octobre 2011, par cedric -

    fermé grace au compagnon