Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (104)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

Sur d’autres sites (10946)

  • Animation speed adjustment using ffmpeg in Python

    5 novembre 2015, par neither-nor

    I’m been for years using stock ffmpeg script to sequentially snitch together temporal plots in Python. However, I cannot figure out the trivial issue of how to, for instance, slow down the animation speed so that the resultant video file has a longer duration.

    Example :

    import matplotlib.pyplot as plt
    import os, sys

    for t in range(100):
       plt.cla()
       plt.text(0.5, 0.5, 'time %02d'%(t+1))
       plt.draw()

       fname = '_tmp%02d.png'%(t+1)
       plt.savefig(fname)

    os.system("ffmpeg -i _tmp%02d.png -pix_fmt yuv420p -r 20 -b:v 20M flipbook.mp4")
    os.system("rm _tmp*.png")    

    The resulting "flip book" takes 4s and the time stamp increases steadily. However, I tried to make the animation last twice as long by testing the following :

    1. Change 20 after -r to 1 : this still lasts 4s but now the time stamp "leaps" nonlinearly

    2. Change 20M to 1M : no discernible effect

    I can’t find much information about this line of code, either the usage of each flag or how to modify aspects of it (e.g.,speed).

  • Extracting video frame image with libavformat and libswscale gives flipped image

    21 novembre 2015, par ivan.ukr

    I am using following code to extract image frames outputted by avcodec_decode_video2() into BMP file :

    // Convert the image from its native format to RGB
    int height = sws_scale(state.sws_ctx,
                (uint8_t const * const *)state.frame->data,
                state.frame->linesize,
                0,
                state.video_codec_ctx->height,
                state.picture.data,
                state.picture.linesize);

    // ..... here BMP header initialization goes ...

    // Extract pixels
    {
       int y = 0;
       size_t frame_line_size = state.picture.linesize[0];
       uint8_t* bmp_data = &bmp->data[0];
       uint8_t* picture_data = state.picture.data[0];
       while(y < height)
       {
           memcpy(bmp_data, picture_data, image_line_size);
           bmp_data += image_line_size_with_padding;
           picture_data += frame_line_size;
           ++y;
       }
    }

    But it results flipped image :

    Resulting BMP image

    Can anyone please help me to understand, what I am doing wrong here ?

    Video stream information :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testdata/video3.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       creation_time   : 1970-01-01 00:00:00
       title           : video3.mp4
       encoder         : Lavf52.78.3
     Duration: 00:00:07.93, start: 0.000000, bitrate: 1467 kb/s
       Stream #0.0(und): Video: h264 (High), yuv420p, 640x320 [PAR 1:1 DAR 2:1], 1331 kb/s, 29.73 fps, 29.73 tbr, 29734 tbn, 59.47 tbc
       Metadata:
         creation_time   : 1970-01-01 00:00:00
       Stream #0.1(und): Audio: aac, 48000 Hz, stereo, fltp, 127 kb/s
       Metadata:
         creation_time   : 1970-01-01 00:00:00
    Video file 'testdata/video3.mp4' has 236 frames.

    I have alternate code that uses libopencv, and it gives correct image from the same video file, but I need to reach the correct effect using directly ffmpeg libs.

    Correct image established from the same video file via libopencv

  • mp4,m4v vidoes not play on firefox

    20 novembre 2015, par Waqas Ahad

    Using paperclip-ffmpeg for video uploading in Rails.
    It plays on Chrome but not on Firefox and throws :

    Video format or MIME type is not supported

    I have this code in my model :

    has_attached_file :videod, :styles => {
                           medium => { :geometry => "640x480", :format => 'mp4' },
                          :thumb => { :geometry => "100x100#", :format => 'jpg', :time => 10 }
    }, :processors => [:ffmpeg]
    validates_attachment_size :videod, :less_than => 100.megabytes
    validates_attachment_presence :videod
    validates_attachment_content_type :videod, :content_type => /\Avideo\/.*\Z/

    I also installed ubuntu-restricted-extras which was required to play it on firefox.

    Result of ffprobe :

    ffprobe version 2.4.3-1ubuntu1~trusty6 Copyright (c) 2007-2014 the FFmpeg developers
    built on Nov 22 2014 17:07:19 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
    configuration: --prefix=/usr --extra-version='1ubuntu1~trusty6' --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags= --libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-opengl --enable-x11grab --enable-libxvid --enable-libx265 --enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-frei0r --enable-libx264 --enable-libsoxr --enable-openal --enable-libopencv
     libavutil      54.  7.100 / 54.  7.100
     libavcodec     56.  1.100 / 56.  1.100
     libavformat    56.  4.101 / 56.  4.101
     libavdevice    56.  0.100 / 56.  0.100
     libavfilter     5.  1.100 /  5.  1.100
     libavresample   2.  1.  0 /  2.  1.  0
     libswscale      3.  0.100 /  3.  0.100
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  0.100 / 53.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SampleVideo_360x240_2mb.mp4':
    Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf53.24.2
    Duration: 00:00:26.80, start: 0.000000, bitrate: 626 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 239 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
     creation_time   : 1970-01-01 00:00:00
     handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
    Metadata:
     creation_time   : 1970-01-01 00:00:00
     handler_name    : SoundHandler

    After ffmpeg -i :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'SampleVideo_360x240_2mb.mp4':
    Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf53.24.2
    Duration: 00:00:26.80, start: 0.000000, bitrate: 626 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 239 kb/s, 15 fps, 15 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
     creation_time   : 1970-01-01 00:00:00
     handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
    Metadata:
     creation_time   : 1970-01-01 00:00:00
     handler_name    : SoundHandler