Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (46)

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

  • Qu’est ce qu’un masque de formulaire

    13 juin 2013, par

    Un masque de formulaire consiste en la personnalisation du formulaire de mise en ligne des médias, rubriques, actualités, éditoriaux et liens vers des sites.
    Chaque formulaire de publication d’objet peut donc être personnalisé.
    Pour accéder à la personnalisation des champs de formulaires, il est nécessaire d’aller dans l’administration de votre MediaSPIP puis de sélectionner "Configuration des masques de formulaires".
    Sélectionnez ensuite le formulaire à modifier en cliquant sur sont type d’objet. (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    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 (...)

Sur d’autres sites (5430)

  • iPhone ffmpeg dev using libav to decode from AMR to ACC codec

    10 octobre 2011, par VictorT

    It seems to be that, the AMR support of AudioQueue has been disappeared since iOS 4.3 was released. I can't use audio frame received from RSTP server with old way :

    audioFormat.mFormatID = kAudioFormatAMR;
    int err = AudioQueueNewOutput(&audioFormat, MyAudioQueueOutputCallback, self, NULL, kCFRunLoopCommonModes, 0, &audioQueue);

    As a result I received an error in last string.

    Maybe someone know how to decode AMR AVPacket into raw buffer and encode it with AAC or MP3 using LIBAV ?

    I've tried to use

    avcodec_decode_audio3

    It works and I can get raw buffer but when I'm trying to encode it with

    avcodec_encode_audio

    I get 0 as result

    This is my method to encode buffer :

    - (AVPacket) encodeRawFrame:(const short *) in_buffer withSize:(unsigned int) in_buf_byte_size
    {
       AVPacket res;
       AVCodec *codec;
       AVCodecContext *c= NULL;
       int count, out_size, outbuf_size, frame_byte_size;
       uint8_t *outbuf;

       avcodec_init();
       avcodec_register_all();

       printf("Audio encoding\n");

       codec = avcodec_find_encoder(CODEC_ID_AAC);
       if (!codec) {
           fprintf(stderr, "codec not found\n");
           return res;
       }

       c= avcodec_alloc_context();

       c->bit_rate = 64000;
       c->sample_rate = 24000;
       c->channels = 2;

       if (avcodec_open(c, codec) < 0)
       {
           fprintf(stderr, "could not open codec\n");
       }
       else
       {
           frame_byte_size=c->frame_size*2*2;
           count = in_buf_byte_size/frame_byte_size;

           fprintf(stderr, "Number of frames: %d\n", count);

           outbuf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
           outbuf = (uint8_t*) malloc(outbuf_size);

           out_size = avcodec_encode_audio(c, outbuf, outbuf_size, &in_buffer[frame_byte_size*i]);
           if(out_size >= 0)
           {
               res.size = outbuf_size;
               res.data = malloc(outbuf_size);                
           }

           free(outbuf);
       }


       avcodec_close(c);
       av_free(c);
       return res;
    }

    After encoding "out_size" is always 0 and result buffer is empty.

    Thanks.

  • Iphone Streaming and playing Audio Problem

    20 août 2011, par KayKay

    I am trying to make an app that plays audio stream using ffmpeg, libmms.
    I can open mms server, get stream, and decode audio frame to raw frame using suitable codec.
    However I don't know how to do next.
    I think I must use AudioToolbox/AudioToolbox.h and make audioqueue.
    but however when I give audioqueuebuffer decode buffer's memory and play, Only plays the white noise.
    Here is my code.

    What am i missing ?
    Any comment and hint is very appreciated.
    Thanks very much.

    while(av_read_frame(pFormatCtx, &pkt)>=0)
    {
       int pkt_decoded_len = 0;
       int frame_decoded_len;
       int decode_buff_remain=AVCODEC_MAX_AUDIO_FRAME_SIZE * 5;
       if(pkt.stream_index==audiostream)
       {
           frame_decoded_len=decode_buff_remain;
           int16_t *decode_buff_ptr = decode_buffer;
           int decoded_tot_len=0;
           pkt_decoded_len = avcodec_decode_audio2(pCodecCtx, decode_buff_ptr, &frame_decoded_len,
                                                   pkt.data, pkt.size);
           if (pkt_decoded_len <0) break;
           AudioQueueAllocateBuffer(audioQueue, kBufferSize, &buffers[i]);
           AQOutputCallback(self, audioQueue, buffers[i], pkt_decoded_len);

           if(i == 1){
               AudioQueueSetParameter(audioQueue, kAudioQueueParam_Volume, 1.0);
               AudioQueueStart(audioQueue, NULL);
           }
           i++;
       }
    }


    void AQOutputCallback(void *inData, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer, int copySize)
    {
       mmsDemoViewController *staticApp = (mmsDemoViewController *)inData;
       [staticApp handleBufferCompleteForQueue:inAQ buffer:inBuffer size:copySize];
    }

    - (void)handleBufferCompleteForQueue:(AudioQueueRef)inAQ
                             buffer:(AudioQueueBufferRef)inBuffer
                               size:(int)copySize
    {
       inBuffer->mAudioDataByteSize = inBuffer->mAudioDataBytesCapacity;
       memcpy((char*)inBuffer->mAudioData, (const char*)decode_buffer, copySize);

       AudioQueueEnqueueBuffer(inAQ, inBuffer, 0, NULL);
    }
  • Revert "swscale : disable ARM code until its build failure with clang/iphone is fixed"

    12 janvier 2014, par Michael Niedermayer
    Revert "swscale : disable ARM code until its build failure with clang/iphone is fixed"
    

    This reverts commit c8c7736c1025bcf5bb27e104a0d0eae749408739.

    • [DH] libswscale/arm/Makefile
    • [DH] libswscale/swscale_unscaled.c