Recherche avancée

Médias (10)

Mot : - Tags -/wav

Autres articles (43)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (7242)

  • matplotlib ArtistAnimation returns a blank video

    28 mars 2017, par Mpaull

    I’m trying to produce an animation of a networkx graph changing over time. I’m using the networkx_draw utilities to create matplotlib figures of the graph, and matplotlib’s ArtistAnimation module to create an animation from the artists networkx produces. I’ve made a minimum reproduction of what I’m doing here :

    import numpy as np
    import networkx as nx
    import matplotlib.animation as animation
    import matplotlib.pyplot as plt

    # Instantiate the graph model
    G = nx.Graph()
    G.add_edge(1, 2)

    # Keep track of highest node ID
    G.maxNode = 2

    fig = plt.figure()
    nx.draw(G)
    ims = []

    for timeStep in xrange(10):

       G.add_edge(G.maxNode,G.maxNode+1)
       G.maxNode += 1

       pos = nx.drawing.spring_layout(G)
       nodes = nx.drawing.draw_networkx_nodes(G, pos)
       lines = nx.drawing.draw_networkx_edges(G, pos)

       ims.append((nodes,lines,))
       plt.pause(.2)
       plt.cla()

    im_ani = animation.ArtistAnimation(fig, ims, interval=200,            repeat_delay=3000,blit=True)
    im_ani.save('im.mp4', metadata={'artist':'Guido'})

    The process works fine while displaying the figures live, it produces exactly the animation I want. And it even produces a looping animation in a figure at the end of the script, again what I want, which would suggest that the animation process worked. However when I open the "im.mp4" file saved to disk, it is a blank white image which runs for the expected period of time, never showing any of the graph images which were showed live.

    I’m using networkx version 1.11, and matplotlib version 2.0. I’m using ffmpeg for the animation, and am running on a Mac, OSX 10.12.3.

    What am I doing incorrectly ?

  • ffmepg suddently stopped working

    30 octobre 2013, par jdartland

    Hi Im using ffmpeg jwplayer to handle my video uploads. It worked just fine untill I added a video upload to a new model. My video files gets uploaded to the database but i can't play them in my jwplayer. I also noticed that ffmpeg converts files to avi eaven though I've specifyed it in both of my models to convert files into flv.

    Here is my javascrip "error" :

    Error loading player:
    No playable sources found.

    My models, tabels and vews shuld work cus I haven't changed anything in my old working post module.

    Here is whats happening in the upload :

    Started PATCH "/posts/dsdsdsdsd" for 127.0.0.1 at 2013-10-30 15:37:53 +0100
    Processing by PostsController#update as HTML
     Parameters: {"utf8"=>"✓", "authenticity_token"=>"4Xp=", "post"=>{"title"=>"dsdsdsdsd", "content"=>"sdsdsdsdsd", "photo_delete"=>"0", "video_delete"=>"0", "video"=>#, @original_filename="Drossel_10bar__Pressure_inner_wall.avi", @content_type="video/x-msvideo", @headers="Content-Disposition: form-data; name=\"post[video]\"; filename=\"Drossel_10bar__Pressure_inner_wall.avi\"\r\nContent-Type: video/x-msvideo\r\n">}, "commit"=>"Update Post", "id"=>"dsdsdsdsd"}
     Admin Load (0.9ms)  SELECT "admins".* FROM "admins" WHERE "admins"."id" = 1 ORDER BY "admins"."id" ASC LIMIT 1
     Post Load (0.5ms)  SELECT "posts".* FROM "posts" WHERE "posts"."permalink" = 'dsdsdsdsd' ORDER BY created_at desc LIMIT 1
      (0.2ms)  BEGIN
    [paperclip] [ffmpeg] ffmpeg -i "/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt7.avi" 2>&1
    [paperclip] [ffmpeg] Command Success
    [paperclip] [ffmpeg] Making...
    [paperclip] [ffmpeg] Building Destination File: 'Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt7' + 'flv'
    [paperclip] [ffmpeg] Destination File Built
    [paperclip] [ffmpeg] Adding Geometry
    [paperclip] [ffmpeg] Extracting Target Dimensions
    [paperclip] [ffmpeg] Target Size is Available
    [paperclip] [ffmpeg] Keeping Aspect Ratio
    [paperclip] [ffmpeg] Resize
    [paperclip] [ffmpeg] Convert Options: 400x234
    [paperclip] [ffmpeg] Adding Format
    [paperclip] [ffmpeg] Adding Source
    [paperclip] [ffmpeg] Building Parameters
    [paperclip] [ffmpeg] -i :source -s 400x234 -y :dest
    Command :: ffmpeg -i '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt7.avi' -s 400x234 -y '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt720131030-6965-1fv54qn.flv'
    ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
     built on Apr  2 2013 17:02:36 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    Input #0, avi, from '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt7.avi':
     Metadata:
       encoder         : Lavf52.64.2
     Duration: 00:00:00.00, start: 0.000000, bitrate: -2147483 kb/s
       Stream #0.0: Video: mjpeg, yuvj422p, 1588x936, 15 tbr, 15 tbn, 15 tbc
    Incompatible pixel format 'yuvj422p' for codec 'flv', auto-selecting format 'yuv420p'
    [buffer @ 0xdcd280] w:1588 h:936 pixfmt:yuvj422p
    [scale @ 0xdcd7c0] w:1588 h:936 fmt:yuvj422p -> w:400 h:234 fmt:yuv420p flags:0x4
    Output #0, flv, to '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt720131030-6965-1fv54qn.flv':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: flv, yuv420p, 400x234, q=2-31, 200 kb/s, 1k tbn, 15 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    frame=  451 fps=118 q=2.2 Lsize=     962kB time=30.07 bitrate= 262.1kbits/s    
    video:955kB audio:0kB global headers:0kB muxing overhead 0.759673%
    [paperclip] [qtfaststart] :source :dest
    Command :: qt-faststart '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt720131030-6965-1fv54qn.flv' '/tmp/Drossel_10bar__Pressure_inner_wall20131030-6965-14cqqt720131030-6965-1fv54qn20131030-6965-1a8cksd.flv'
     Post Exists (0.7ms)  SELECT 1 AS one FROM "posts" WHERE ("posts"."title" = 'dsdsdsdsd' AND "posts"."id" != 37) LIMIT 1
     SQL (0.7ms)  UPDATE "posts" SET "video_file_name" = $1, "video_content_type" = $2, "video_file_size" = $3, "video_updated_at" = $4, "updated_at" = $5 WHERE "posts"."id" = 37  [["video_file_name", "Drossel_10bar__Pressure_inner_wall.avi"], ["video_content_type", "video/x-msvideo"], ["video_file_size", 41766866], ["video_updated_at", Wed, 30 Oct 2013 14:37:53 UTC +00:00], ["updated_at", Wed, 30 Oct 2013 14:37:57 UTC +00:00]]
      (102.0ms)  COMMIT
    Redirected to http://0.0.0.0:3000/posts/dsdsdsdsd
    Completed 302 Found in 4078ms (ActiveRecord: 105.0ms)


    Started GET "/posts/dsdsdsdsd" for 127.0.0.1 at 2013-10-30 15:37:57 +0100
    Processing by PostsController#show as HTML
     Parameters: {"id"=>"dsdsdsdsd"}
     Post Load (0.5ms)  SELECT "posts".* FROM "posts" WHERE "posts"."permalink" = 'dsdsdsdsd' ORDER BY created_at desc LIMIT 1
     Admin Load (0.4ms)  SELECT "admins".* FROM "admins" WHERE "admins"."id" = 1 ORDER BY "admins"."id" ASC LIMIT 1
     Rendered posts/show.html.erb within layouts/application (4.3ms)
    Completed 200 OK in 17ms (Views: 14.3ms | ActiveRecord: 0.9ms)
  • Error audio loading when runing Whisper Open AI model

    9 juin 2024, par John mick

    The problem I'm trying to solve is that I can't run Whisper model for some audio, it says something related to audio decoding.

    


    payload.wav: Invalid data found when processing input.
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e


    


    I tried using the micro-machines.wav and it works fine but when i used other audio it gives me an error.

    


    import whisper

model = whisper.load_model("base")
text=model.transcribe('micro-machines.wav',fp16=False)
print(text)
text=model.transcribe('payload.wav',fp16=False)
print(text)


    


    Error I'm getting for payload :

    


    d:\...\venv\lib\site-packages\whisper\transcribe.py:79: UserWarning: FP16 is not supported on CPU; using FP32 instead&#xA;  warnings.warn("FP16 is not supported on CPU; using FP32 instead")                                                                                        &#xA;Traceback (most recent call last):&#xA;  File "d:\...\venv\lib\site-packages\whisper\audio.py", line 42, in load_audio&#xA;    ffmpeg.input(file, threads=0)                                                                                    &#xA;  File "d:\...\venv\lib\site-packages\ffmpeg\_run.py", line 325, in run        &#xA;    raise Error(&#x27;ffmpeg&#x27;, out, err)                                                                                  &#xA;ffmpeg._run.Error: ffmpeg error (see stderr output for detail)                                                       &#xA;&#xA;The above exception was the direct cause of the following exception:&#xA;&#xA;Traceback (most recent call last):&#xA;  File "C:\....\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main&#xA;    return _run_code(code, main_globals, None,&#xA;  File "C:\.....\Python\Python39\lib\runpy.py", line 87, in _run_code&#xA;    exec(code, run_globals)&#xA;  File "D:\...\venv\Scripts\whisper.exe\__main__.py", line 7, in <module>&#xA;  File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 314, in cli&#xA;    result = transcribe(model, audio_path, temperature=temperature, **args)&#xA;  File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 85, in transcribe&#xA;    mel = log_mel_spectrogram(audio)&#xA;  File "d:\...\venv\lib\site-packages\whisper\audio.py", line 111, in log_mel_spectrogram&#xA;    audio = load_audio(audio)&#xA;  File "d:\...\venv\lib\site-packages\whisper\audio.py", line 47, in load_audio&#xA;    raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e&#xA;RuntimeError: Failed to load audio: ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enab&#xA;le-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxv&#xA;id --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf &#xA;--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libo&#xA;pencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enab&#xA;le-librubberband&#xA;  libavutil      58.  2.100 / 58.  2.100&#xA;  libavcodec     60.  3.100 / 60.  3.100&#xA;  libavformat    60.  3.100 / 60.  3.100&#xA;  libavdevice    60.  1.100 / 60.  1.100&#xA;  libavfilter     9.  3.100 /  9.  3.100&#xA;  libswscale      7.  1.100 /  7.  1.100&#xA;  libswresample   4. 10.100 /  4. 10.100&#xA;  libpostproc    57.  1.100 / 57.  1.100&#xA;payload.wav: Invalid data found when processing input&#xA;</module>

    &#xA;

    I tried searching for solutions and I found one which says It appears that the code failed to load the audio file for some reason and even failed to display that error because e.stderr did not contain a valid UTF-8 string

    &#xA;