Recherche avancée

Médias (91)

Autres articles (59)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • 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 ;

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

  • I have a problem withInvalid file index 1 in filtergraph description

    17 avril 2019, par Davide

    This is my code :

    ffmpeg -i wireframe-spendo.mov palette.png -filter_complex fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse wireframe-spendo.gif

    but after then :

    ffmpeg -i wireframe-spendo.mov palette.png -filter_complex fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse wireframe-spendo.gif
    ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
     built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-12.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
     libavutil      56. 22.100 / 56. 22.100
     libavcodec     58. 35.100 / 58. 35.100
     libavformat    58. 20.100 / 58. 20.100
     libavdevice    58.  5.100 / 58.  5.100
     libavfilter     7. 40.101 /  7. 40.101
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  3.100 /  5.  3.100
     libswresample   3.  3.100 /  3.  3.100
     libpostproc    55.  3.100 / 55.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'wireframe-spendo.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2019-04-17T09:38:24.000000Z
       com.apple.quicktime.make: Apple
       com.apple.quicktime.model: iMac12,2
       com.apple.quicktime.software: Mac OS X 10.13.6 (17G6029)
       com.apple.quicktime.creationdate: 2019-04-17T11:37:00+0200
     Duration: 00:00:16.42, start: 0.000000, bitrate: 3170 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1476x1074 [SAR 1:1 DAR 246:179], 3163 kb/s, 60 fps, 60 tbr, 6k tbn, 12k tbc (default)
       Metadata:
         creation_time   : 2019-04-17T09:38:24.000000Z
         handler_name    : Core Media Video
         encoder         : H.264

    output terminal says :

    Invalid file index 1 in filtergraph description fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse.
  • Rails FFMPEG - convert to webm gives error for encoder 'libvpx-vp9'

    7 mai 2019, par Milind

    I am testing video conversion to convert video file into mp4 and webm.
    I have also setup ffmpeg and compiled properly.Mp4 conversion succeeds but webm breaks always complaining as -

    The encoder 'libvpx-vp9' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

    its strange as I aready have vp8 present -

    mike1011:~/workspace (s1) $ ffmpeg -encoders | grep -i vp
    ffmpeg version git-2016-03-29-bf1495d Copyright (c) 2000-2016 the FFmpeg developers
     built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
     configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
     libavutil      55. 19.100 / 55. 19.100
     libavcodec     57. 32.100 / 57. 32.100
     libavformat    57. 29.101 / 57. 29.101
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 40.102 /  6. 40.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    V..... libvpx               libvpx VP8 (codec vp8)
    V..X.. libvpx-vp9           libvpx VP9 (codec vp9)
    V..... wrapped_avframe      AVFrame to AVPacket passthrough
    A..... wavpack              WavPack

    my model..video.rb looks like -

    has_attached_file :video,
      :styles => {
         :mp4video => { :geometry => '1280x720>', :format => 'mp4',
           :convert_options => { :output => { :vcodec => 'libx264', :movflags => '+faststart',  :strict => :experimental} } },
         :webmvideo => { :geometry => '1280x720>', :format => 'webm',
           :convert_options => { :output => { :vcodec => 'libvpx-vp9'} } },
         :oggvideo => { :geometry => '1280x720>', :format => 'ogg',
           :convert_options => { :output => { :vcodec => 'libtheora',
             :acodec => 'libvorbis',  :strict => :experimental } } },
         screenshot: { geometry: '640x480#',  :convert_options => {
           :output => { :vframes => 1, :s => '300x169', :ss => '00:00:02'} } }
       },    
       :processors => [:transcoder],
        ###other setting comes here

     ##using delayed-paperclip for background processing of videos
     process_in_background :video

     def process_delayed!
       unless self.video.job_is_processing
         self.video.job_is_processing = true
         self.video.post_processing = true
         self.video.reprocess!
         self.video.job_is_processing = false
       end  
     end  

    I am sharing my complete output below(with error highlighted :)) -

       2.4.1 :003 > v=Video.find 25
         Video Load (1.8ms)  SELECT  "videos".* FROM "videos" WHERE "videos"."id" = $1 LIMIT 1  [["id", 25]]
        => #<video></video>mp4", video_file_size: 1105773, video_updated_at: "2019-02-02 00:17:37", duration: 18.112, slug: "sample320-mp4-dbb96526-5db1-4c59-9152-615fc077eca7", active: true, created_at: "2019-02-02 00:17:37", updated_at: "2019-02-02 00:17:37", video_processing: true>
       2.4.1 :004 > v.process_delayed!
       [paperclip] copying /videos/25/original/Sample320.mp4 to local file /tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4
       [paperclip] Trying to link /tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4 to /tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1qmn2uk.mp4
       I, [2019-02-03T00:12:09.849885 #677953]  INFO -- : Running transcoding...
       ["/usr/local/bin/ffmpeg", "-y", "-i", "/tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4", "-s", "360x240", "-aspect", "1.5", "/tmp/2f51a6ecbce019dcad28a46b5be980ec20190203-677953-rh2lh0.mp4"]

       I, [2019-02-03T00:12:16.060391 #677953]  INFO -- : Transcoding of /tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4 to /tmp/2f51a6ecbce019dcad28a46b5be980ec20190203-677953-rh2lh0.mp4 succeeded

       [paperclip] Trying to link /tmp/2f51a6ecbce019dcad28a46b5be980ec20190203-677953-rh2lh0.mp4 to /tmp/2961027361de4afbbb86f7764a034ee020190203-677953-1g0vvwe.mp4
       I, [2019-02-03T00:12:16.082499 #677953]  INFO -- : Running transcoding...
       ["/usr/local/bin/ffmpeg", "-y", "-i", "/tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4", "-s", "360x240", "-aspect", "1.5", "/tmp/2f51a6ecbce019dcad28a46b5be980ec20190203-677953-fv3pzs.webm"]

       E, [2019-02-03T00:12:16.202420 #677953] ERROR -- : Failed encoding...
       ["/usr/local/bin/ffmpeg", "-y", "-i", "/tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4", "-s", "360x240", "-aspect", "1.5", "/tmp/2f51a6ecbce019dcad28a46b5be980ec20190203-677953-fv3pzs.webm"]

       ffmpeg version git-2016-03-29-bf1495d Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
         configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3
         libavutil      55. 19.100 / 55. 19.100
         libavcodec     57. 32.100 / 57. 32.100
         libavformat    57. 29.101 / 57. 29.101
         libavdevice    57.  0.101 / 57.  0.101
         libavfilter     6. 40.102 /  6. 40.102
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1.mp4':
         Metadata:
           major_brand     : isom
           minor_version   : 512
           compatible_brands: isomiso2avc1mp41
           encoder         : Lavf57.76.100
         Duration: 00:00:18.11, start: 0.000000, bitrate: 488 kb/s
           Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 360x240 [SAR 32:27 DAR 16:9], 353 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
           Metadata:
             handler_name    : VideoHandler
           Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
           Metadata:
             handler_name    : SoundHandler

    XXXXXXXXXXXXXXXXXXXXXXXX====== HERE COMES THE ERROR========XXXXXXXXXXXX
       [libvpx-vp9 @ 0x3e3dec0] The encoder 'libvpx-vp9' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

       Errors: encoded file is invalid.

       Paperclip::Error: There was an error processing the transcoder for 6b5665997c56c12544e7069276f6660b20190203-677953-1jsw8d1
              ...
  • Render FFmpeg AVFrame as OpenGL texture ?

    5 mars 2019, par ZeroDefect

    I’m attempting to to render a jpeg image (1024x1024 pixels) in the form of an FFmpeg AVFrame as a texture in OpenGL. What I get instead is something that appears as a 1024x1024 dark green quad :

    dark green quad screenshot

    The code to render the AVFrame data in OpenGL is shown below. I have convinced myself that the raw RGB data held within the FFmpeg AVFrame data is not solely dark green.

    GLuint g_texture = {};

    //////////////////////////////////////////////////////////////////////////
    void display()
    {
       // Clear color and depth buffers
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
       glMatrixMode(GL_MODELVIEW);     // Operate on model-view matrix

       glEnable(GL_TEXTURE_2D);
       GLuint texture = g_texture;
       glBindTexture(GL_TEXTURE_2D, texture);

       // Draw a quad
       glBegin(GL_QUADS);
       glVertex2i(0, 0); // top left
       glVertex2i(1024, 0); // top right
       glVertex2i(1024, 1024); // bottom right
       glVertex2i(0, 1024); // bottom left
       glEnd();

       glDisable(GL_TEXTURE_2D);
       glBindTexture(GL_TEXTURE_2D, 0);

       glFlush();
    }

    /* Initialize OpenGL Graphics */
    void initGL(int w, int h)
    {
       glViewport(0, 0, w, h); // use a screen size of WIDTH x HEIGHT
       glEnable(GL_TEXTURE_2D);     // Enable 2D texturing

       glMatrixMode(GL_PROJECTION);     // Make a simple 2D projection on the entire window
       glOrtho(0.0, w, h, 0.0, 0.0, 100.0);
       glMatrixMode(GL_MODELVIEW);    // Set the matrix mode to object modeling
       //glTranslatef( 0, 0, -15 );

       glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
       glClearDepth(0.0f);
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the window
    }

    //////////////////////////////////////////////////////////////////////////
    int main(int argc, char *argv[])
    {
       std::shared_ptr<avframe> apAVFrame;
       if (!load_image_to_AVFrame(apAVFrame, "marble.jpg"))
       {
           assert(false);
           return 1;
       }

       // From here on out, the AVFrame is RGB interleaved
       // and is sized to 1,024 x 1,024 (power of 2).

       glutInit(&amp;argc, argv);
       glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
       glutInitWindowSize(1060, 1060);
       glutInitWindowPosition(0, 0);
       glutCreateWindow("OpenGL - Creating a texture");

       glGenTextures(1, &amp;g_texture);

       //glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
       glBindTexture(GL_TEXTURE_2D, g_texture);
       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, apAVFrame->width,
                    apAVFrame->height, 0, GL_RGB, GL_UNSIGNED_BYTE,
                    apAVFrame->data[0]);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); /* We will use linear interpolation for magnification filter */
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); /* We will use linear interpolation for minifying filter */

       initGL(1060, 1060);

       glutDisplayFunc(display);

       glutMainLoop();

       return 0;
    }
    </avframe>

    Environment :

    • Ubuntu 18.04
    • GCC v8.2

    EDIT : As per @immibis’ suggestion below, it all works when I change the rendering of the quad to :

    // Draw a quad
    glBegin(GL_QUADS);
    glTexCoord2f(0, 0);
    glVertex2i(0, 0); // top left
    glTexCoord2f(1, 0);
    glVertex2i(1024, 0); // top right
    glTexCoord2f(1, 1);
    glVertex2i(1024, 1024); // bottom right
    glTexCoord2f(0, 1);
    glVertex2i(0, 1024); // bottom left
    glEnd();