Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (19)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

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

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (4622)

  • ffmpeg produced .wav reads only zeros with scipy.io.wavfile

    8 janvier 2015, par question_mark

    Hi everyone and thanks for reading.

    I wanted to do some analysis on a song using Python’s scipy.io.wavfile. Since I only have the song as .mp3 I converted the file to .wav using ffmpeg the following way :

    ffmpeg -i test.mp3 test.wav

    The .wav file plays perfectly well with vlc player, but wavfile shows only zeroes when reading it :

    from scipy.io import wavfile as wf

    data = wf.read("test.wav")
    C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.py:42: WavFileWarning: Unknown wave file format
     warnings.warn("Unknown wave file format", WavFileWarning)

    data
    (44100, array([[0, 0],
           [0, 0],
           [0, 0],
           ...,
           [0, 0],
           [0, 0],
           [0, 0]], dtype=int16))

    I tried getting the data with Python’s built-in wave module before to the same effect (only zeros).
    I am using the 64bit version of ffmpeg (ffmpeg-20140218-git-61d5970-win64-static).

    Any help is appreciated :-)

    Edit : Included .wav header and tried forcing ffmpeg output format

    I guess the header information of the .wav file is included here :

    ffmpeg -i .\test.wav
    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, wav, from '.\test.wav':
     Metadata:
       artist          : Joe Cocker
       copyright       : (C) 1987 Capitol Records, Inc.
       date            : 1987
       genre           : Pop
       title           : Unchain My Heart
       album           : Unchain My Heart
       track           : 1/10
       encoder         : Lavf55.33.100
     Duration: 00:05:04.33, bitrate: 1411 kb/s
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s

    If I try to specify the ffmpeg output format explicitly for the .mp3 conversion :

    ffmpeg -i .\test.mp3 -f s16le -ar 44100 -ac 2 test.wav
    Input #0, mp3, from '.\test.mp3':
     Metadata:
       title           : Unchain My Heart
       artist          : Joe Cocker
       album           : Unchain My Heart
       genre           : Pop
       composer        : Bobby Sharp
       track           : 1/10
       disc            : 1/1
       album_artist    : Joe Cocker
       copyright       : (C) 1987 Capitol Records, Inc.
       date            : 1987
     Duration: 00:05:04.35, start: 0.025056, bitrate: 240 kb/s
       Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 235 kb/s
       Stream #0:1: Video: mjpeg, yuvj420p(pc), 600x600 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
       Metadata:
         title           :
         comment         : Cover (front)
    Output #0, s16le, to 'test.wav':
     Metadata:
       title           : Unchain My Heart
       artist          : Joe Cocker
       album           : Unchain My Heart
       genre           : Pop
       composer        : Bobby Sharp
       track           : 1/10
       disc            : 1/1
       album_artist    : Joe Cocker
       copyright       : (C) 1987 Capitol Records, Inc.
       date            : 1987
       encoder         : Lavf55.33.100
       Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (mp3 -> pcm_s16le)
    Press [q] to stop, [?] for help
    video:0kB audio:52425kB subtitle:0 data:0 global headers:0kB muxing overhead 0.000000%
    size=   52425kB time=00:05:04.32 bitrate=1411.2kbits/s

    But in this case (forced format), both ffmpeg and wavfile are not able to read the file :

    ffmpeg -i .\test.wav
    .\test.wav: Invalid data found when processing input

    and

    data = wf.read("test2.wav")
    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    in <module>()
    ----> 1 data = wf.read("test2.wav")

    C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.pyc in read(filename, mmap)
       152
       153     try:
    --> 154         fsize = _read_riff_chunk(fid)
       155         noc = 1
       156         bits = 8

    C:\Program Files\Anaconda\lib\site-packages\scipy\io\wavfile.pyc in _read_riff_chunk(fid)
        98         _big_endian = True
        99     elif str1 != b'RIFF':
    --> 100         raise ValueError("Not a WAV file.")
       101     if _big_endian:
       102         fmt = '>I'

    ValueError: Not a WAV file.
    </module>
  • How do I make ffmpeg not open a window when used in Python (Discord Bot Youtube Audio Player Pytube)

    20 juin 2019, par Brandalf

    I am using pytube to create a Discord bot that gets audio from a YouTube video and plays it in the voice channel using the code below. The code works perfectly fine and does what I want which is playing audio from YouTube with a link. The issue is that it uses ffmpeg and when it does, it opens the ffmpeg.exe window. Having a window constantly pop up on my screen is kind of annoying but what’s worse is that if I am playing a game in full screen, when ffmpeg is run, it will tab out of my game. So I’m wondering if there is a way to prevent ffmpeg from opening the window or if there is an alternative to playing youtube audio in Discord with a bot that doesn’t use ffmpeg.

    user=ctx.message.author
    voice_channel=user.voice.voice_channel
    vc = await client.join_voice_channel(voice_channel)
    player = await vc.create_ytdl_player(videoLink)
    video = pafy.new(videoLink) #runs ffmpeg
    player.start()
  • Count frames in H.264 bitstream

    29 octobre 2018, par user500

    How to count/detect frames (pictures) in raw H.264 bitstream ? I know there are 5 VCL NALU types but I don’t know how to rec(k)ognize sequence of them as access unit. I suppose detect a frame means detect an access unit as access unit is

    A set of NAL units that are consecutive in decoding order and contain
    exactly one primary coded picture. In addition to the primary coded
    picture, an access unit may also contain one or more redundant coded
    pictures, one auxiliary coded picture, or other NAL units not
    containing slices or slice data partitions of a coded picture. The
    decoding of an access unit always results in a decoded picture.

    I want it to know what is the FPS of live stream out to server.