Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (71)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

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

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

Sur d’autres sites (6176)

  • avcodec/hashtable : Remove null statement

    3 juin, par Andreas Rheinhardt
    avcodec/hashtable : Remove null statement
    

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

    • [DH] libavcodec/hashtable.c
  • 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;