Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (74)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (9231)

  • Révision 17738 : parametre retour facultatif dans ask_php_auth (utilisé dans l’extension forum)

    20 avril 2011, par cedric -
  • Resize camera preview frame using Ffmpeg

    20 avril 2015, par Vipul Purohit

    Scenario :
    I’m working on a live video stream application, in that I need to stream video at resolution around 380x240. I’m sending the camera preview byte[] to streamer from onPreviewFrame event of Camera.PreviewCallback.
    But I need to show camera preview in 720p/1080p but its not possible due to low resolution video streaming.

    Problem
    The solution I’m working is to reduce the video frame size from HD to a low resolution and then send it to streamer and for that I’m using FFMPEG’s sws_scale.

    I’ve successfully compiled the FFMPEG and can access and execute the JNI methods. But I’m completely new to android NDK development and not very familiar with the C/C++ language so I need help in writing JNI method to scale down the video frame.

    Here is what I’m having in my JNI method :

    JNIEXPORT jbyteArray JNICALL Java_com_example_ffmpegtest_MainActivity_resizeFrame(
       JNIEnv * env, jobject pObj, jbyteArray *input, jbyteArray * output,
       int width, int height) {
    struct SwsContext *resize;

    resize = sws_getContext(width, height, PIX_FMT_YUV420P, width, height,
           AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
    LOGI("---RESIZE");
    AVFrame* picture = avcodec_alloc_frame(); // this is your original frame
    AVFrame* outpic = avcodec_alloc_frame();

    int num_bytes = avpicture_get_size(PIX_FMT_YUV420P, width, height);
    jbyteArray data = (*env)->NewByteArray(env, num_bytes);
    uint8_t* frame2_buffer = (uint8_t *) av_malloc(num_bytes * sizeof(uint8_t));
    LOGI("---NUMBYTES ED");

    avpicture_fill((AVPicture*) picture, input, PIX_FMT_YUV420P, width, width);

    avpicture_fill((AVPicture*) outpic, frame2_buffer, PIX_FMT_YUV420P, 600,
           600);

    sws_scale(resize, picture->data, picture->linesize, 600, 600, outpic->data,
           outpic->linesize);

    sws_freeContext(resize);

    (*env)->SetByteArrayRegion(env, data, 0, num_bytes, outpic);
    LOGI("---SCALE %d", picture->data);
    LOGI("---SCALE_OUT %d", outpic->data);
    return output;

    }

    Here is the fuction for JNI method :

    private static native byte[] resizeFrame(byte[] input, byte[] output, int width, int height);

    and the Camera.PreviewCallback

    @Override
    public void onPreviewFrame(byte[] data, Camera camera) {
       byte[] data2 = null;

       data2 = resizeFrame(data, data2, mPreview.mPreviewSize.width,
               mPreview.mPreviewSize.height);

       // Code to send camera frame to streamer
    }

    I’m always getting data2 null.
    I know its a bad coding practices but I’m just keep changing the code to make it work but failed.

  • Audio in ffmpeg

    1er octobre 2020, par Konduri Sai Aditya

    I need to add audio as an input to below command, How can I achieve it

    


    ffmpeg -i test.png -i test.mp4 -y -filter_complex "[1:v]scale=1422:800[scale1],[scale1]rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[rotate0],[0:v][rotate0]overlay=258.04:107.71[mediaoverlayout0],color=black@0:451x137[c1],[c1]setsar=1,drawtext=fontfile='/Windows/fonts/Peddana-Regular.ttf':text='ADITYA':fontsize=121.19999999999999:fontcolor=#1e8bc3:line_spacing=16.91,rotate=0:ow=rotw(0):oh=roth(0):c=black@0[rottext1],[mediaoverlayout0][rottext1]overlay=x=544.63:y=263.076:shortest=1" -pix_fmt yuv420p op.mp4