Recherche avancée

Médias (91)

Autres articles (111)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (11965)

  • Issues with adding the current timestamp of a video when using FFPLAY

    28 janvier 2023, par lalelarsen1

    Hi i am trying to add to display the current time of the video as an overlay. i have tried to do follow the answer of this previous post : https://superuser.com/questions/968685/how-to-display-current-time-with-the-ffplay-exe but with no luck.

    


    This is my line of code :

    


    "./ffmpeg-2023-01-25-git-2c3107c3e9-full_build/bin/ffplay.exe" -vf "drawtext=fontfile=./consola.ttf:text='%{pts:hms}':fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20" -i "%shadowplays_folder%\%NEWEST_FOLDER%\%NEWEST_FILE%" -autoexit -x "1000" -alwaysontop


    


    This will display the text "hms}" not the time.

    


    the above code works fine if i replace it with a simple string :

    


    "./ffmpeg-2023-01-25-git-2c3107c3e9-full_build/bin/ffplay.exe" -vf "drawtext=fontfile=./consola.ttf:text='test':fontsize=48:fontcolor=white:box=1:boxborderw=6:boxcolor=black@0.75:x=(w-text_w)/2:y=h-text_h-20" -i "%shadowplays_folder%\%NEWEST_FOLDER%\%NEWEST_FILE%" -autoexit -x "1000" -alwaysontop


    


    This will display the text "test"

    


    what am i missing ?

    


  • How to Render video via openGLES2 with Android NDK

    8 septembre 2014, par wolfz

    I made a apk code with NDK to get video frames by ffmpeg decoding, and rendered to opengles 2.0 , but the screen had nothing to display. so did i make a mistake ?

    my opengles2.0 ini code is below:

    static int window_init_display(void)
    {
    EGLint attribs [] = {
     EGL_RED_SIZE,        8,
     EGL_GREEN_SIZE,      8,
     EGL_BLUE_SIZE,       8,
     EGL_ALPHA_SIZE,      8,
     EGL_DEPTH_SIZE,     16,
     EGL_STENCIL_SIZE,    0,
     EGL_SAMPLE_BUFFERS,  0,
     EGL_SAMPLES,         0,
     EGL_SURFACE_TYPE,    EGL_WINDOW_BIT,
     EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
     EGL_NONE
    };

    EGLint w, h, format;
    EGLint numConfigs;
    EGLConfig config;
    EGLSurface surface;
    EGLContext context;

    EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);

    eglInitialize(display, 0, 0);

    eglChooseConfig(display, attribs, &config, 1, &numConfigs);

    eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);

    ANativeWindow_setBuffersGeometry(g_application->window, 0, 0, format);

    surface = eglCreateWindowSurface(display, config, g_application->window, NULL);

    eglQuerySurface(display, surface, EGL_WIDTH, &w);    
    eglQuerySurface(display, surface, EGL_HEIGHT, &h);
    LOGI("EGL_WIDTH=%d, EGL_HEIGHT=%d",w,h);

    eglBindAPI(EGL_OPENGL_ES_API);

    EGLint contextAttrs[] =
    {
      EGL_CONTEXT_CLIENT_VERSION, 2,
      EGL_NONE
    };
    context = eglCreateContext(display, config, NULL, contextAttrs);

    if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE)
    {        
           LOGW("Unable to eglMakeCurrent");      
           return -1;  
    }

    LOGI("OK init EGL !!!!");

    My render code is below :

    int m_rgbBufferSize = pPicture->iDisplayWidth*pPicture->iDisplayHeight*4;
    m_rgbBuffer = new unsigned char[m_rgbBufferSize];

    struct SwsContext *m_sw_context=NULL;
    m_sw_context = m_dllSwScale.sws_getCachedContext(m_sw_context,
                                                     pPicture->iWidth, pPicture->iHeight, PIX_FMT_YUV420P,
                                                     pPicture->iWidth, pPicture->iHeight, PIX_FMT_RGBA,
                                                     SWS_FAST_BILINEAR, NULL, NULL, NULL);

    uint8_t *psrc[] = { pPicture->data[0], pPicture->data[1], pPicture->data[2], 0 };
    int srcStride[] = { pPicture->iLineSize[0], pPicture->iLineSize[1], pPicture->iLineSize[2], 0 };
    uint8_t *dst[]  = { m_rgbBuffer, 0, 0, 0 };
    int dstStride[] = { pPicture->iDisplayWidth*4, 0, 0, 0 };
    m_dllSwScale.sws_scale(m_sw_context, psrc, srcStride, 0, pPicture->iDisplayHeight, dst, dstStride);
    //LOGV("swscale OK");
    glEnable(GL_TEXTURE_2D);
    glPixelStorei(GL_UNPACK_ALIGNMENT,1);
    if(textureid == 0)
       glGenTextures(1, &textureid);
    glActiveTexture(GL_TEXTURE2);
    glBindTexture(GL_TEXTURE_2D, textureid);
    glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0,
                   pPicture->iDisplayWidth, pPicture->iDisplayHeight, GL_RGBA, GL_UNSIGNED_BYTE, m_rgbBuffer);
  • Systematic artefacts from 10bit source

    8 janvier 2015, par user3729198

    When encoding from a 10 bit source file, compression / color artifacts appear. From what I can see, the problem lies in the "dc precision" command "-dc". I have tried different combinations and these are my results.

    On HD encodings ”-dc8” will give you nice clean solid colors without artifacts. But gradients and shading will suffer and be rougher.

    On HD encodings ”-dc11” will give you bad compression and color artifacts that look very systematic. But the Gradients look nice and smooth.

    On SD encodings ”-dc8” will give you nice clean solid colors without artifacts. But gradients and shading will suffer and be rougher.

    On SD encodings ”-dc9” will give you bad compression and color artifacts that look very systematic. But the Gradients look nice and smooth.

    Why is this ? And can it be fixed ? From other encoding software’s if I mimic the settings, all the encodings looks nice in all cases. So it seems that there is a bug in ffmpeg.

    Here is an example of the ffmpeg command I use :

    -i INPUT -vcodec mpeg2video -aspect {$aspectRatio} -r 25 -pix_fmt yuv422p -timecode_frame_start 0 -minrate 150000k -maxrate 150000k -b 150000k -intra -flags +cgop -flags2 +ivlc+non_linear_q -dc 11 -sc_threshold 1000000000 -qscale 1 -qmin 1 -qmax 12 -bufsize 47185920 -rc_init_occupancy 47185920 -rc_buf_aggressivity 0.25 -s {$resolution} -vframes {$frameDuration} -an OUTPUT

    If you want to try it yourself, make sure your source is 10bit, like Uncompressed 10 bit YUV.