Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (109)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

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

Sur d’autres sites (11186)

  • Using ffmpeg libraries to decode wav audio as PCM samples and display waveform

    26 septembre 2016, par Lorenzo Monni

    I’m using the ffmpeg libraries to process audio files.

    I need to decode .wav audio files to make some operations having their samples in an understandable format, i.e. decimal numbers comprised between [-1,1] as a normal audio waveform.

    I have written the code for decoding and it’s apparently working well, but when I see the decoded samples it seems something in the sample numbers translation went bad. I paste here only the part of code where I translate the samples from the audio frame in PCM 16 bits :

    while(av_read_frame(pFormatCtx, &apkt)>=0) {
       if(apkt.stream_index==audioStream->index)
       {

           // Try to decode the packet into a frame
           int frameFinished = 0;
           avcodec_decode_audio4(aCodecCtx, aFrame, &frameFinished, &apkt);
           int data_size = av_samples_get_buffer_size(&plane_size, aCodecCtx->channels,
                                                           aFrame->nb_samples,
                                                           aCodecCtx->sample_fmt, 1);
           // Some frames rely on multiple packets, so we have to make sure the frame is finished before
           // we can use it
           if (frameFinished)
           {
               for(int a=0;a < plane_size/sizeof(int16_t);a++)
               {
                   fprintf(fd,"%d\n",(int16_t*)aFrame->data[a]);

               }
           }
       }

       av_free_packet(&apkt);
    // Free the packet that was allocated by av_read_frame

    }

    Additional information and issues :

    • the sample_fmt in my allocated AVCodecContext is "AV_SAMPLE_FMT_S16" so the samples numbers should be 16bit signed binaries, I guess if translated in decimal format numbers comprised between -32768 and 32767 (I don’t remember how the problem of disparity between positives and negatives is solved). However when I decode them in int16_t I see much higher numbers that seem to fall in the 32bit signed format (but the file is in 16bit anyway). E.g., the max of my decoded audio (after int16_t translation) is 2044951012 ;

    • My .wav file has two channels, but I can’t access both two, if I use extended_data of the audio frame struct pointing to the second channel (index 1) the execution returns a segmentation fault. The same happens with the data pointer. I’m able to recover only one channel, from data[0].

    Here is how my audio file decoded with the aforementioned code and saved in a txt looks like :
    enter image description here

    Here is how the trend of the signal should look like :

    enter image description here

    If I play my decoded signal the sound shows some similarities with the original audio file, but with a lot of destructing artifacts in it.

    Final remarks : ffmpeg documentation and past questions of Stackoverflow are not working well to solve this problem.

  • Using ffmpeg libraries to decode wav audio as PCM samples

    25 septembre 2016, par Lorenzo Monni

    I’m using the ffmpeg libraries to process audio files.

    I need to decode .wav audio files to make some operations having their samples in an understandable format, i.e. decimal numbers comprised between [-1,1] as a normal audio waveform.

    I have written the code for decoding and it’s apparently working well, but when I see the decoded samples it seems something in the sample numbers translation went bad. I paste here only the part of code where I translate the samples from the audio frame in PCM 16 bits :

    while(av_read_frame(pFormatCtx, &apkt)>=0) {
       if(apkt.stream_index==audioStream->index)
       {

           // Try to decode the packet into a frame
           int frameFinished = 0;
           avcodec_decode_audio4(aCodecCtx, aFrame, &frameFinished, &apkt);
           int data_size = av_samples_get_buffer_size(&plane_size, aCodecCtx->channels,
                                                           aFrame->nb_samples,
                                                           aCodecCtx->sample_fmt, 1);
           // Some frames rely on multiple packets, so we have to make sure the frame is finished before
           // we can use it
           if (frameFinished)
           {
               for(int a=0;a < plane_size/sizeof(int16_t);a++)
               {
                   fprintf(fd,"%d\n",(int16_t*)aFrame->data[a]);

               }
           }
       }

       av_free_packet(&apkt);
    // Free the packet that was allocated by av_read_frame

    }

    Additional information and issues :

    • the sample_fmt in my allocated AVCodecContext is "AV_SAMPLE_FMT_S16" so the samples numbers should be 16bit signed binaries, I guess if translated in decimal format numbers comprised between -32768 and 32767 (I don’t remember how the problem of disparity between positives and negatives is solved). However when I decode them in int16_t I see much higher numbers that seem to fall in the 32bit signed format (but the file is in 16bit anyway). E.g., the max of my decoded audio (after int16_t translation) is 2044951012 ;

    • My .wav file has two channels, but I can’t access both two, if I use extended_data of the audio frame struct pointing to the second channel (index 1) the execution returns a segmentation fault. The same happens with the data pointer. I’m able to recover only one channel, from data[0].

    Here is how my audio file decoded with the aforementioned code and saved in a txt looks like :
    enter image description here

    Here is how the trend of the signal should look like :

    enter image description here

    If I play my decoded signal the sound shows some similarities with the original audio file, but with a lot of destructing artifacts in it.

    Final remarks : ffmpeg documentation and past questions of Stackoverflow are not working well to solve this problem.

  • Evolution #3740 : Constante _DUREE_COOKIE_CORRESPONDANCE

    5 mars 2016, par jluc -