Recherche avancée

Médias (91)

Autres articles (41)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8819)

  • Processing 3, video lib : could not load movie file Ubuntu

    19 novembre 2017, par Konstantin Pashennykh

    Don’t sample code video lib processing 3.3.6 on Ubuntu 16.04. File in both folder - with sketch and data folder. Previous Install gstreamer 0.10-ffmpeg (solved previous problem with not run lib) Any your idea ?
    P.S. Work on Windows 7

    import processing.video.*;

    Movie mov;

    void setup() {
     size(640, 360);
     background(0);
     mov = new Movie(this, "transit.mov");
     mov.loop();
    }

    void movieEvent(Movie movie) {
     mov.read();  
    }

    void draw() {    
     image(mov, 0, 0);

     float newSpeed = map(mouseX, 0, width, 0.1, 2);
     mov.speed(newSpeed);

     fill(255);
     text(nfc(newSpeed, 2) + "X", 10, 30);
    }

    Best Regards,
    Kos

  • create a movie in python [on hold]

    22 mai 2017, par masoud

    I have some files with names (’Den_car_resample’ +’sdf’+ str(n)+’.dat’) where n changes from 0 to 25. I wrote a code to read these files and plots the results.
    now I want to create a movie from these plots. at the end of the program, I used the avconv command to do that.
    but, unfortunately my code creates a movie but it is empty.
    I don’t know the reason exactly but I think, first, I have to define a frame to each plot and then create a movie.
    can anyone please tell me how can I define a frame and also the add bit_rate of the movie.

    import sys
    import subprocess  
    import sdf
    import numpy as np
    import matplotlib.pyplot as plt  
    import time
    import matplotlib.animation as Animation
    from matplotlib.font_manager import FontProperties
    fp = FontProperties('Symbola')

    ##################### information from EPOCH input.deck
    nx,ny= 1200, 1600
    xmin=-100e-6
    xmax = 110e-6
    ymin = -200e-6
    ymax = 200e-6
    X =np.linspace(xmin,xmax,nx)  
    Y =np.linspace(ymin,ymax,ny)

    #################
    for n in range(0,25):
     nstr = str(n)

    ######################..... reading Density of carbon
     filename ="Den_car_resample" +'_sdf_'+ str(n)+'.dat'

     with open(filename, 'rb') as f:                        
       data = np.fromfile(f, dtype='float64', count=nx*ny)  

     Den_car  = np.reshape(data, [ny, nx], order='F')
     Den_car= np.log10(Den_car)

     ######################  Display Carbon density

     fig = plt.imshow(Den_car,  extent=[X.min()*1e6, X.max()*1e6, Y.min()*1e6,Y.max()*1e6], vmin=24, vmax=29, cmap='brg', aspect='auto')
     plt.suptitle('Den_car')
     plt.title('sdf '+ str(n)+'; Time= '+str(n*50)+'ps',color='green', fontsize=15)
     plt.xlabel('x($\mu$m)')
     plt.ylabel('y($\mu$m)')
     plt.text(-80,-40,'Den_Carbon',color='red', fontsize=15)
     plt.colorbar()
     plt.savefig( 'fig%06d.png' % n, bbox_inches='tight')          

     plt.pause(.1)
     plt.clf()  
     plt.close()

     ######################  Create movie

     subprocess.call("avconv -framerate 1 -i fig%06d.png -c:v libx264 -profile:v high -crf 20".split())

    sys.exit()
  • Normalize video contrast to the full dynamic range with ffmpeg ?

    18 mai 2017, par Roofus

    The following ImageMagick command line normalizes the RGB channels of an image individually, so that in each channel, the smallest value maps to 0 and the largest value maps to 255 :

    convert fish.jpg -channel all -contrast-stretch 0.003x0.003% fish2.jpg

    fish.jpg
    fish2.jpg

    Is there an ffmpeg filter which can normalize the RGB channels of every individual frame of a video ?

    The only filter I can find is "histeq", which equalizes (flattens) rather than normalizes the contrast. I have applied it per RGB channel using variations on this command line :

    ffmpeg -i fish.jpg -vf "format=rgb24,extractplanes=r+g+b[r][g][b],[r]histeq=strength=.1[r2],[g]histeq=strength=.1[g2],[b]histeq=strength=.1[b2],[g2][b2][r2]mergeplanes=0x001020:gbrp" fish3.jpg

    but since it tries to flatten the histogram, it always gives a much different (unacceptable) result ; for example, the imgur image whose code is eHL51.jpg (not enough reputation for link).

    Based on this answer :
    video normalization with ffmpeg
    I have also tested -vf "scale=out_range=full" and -vf "pp=al:f" (see the log below) but in both cases the result fish3.jpg was unchanged from fish.jpg, so apparently nothing was done.

    C:\Users\Roofus\Desktop>ffmpeg -i fish.jpg -vf scale=out_range=full -color_range 2 -pix_fmt yuvj420p fish3.jpg
    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-
    avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libb
    luray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-l
    ibmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enabl
    e-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable
    -libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zli
    b
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Input #0, image2, from 'fish.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 3942 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 t
    bc
    [swscaler @ 0000000000442f60] deprecated pixel format used, make sure you did set range correctly
    Output #0, image2, to 'fish3.jpg':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 mjpeg
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=2.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=   5x
    video:23kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    C:\Users\Roofus\Desktop>fish3.jpg

    C:\Users\Roofus\Desktop>ffmpeg -i fish.jpg -vf "pp=al:f" -color_range 2 -pix_fmt yuvj420p fish3.jpg
    ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-
    avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libb
    luray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-l
    ibmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enabl
    e-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable
    -libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zli
    b
     libavutil      55. 34.101 / 55. 34.101
     libavcodec     57. 64.101 / 57. 64.101
     libavformat    57. 56.101 / 57. 56.101
     libavdevice    57.  1.100 / 57.  1.100
     libavfilter     6. 65.100 /  6. 65.100
     libswscale      4.  2.100 /  4.  2.100
     libswresample   2.  3.100 /  2.  3.100
     libpostproc    54.  1.100 / 54.  1.100
    Input #0, image2, from 'fish.jpg':
     Duration: 00:00:00.04, start: 0.000000, bitrate: 3942 kb/s
       Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 960x540 [SAR 96:96 DAR 16:9], 25 tbr, 25 tbn, 25 t
    bc
    File 'fish3.jpg' already exists. Overwrite ? [y/N] y
    [Parsed_pp_0 @ 0000000000321da0] This syntax is deprecated. Use '|' to separate the list items.
    Output #0, image2, to 'fish3.jpg':
     Metadata:
       encoder         : Lavf57.56.101
       Stream #0:0: Video: mjpeg, yuvj420p(pc), 960x540 [SAR 96:96 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.64.101 mjpeg
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
     Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
    Press [q] to stop, [?] for help
    frame=    1 fps=0.0 q=2.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=4.44x
    video:23kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    C:\Users\Roofus\Desktop>fish3.jpg