Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (105)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (7370)

  • aarch64 : Use .data.rel.ro for const data with relocations

    16 novembre 2014, par Martin Storsjö
    aarch64 : Use .data.rel.ro for const data with relocations
    

    This reverts commit c00365b46d464ce47716315c1801818d811bdb9a
    in addition to using a different section.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavcodec/aarch64/fft_neon.S
    • [DH] libavcodec/aarch64/opus_imdct_neon.S
    • [DH] libavutil/aarch64/asm.S
  • How to convert mp3 data to wav data ?

    12 mai 2023, par Yali

    I have a wav audio file and i extracted data from that wav using python pydub module and i got this data

    &#xA;

    [-139 18 -215 34 -196 6 -295 -31 -301 -35 -211 13 -93 47&#xA;-60 39 -58 7 -17 2]

    &#xA;

    (this is first 10 data i got more than 1 million data)

    &#xA;

    from pydub import AudioSegment&#xA;import numpy as np&#xA;&#xA;song = AudioSegment.from_file("test.wav")&#xA;extract_data = np.array(song.get_array_of_samples())&#xA;print(extract_data[:10])&#xA;

    &#xA;

    then i converted wav to mp3 using that module and again extracted data from mp3 file and i got this data

    &#xA;

    [-108 7 -193 24 -223 11 -239 -31 -248 -43 -203 -10 -101 23&#xA;-14 24 10 15 24 16]

    &#xA;

    (this is first 10 data i got more than 1 million data)

    &#xA;

    song = AudioSegment.from_file("test.wav")&#xA;song.export("test.mp3")&#xA;mp3_song = AudioSegment.from_file("test.mp3")&#xA;extract_data = np.array(mp3_song.get_array_of_samples())&#xA;print(extract_data[:10])&#xA;

    &#xA;

    and again i converted mp3 to wav now i got mp3 data instead of wav data.

    &#xA;

    mp3_song = AudioSegment.from_file("test.mp3")&#xA;mp3_song.export("test1.wav", format="wav")&#xA;&#xA;song = AudioSegment.from_file("test1.wav")&#xA;extract_data = np.array(song.get_array_of_samples())&#xA;print(extract_data[:10])&#xA;

    &#xA;

    My point is how to convert mp3 data to original wav data ?

    &#xA;

    please help me,

    &#xA;

    Thanks.

    &#xA;

  • convert pcm stream data to encoded aac data

    24 décembre 2019, par Kumar

    I tried to convert pulse-audio pcm stream data to aac encoded data using ffmpeg.
    But after encoding I get noise-full data, not the correct one. Here I post my code, anyone help me with some ideas.

    Initial configuration :

       av_register_all();

       int error;
       if ((error = avio_open(&amp;output_io_context,"out.aac",AVIO_FLAG_WRITE))&lt;0) {
               printf("could not open output file\n");
       }

       if (!(output_format_context = avformat_alloc_context())) {
               printf("output_format_context error\n");
       }

       output_format_context->pb = output_io_context;

       if(!(output_format_context->oformat = av_guess_format(NULL, "out.aac", NULL))) {
               printf("guess format error\n");
       }

       codec = avcodec_find_encoder(AV_CODEC_ID_AAC);
       if (codec == NULL) {
               printf("avcodec_find_encoder: ERROR\n");
       }

       if (!(stream = avformat_new_stream(output_format_context, NULL))) {
               printf("stream create error\n");
       }
       output_codec_context = avcodec_alloc_context3(codec);
       if(!output_codec_context) {
               printf("output_codec_context is null\n");
       }

       output_codec_context->channels       = CHANNELS;
       output_codec_context->channel_layout = av_get_default_channel_layout(CHANNELS);
       output_codec_context->sample_rate    = SAMPLE_RATE; //input_codec_context->sample_rate;
       output_codec_context->sample_fmt     = codec->sample_fmts[0];
       output_codec_context->bit_rate       = 48000; //OUTPUT_BIT_RATE;

       stream->time_base.den = SAMPLE_RATE;//input_codec_context->sample_rate;
       stream->time_base.num = 1;

       if(output_format_context->oformat->flags &amp; AVFMT_GLOBALHEADER)
               output_codec_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

       if ((error = avcodec_open2(output_codec_context, codec, NULL)) &lt; 0) {
           printf("error");
       }

       error = avcodec_parameters_from_context(stream->codecpar, output_codec_context);

       if (write_output_file_header(output_format_context)) {
               printf("write header failure...\n");
       }

    Data encoding :

    AVFrame *output_frame;
    int frame_pos = 0, ctx_frame_size = output_codec_context->frame_size;
    int size = av_samples_get_buffer_size(NULL, CHANNELS,
                 output_codec_context->frame_size,output_codec_context->sample_fmt, 1);
    if((x =  avcodec_fill_audio_frame(output_frame, CHANNELS,
                  output_codec_context->sample_fmt, data, length, 1)) &lt; 0) {
         printf("avcodec_fill_audio_frame error : %s\n", av_err2str(x));
    }

    int data_written;
    if (encode_audio_frame(output_frame, output_format_context,
               output_codec_context, &amp;data_written)) {
           printf("encode_audio_frame error\n");
     }

     av_frame_free(&amp;output_frame);

    helper_function :

    int encode_audio_frame(AVFrame *frame,AVFormatContext *output_format_context,
                 AVCodecContext *output_codec_context, int *data_present)
    {
      AVPacket output_packet;
      int error;
      init_packet(&amp;output_packet);

      if (frame) {
         frame->pts = pts;
         pts += frame->nb_samples;
      }

      error = avcodec_send_frame(output_codec_context, frame);
      if (error == AVERROR_EOF) {
        error = 0;
        goto cleanup;
      } else if (error &lt; 0) {
         fprintf(stderr, "Could not send packet for encoding (error '%s')\n",
               av_err2str(error));
         return error;
      }

      error = avcodec_receive_packet(output_codec_context, &amp;output_packet);
      if (error == AVERROR(EAGAIN)) {
        error = 0;
        goto cleanup;
      } else if (error == AVERROR_EOF) {
         error = 0;
         goto cleanup;
      } else if (error &lt; 0) {
         fprintf(stderr, "Could not encode frame (error '%s')\n",
               av_err2str(error));
         goto cleanup;
      } else {
         *data_present = 1;
     }

     if (*data_present &amp;&amp;
         (error = av_write_frame(output_format_context, &amp;output_packet)) &lt; 0) {
         fprintf(stderr, "Could not write frame (error '%s')\n",
                av_err2str(error));
         goto cleanup;
     }

     cleanup:
         av_packet_unref(&amp;output_packet);
         return error;
    }
    • Do we need to fill AVFrame with sizeof(av_samples_get_buffer_size) or context->frame_size ?

    TYIA :) !!