Recherche avancée

Médias (2)

Mot : - Tags -/rotation

Autres articles (41)

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

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

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

  • How to read a MP3 audio file into a numpy array / save a numpy array to MP3 ?

    15 juin 2021, par Basj

    Is there a way to read/write a MP3 audio file into/from a numpy array with a similar API to scipy.io.wavfile.read and scipy.io.wavfile.write :

    



    sr, x = wavfile.read('test.wav')
wavfile.write('test2.wav', sr, x)


    



     ?

    



    Note : pydub's AudioSegment object doesn't give direct access to a numpy array.

    



    PS : I have already read Importing sound files into Python as NumPy arrays (alternatives to audiolab), tried all the answers, including those which requires to Popen ffmpeg and read the content from stdout pipe, etc. I have also read Trying to convert an mp3 file to a Numpy Array, and ffmpeg just hangs, etc., and tried the main answers, but there was no simple solution. After spending hours on this, I'm posting it here with "Answer your own question – share your knowledge, Q&A-style". I have also read How to create a numpy array from a pydub AudioSegment ? but this does not easily cover the multi channel case, etc.

    


  • Does stream seek order matter for ffmpeg av_seek_frame() ?

    2 janvier 2019, par necrosato

    I am attempting to seek both audio and video streams for an mp4 using the ffmpeg av_seek_frame method.

    I have encountered an issue when seeking that I have remedied by changing my seek order, but would like to make sure my fix is actually a fix and not some coincidental hack that works.

    I am attempting to seek both the audio and video stream to the first packet. For video, the first packet has a pts of 0. For audio, the first packet has a pts of -1024. The video stream has an index of 0 and the audio stream has an index of 1. This has all been verified using ffprobe on the media file to view the packets and streams.

    The following code does not work, it seeks both the audio and video streams to packets with pts of 0 :

    for (int i = format_context->nb_streams - 1; i >= 0; --i) {
       AVStream* stream = format_context->streams[i];
       av_seek_frame(format_context, i, stream->first_dts, flags);
    }

    But this properly seeks the video stream to pts 0 and audio stream to pts -1024 :

    for (int i = 0; i < format_context->nb_streams; ++i) {
       AVStream* stream = format_context->streams[i];
       av_seek_frame(format_context, i, stream->first_dts, flags);
    }

    Note that in the first example, audio is seeked before video, and in the second example video is seeked before audio.

    Does the order of the av_seek_frame calls actually matter, or is there a bug somewhere else in my code that this just so happens to cover up ?

  • HTML5 Video plays on macOS safari, not iOS Safari

    8 février 2019, par BenJ

    Everything seems to work in Safari and Chrome on the desktop. But iOS is not cooperating.

    Here’s how I encoded the video :

    ffmpeg -an -i orig.mp4 -vcodec libx264 -crf 30 -maxrate 900 -pix_fmt yuv420p -profile:v baseline -level 3 homepage.mp4

    Here’s my html :

    <video playsinline="playsinline" muted="muted" autoplay="autoplay" loop="loop" src="/assets/videos/homepage.mp4" type="video/mp4"></video>

    Here’s my css :

    video {
       position: fixed;
       top: 50%;
       left: 50%;
       min-width: 100%;
       min-height: 100%;
       width: auto;
       height: auto;
       z-index: -100;
       transform: translateX(-50%) translateY(-50%);
       background-size: cover;
       transition: 1s opacity;
    }

    If you’d like to see for yourself : 2606southave.com