Recherche avancée

Médias (91)

Autres articles (64)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

Sur d’autres sites (6091)

  • avutil/x86/pixelutils : Empty MMX state in ff_pixelutils_sad_8x8_mmxext

    1er novembre 2023, par Andreas Rheinhardt
    avutil/x86/pixelutils : Empty MMX state in ff_pixelutils_sad_8x8_mmxext
    

    We currently mostly do not empty the MMX state in our MMX
    DSP functions ; instead we only do so before code that might
    be using x87 code. This is a violation of the System V i386 ABI
    (and maybe of other ABIs, too) :
    "The CPU shall be in x87 mode upon entry to a function. Therefore,
    every function that uses the MMX registers is required to issue an
    emms or femms instruction after using MMX registers, before returning
    or calling another function." (See 2.2.1 in [1])
    This patch does not intend to change all these functions to abide
    by the ABI ; it only does so for ff_pixelutils_sad_8x8_mmxext, as this
    function can by called by external users, because it is exported
    via the pixelutils API. Without this, the following fragment will
    assert (on x86/x64) :
    uint8_t src1[8 * 8], src2[8 * 8] ;
    av_pixelutils_sad_fn fn = av_pixelutils_get_sad_fn(3, 3, 0, NULL) ;
    fn(src1, 8, src2, 8) ;
    av_assert0_fpu() ;

    [1] : https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/intel386-psABI-1.1.pdf

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavutil/x86/pixelutils.asm
  • Ffmpeg - transform mulaw 8000khz audio buffer data into valid bytes format

    24 décembre 2023, par Bob Lozano

    I'm trying to read a bytes variable using ffmpeg, but the audio stream I listen to, sends me buffer data in mulaw encoded buffer like this :

    &#xA;

    https://github.com/boblp/mulaw_buffer_data/blob/main/buffer_data

    &#xA;

    I'm having trouble running the ffmpeg_read function from the transformers library found here :

    &#xA;

    def ffmpeg_read(bpayload: bytes, sampling_rate: int) -> np.array:&#xA;"""&#xA;Helper function to read an audio file through ffmpeg.&#xA;"""&#xA;ar = f"{sampling_rate}"&#xA;ac = "1"&#xA;format_for_conversion = "f32le"&#xA;ffmpeg_command = [&#xA;    "ffmpeg",&#xA;    "-i",&#xA;    "pipe:0",&#xA;    "-ac",&#xA;    ac,&#xA;    "-ar",&#xA;    ar,&#xA;    "-f",&#xA;    format_for_conversion,&#xA;    "-hide_banner",&#xA;    "-loglevel",&#xA;    "quiet",&#xA;    "pipe:1",&#xA;]&#xA;&#xA;try:&#xA;    with subprocess.Popen(ffmpeg_command, stdin=subprocess.PIPE, stdout=subprocess.PIPE) as ffmpeg_process:&#xA;        output_stream = ffmpeg_process.communicate(bpayload)&#xA;except FileNotFoundError as error:&#xA;    raise ValueError("ffmpeg was not found but is required to load audio files from filename") from error&#xA;out_bytes = output_stream[0]&#xA;audio = np.frombuffer(out_bytes, np.float32)&#xA;if audio.shape[0] == 0:&#xA;    raise ValueError(&#xA;        "Soundfile is either not in the correct format or is malformed. Ensure that the soundfile has "&#xA;        "a valid audio file extension (e.g. wav, flac or mp3) and is not corrupted. If reading from a remote "&#xA;        "URL, ensure that the URL is the full address to **download** the audio file."&#xA;    )&#xA;return audio&#xA;

    &#xA;

    But everytime I get :

    &#xA;

    raise ValueError(&#xA;    "Soundfile is either not in the correct format or is malformed. Ensure that the soundfile has "&#xA;    "a valid audio file extension (e.g. wav, flac or mp3) and is not corrupted. If reading from a remote "&#xA;    "URL, ensure that the URL is the full address to **download** the audio file."&#xA;)&#xA;

    &#xA;

    If I grab any wav file I can do something like this :

    &#xA;

    import wave&#xA;&#xA;with open(&#x27;./emma.wav&#x27;, &#x27;rb&#x27;) as fd:&#xA;    contents = fd.read()&#xA;    print(contents)&#xA;

    &#xA;

    And running it through the function does work !

    &#xA;

    So my question would be :

    &#xA;

    How can I transform my mulaw encoded buffer data into a valid bytes format that works with ffmpeg_read() ?

    &#xA;

    EDIT : I've found a way using pywav (https://pypi.org/project/pywav/)

    &#xA;

    # 1 stands for mono channel, 8000 sample rate, 8 bit, 7 stands &#xA;for MULAW encoding&#xA;wave_write = pywav.WavWrite("filename.wav", 1, 8000, 8, 7)&#xA;wave_write.write(mu_encoded_data)&#xA;&#xA;wave_write.close()&#xA;

    &#xA;

    This is the result : https://github.com/boblp/mulaw_buffer_data/blob/main/filename.wav

    &#xA;

    the background noise is acceptable.

    &#xA;

    However, I want to use a FFMPEG instead to avoid creating a tmp file.

    &#xA;

  • avcodec/hashtable : Only free buffer if there is buffer to free

    3 juin, par Andreas Rheinhardt
    avcodec/hashtable : Only free buffer if there is buffer to free
    

    Reviewed-by : Emma Worley <emma@emma.gg>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/hashtable.c