Recherche avancée

Médias (1)

Mot : - Tags -/remix

Autres articles (40)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (6513)

  • FFmpeg mp4 videos load very slow outside of network

    6 juin 2014, par user3550401

    I used ffmpeg to convert my videos to mp4 using libx264 and qt fast start. Im playing my videos through the HTML tag, and when im inside my network where my website is, everything plays fast. But when i try to play the video from an outside network, I have to wait about 10 seconds before a 5 second video is played. And even when its playing, its super choppy. Any reason on why this is ? I am playing the videos in Safari on my iPhone.

    Here is how im encoding my videos :

    ffmpeg -i video.ts -i css/watermark.png -filter_complex overlay=10:main_h-overlay_h-10 -shortest -b:v 800k -vcodec libx264 -acodec libfaac -ar 44100 -ac 2 -b:a 128k -movflags faststart -map_metadata -1 video.mp4

  • Render YUV video in OpenGL of ffmpeg using CVPixelBufferRef and Shaders

    4 septembre 2012, par resident_

    I'm using to render YUV frames of ffmpeg with the iOS 5.0 method "CVOpenGLESTextureCacheCreateTextureFromImage".

    I'm using like the apple example GLCameraRipple

    My result in iPhone screen is this : iPhone Screen

    I need to know I'm doing wrong.

    I put part of my code to find errors.

    ffmpeg configure frames :

    ctx->p_sws_ctx = sws_getContext(ctx->p_video_ctx->width,
                                   ctx->p_video_ctx->height,
                                   ctx->p_video_ctx->pix_fmt,
                                   ctx->p_video_ctx->width,
                                   ctx->p_video_ctx->height,
                                   PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL);


    // Framebuffer for RGB data
    ctx->p_frame_buffer = malloc(avpicture_get_size(PIX_FMT_YUV420P,
                                                   ctx->p_video_ctx->width,
                                                   ctx->p_video_ctx->height));

    avpicture_fill((AVPicture*)ctx->p_picture_rgb, ctx->p_frame_buffer,PIX_FMT_YUV420P,
                  ctx->p_video_ctx->width,
                  ctx->p_video_ctx->height);

    My render method :

    if (NULL == videoTextureCache) {
       NSLog(@"displayPixelBuffer error");
       return;
    }    


    CVPixelBufferRef pixelBuffer;    
      CVPixelBufferCreateWithBytes(kCFAllocatorDefault, mTexW, mTexH, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange, buffer, mFrameW * 3, NULL, 0, NULL, &pixelBuffer);



    CVReturn err;    
    // Y-plane
    glActiveTexture(GL_TEXTURE0);
    err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault,
                                                      videoTextureCache,
                                                      pixelBuffer,
                                                      NULL,
                                                      GL_TEXTURE_2D,
                                                      GL_RED_EXT,
                                                      mTexW,
                                                      mTexH,
                                                      GL_RED_EXT,
                                                      GL_UNSIGNED_BYTE,
                                                      0,
                                                      &_lumaTexture);
    if (err)
    {
       NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err);
    }  

    glBindTexture(CVOpenGLESTextureGetTarget(_lumaTexture), CVOpenGLESTextureGetName(_lumaTexture));
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);    

    // UV-plane
    glActiveTexture(GL_TEXTURE1);
    err = CVOpenGLESTextureCacheCreateTextureFromImage(kCFAllocatorDefault,
                                                      videoTextureCache,
                                                      pixelBuffer,
                                                      NULL,
                                                      GL_TEXTURE_2D,
                                                      GL_RG_EXT,
                                                      mTexW/2,
                                                      mTexH/2,
                                                      GL_RG_EXT,
                                                      GL_UNSIGNED_BYTE,
                                                      1,
                                                      &_chromaTexture);
    if (err)
    {
       NSLog(@"Error at CVOpenGLESTextureCacheCreateTextureFromImage %d", err);
    }

    glBindTexture(CVOpenGLESTextureGetTarget(_chromaTexture), CVOpenGLESTextureGetName(_chromaTexture));
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);    

    glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);

    // Set the view port to the entire view
    glViewport(0, 0, backingWidth, backingHeight);

    static const GLfloat squareVertices[] = {
       1.0f, 1.0f,
       -1.0f, 1.0f,
       1.0f,  -1.0f,
       -1.0f,  -1.0f,
    };

    GLfloat textureVertices[] = {
       1, 1,
       1, 0,
       0, 1,
       0, 0,
    };

    // Draw the texture on the screen with OpenGL ES 2
    [self renderWithSquareVertices:squareVertices textureVertices:textureVertices];


    // Flush the CVOpenGLESTexture cache and release the texture
    CVOpenGLESTextureCacheFlush(videoTextureCache, 0);    
    CVPixelBufferRelease(pixelBuffer);    

    [moviePlayerDelegate bufferDone];

    RenderWithSquareVertices method

       - (void)renderWithSquareVertices:(const GLfloat*)squareVertices textureVertices:(const GLfloat*)textureVertices
    {


     // Use shader program.
       glUseProgram(shader.program);

    // Update attribute values.
    glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices);
    glEnableVertexAttribArray(ATTRIB_VERTEX);
    glVertexAttribPointer(ATTRIB_TEXTUREPOSITON, 2, GL_FLOAT, 0, 0, textureVertices);
    glEnableVertexAttribArray(ATTRIB_TEXTUREPOSITON);

    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

    // Present
    glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);
    [context presentRenderbuffer:GL_RENDERBUFFER];

    }

    My fragment shader :

    uniform sampler2D SamplerY;
    uniform sampler2D SamplerUV;


    varying highp vec2 _texcoord;

    void main()
    {

    mediump vec3 yuv;
    lowp vec3 rgb;

    yuv.x = texture2D(SamplerY, _texcoord).r;
    yuv.yz = texture2D(SamplerUV, _texcoord).rg - vec2(0.5, 0.5);

    // BT.601, which is the standard for SDTV is provided as a reference

    /* rgb = mat3(    1,       1,     1,
    0, -.34413, 1.772,
    1.402, -.71414,     0) * yuv;*/


    // Using BT.709 which is the standard for HDTV
    rgb = mat3(      1,       1,      1,
              0, -.18732, 1.8556,
              1.57481, -.46813,      0) * yuv;

      gl_FragColor = vec4(rgb, 1);

    }

    Very thanks,

  • is it possible to play h264-mpegts format in ios ?

    11 octobre 2012, par jAckOdE

    Server transcodes the video to the h264/aac, and send video data to client simultaneously. To play and save the video data at the same time, I use mpegts as the container format, but the problem is that ios MediaPlayer can not play mpegts file.

    Google said that i can used ios-build of ffmpeg to do the task, but it seem to be an overkill. is there any other ways to play mpegts in iphone using just iOS SDK ?