Recherche avancée

Médias (0)

Mot : - Tags -/api

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (74)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (7634)

  • waveforms arent as smooth as they should be

    25 mars 2019, par GROVER.

    So I’ve been trying to create a little clone of SoundClouds ’peaks’ waveform. I have noticed that their waveforms are a lot more streamlined
    compared to my sudden shifts in ’loudness’. The dynamic range between peaks never seems to be too steep, and they always represent the perceived loudness of each part of the track pretty well.


    Here’s an example :

    example

    Notice how all the ’drops’ are fairly distinguishable to the ’breakdowns’ in their waveform, but mine is all over the place (apart from the last drop and breakdown, which are kind of similar). There are some minor similarities, but the ’jaggedness’ is still very prominent even in those areas.

    I’m using wav2json as a peaks converter (which is run through the command line and programmed in C++). This is is an example of how I use it :

    /*
    *    --channels: mids and min
    *    --db-min (minimum level in dB to capture): -35dB
    *    --db-max (pretty self explanatory): 6dB
    *    -d: use logarithmic instead of linear scale
    *    -s (number of peaks to generate): 1800
    *    -o (output file): outputfile.json
    *    -p (precision of floats): 0
    *    -n: no header
    */
    exec("wav2json inputfile.wav -s 1800 --channels mid min -d --db-min -35 --db-max 6 -p 0 -o outputfile.json -n");

    $fp     = fopen($tmpOutput, "r");
    $json   = fread($fp, filesize($tmpOutput));
    // get mids and min from the generated peaks file
    $mid    = json_decode($json, true)["mid"];
    $min    = json_decode($json, true)["min"];
    fclose($fp);
    unlink($tmpOutput);

    /*
    *  from here I just combine each mid and min value together and divide by two
    *
    *  then I normalise all the peaks (instead of each value being between -0.293 to
    *  1.766(just as an example), it is between 0 and 100)
    */

    What I’m trying to figure out - and have been trying to for the last few months - is how to get each peak more streamlined and to have the dynamic range of each one look how it actually sounds.


    What I have tried :

    • ffmpeg eqing
    • actually eqing the highs and lows in a daw and then comparing waveforms
    • using various parameters for wav2json (db min and max, linear etc.)
    • using various compressors and multiband compressors on the track

    All help is appreciated,
    Cheers.

  • Although ffmpeg installed, unable to save mp4 file on disk

    2 janvier 2020, par yannis

    Although I have installed ffmpeg, matplotlib reports that MovieWriter ffmpeg is unavailable and the MP4 file created is empty.

    import numpy as np
    from matplotlib import pyplot as plt
    from matplotlib import animation

    # First set up the figure, the axis, and the plot element we want to animate
    fig = plt.figure()
    ax = plt.axes(xlim=(0, 2), ylim=(-2, 2))
    line, = ax.plot([], [], lw=2)

    # initialization function: plot the background of each frame
    def init():
       line.set_data([], [])
       return line,

    # animation function.  This is called sequentially
    def animate(i):
       x = np.linspace(0, 2, 1000)
       y = np.sin(2 * np.pi * (x - 0.01 * i))
       line.set_data(x, y)
       return line,

    # call the animator.  blit=True means only re-draw the parts that have changed.
    anim = animation.FuncAnimation(fig, animate, init_func=init,
                                  frames=200, interval=20, blit=True)

    # save the animation as an mp4.  This requires ffmpeg or mencoder to be
    # installed.  The extra_args ensure that the x264 codec is used, so that
    # the video can be embedded in html5.  You may need to adjust this for
    # your system: for more information, see
    # http://matplotlib.sourceforge.net/api/animation_api.html
    anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264'])

    plt.show()

    I have even added the line plt.switch_backend('TkAgg') proposed in another post, nothing changed. Here is my matplotlib :

    Name: matplotlib
    Version: 2.1.0
    Summary: Python plotting package
    Home-page: http://matplotlib.org

    my ffmpeg :

    Name: ffmpeg
    Version: 1.4
    Summary: ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]
    Home-page: https://github.com/jiashaokun/ffmpeg

    and my Python version :

    Python 3.6.5

    The error I get is :

    /usr/local/lib/python3.6/site-packages/matplotlib/animation.py:1218: UserWarning: MovieWriter ffmpeg unavailable
     warnings.warn("MovieWriter %s unavailable" % writer)

    This error has been reported many times on stackoverflow, each time the solution is either to install ffmpeg (mine is installed) or to add that extra line about the backend, which hasn’t changed anything for me.

    Curiously enough the plt.show()command works and I do preview an animation, but the only file format to save it is (nonanimated) PNG.

  • Why does my webm not work in Unity but others do ?

    5 avril 2019, par UserDude

    Ok Im just trying to play a transparent video in Unity and Im following http://mikebrinkerink.com/2018/04/05/preparing-a-video-with-alpha-channel-for-unity/ and other tutorials.

    Ive tried exporting as ProRes 444 with alpha and as Webm VP8, and using terminal ffmpeg commands. Yet when I drop the video into Unity it loads indefinitely and I have to force quit.

    My file is this : https://drive.google.com/file/d/1RhOvYfeaK1rEaKdlTNcJB9EBpz4xxjvw/view?usp=sharing

    And this one that I downloaded works fine : https://simpl.info/videoalpha/video/dancer1.webm

    Whats the difference/how can I get mine to work ?

    Log :

    ffmpeg -i my_clip_with_alpha.avi -vcodec vp8 -acodec libvorbis -pix_fmt yuva420p -metadata:s:v:0 alpha_mode=”1″ -auto-alt-ref 0 my_vp8_clip_with_alpha.webm​

    as the command (with my clip’s name)

    Then

    built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.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 '/Users/skylarthomas/Desktop/INSTRUCTIONS1_00000.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       creation_time   : 2019-03-27T00:19:30.000000Z
     Duration: 00:00:17.05, start: 0.000000, bitrate: 40959 kb/s
       Stream #0:0(eng): Video: prores (ap4h / 0x68347061), yuva444p10le(tv, bt709, progressive), 2215x1773, 40467 kb/s, SAR 1:1 DAR 2215:1773, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (default)
       Metadata:
         creation_time   : 2019-03-27T00:19:30.000000Z
         handler_name    : Apple Video Media Handler
         encoder         : Apple ProRes 4444
         timecode        : 00:00:00:00
       Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
       Metadata:
         creation_time   : 2019-03-27T00:19:30.000000Z
         handler_name    : Time Code Media Handler
         timecode        : 00:00:00:00
    Stream mapping:
     Stream #0:0 -> #0:0 (prores (native) -> vp8 (libvpx))
    Press [q] to stop, [?] for help
    [libvpx @ 0x7fe11701d600] v1.8.0
    Output #0, webm, to 'my_vp8_clip_with_alpha.webm':
     Metadata:
       major_brand     : qt  
       minor_version   : 537199360
       compatible_brands: qt  
       encoder         : Lavf58.20.100
       Stream #0:0(eng): Video: vp8 (libvpx), yuva420p, 2215x1773 [SAR 1:1 DAR 2215:1773], q=-1--1, 200 kb/s, 29.97 fps, 1k tbn, 29.97 tbc (default)
       Metadata:
         creation_time   : 2019-03-27T00:19:30.000000Z
         handler_name    : Apple Video Media Handler
         timecode        : 00:00:00:00
         alpha_mode      : ”1″
         encoder         : Lavc58.35.100 libvpx
       Side data:
         cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    frame=    2 fps=2.0 q=0.0 size=       1kB time=00:00:00.03 bitrate= 200.7kbits/sframe=    6 fps=3.7 q=0.0 size=       1kB time=00:00:00.16 bitrate=  40.6kbits/sframe=   10 fps=4.5 q=0.0 size=       1kB time=00:00:00.30 bitrate=  22.7kbits/s speedframe=   35 fps=2.9 q=0.0 size=       1kB time=00:00:01.13 bitrate=   6.0kbits/s speed=0.0934x