Recherche avancée

Médias (1)

Mot : - Tags -/artwork

Autres articles (82)

  • 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

  • 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

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

Sur d’autres sites (8737)

  • aacdec : don’t return frames without data

    12 mai 2015, par Andreas Cadhalpun
    aacdec : don’t return frames without data
    

    Since commit 676a395a aac->frame->data is not necessarily allocated at
    the end of aac_decode_frame_int if avctx->channels is 0.

    In this case a bogus frame without any data, but non-zero nb_samples is
    returned.

    Signed-off-by : Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/aacdec.c
  • How to put audio data in AVFrame for encode

    17 avril 2020, par easy_breezy

    I try to encode raw PCM sound to G711A and G711U and then decode it, with this codecs everything works fine because I can choose any value for AVCodecContext frame_size for encoding, but in case of Opus codec the AVCodecContext frame_size is equal to 120, so if I understood correctly if my input data array size is bigger than 120 then I need to do some kind of buffering and split my input data into several parts and then sequentially put it to AVFrame->data and pass the AVFrame to encoding.

    &#xA;&#xA;

    In result I get a very bad sound and I get this result not only when I use Opus codec but also in G711 if I set it's AVCodecContext frame_size to some value that will be less than size of my input data.

    &#xA;&#xA;

    So my question is : what it the correct way to encode input data if it's size if bigger than AVCodecContext frame_size ? Do I need to split my input data into some parts that <= AVCodecContext frame_size if so how should I do that ?

    &#xA;&#xA;

    At this moment my code looks like this :

    &#xA;&#xA;

    void encode(uint8_t *data, unsigned int length)&#xA;{&#xA;    int rawOffset = 0;&#xA;    int rawDelta = 0;&#xA;    int rawSamplesCount = frameEncode->nb_samples &lt;= length ? frameEncode->nb_samples : length;&#xA;&#xA;    while (rawSamplesCount > 0)&#xA;    {&#xA;        memcpy(frameEncode->data[0], &amp;data[rawOffset], sizeof(uint8_t) * rawSamplesCount);&#xA;&#xA;        encodeFrame();&#xA;&#xA;        rawOffset &#x2B;= rawSamplesCount;&#xA;        rawDelta = length - rawOffset;&#xA;        rawSamplesCount = rawDelta > frameEncode->nb_samples ? frameEncode->nb_samples : rawDelta;&#xA;    }&#xA;&#xA;    av_frame_unref(frameEncode);&#xA;}&#xA;&#xA;void encodeFrame()&#xA;{&#xA;    /* send the frame for encoding */&#xA;    int ret = avcodec_send_frame(contextEncoder, frameEncode);&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        LOGE(TAG, "[encodeFrame] avcodec_send_frame error: %s", av_err2str(ret));&#xA;        return;&#xA;    }&#xA;&#xA;    /* read all the available output packets (in general there may be any number of them) */&#xA;    while (ret >= 0)&#xA;    {&#xA;        ret = avcodec_receive_packet(contextEncoder, packetEncode);&#xA;        if (ret &lt; 0 &amp;&amp; ret != AVERROR(EAGAIN)) LOGE(TAG, "[encodeFrame] error in avcodec_receive_packet: %s", av_err2str(ret));&#xA;        if (ret &lt; 0) break;&#xA;        std::pair p = std::pair();&#xA;        p.first = (uint8_t *)(malloc(sizeof(uint8_t) * packetEncode->size));&#xA;        memcpy(p.first, packetEncode->data, (size_t)packetEncode->size);&#xA;        p.second = (unsigned int)(packetEncode->size);&#xA;&#xA;        listEncode.push_back(p); // place encoded data into list to finally create one array of encoded data from it&#xA;    }&#xA;    av_packet_unref(packetEncode);&#xA;}&#xA;

    &#xA;&#xA;

    You can see that I split my input data into several parts, then I put it in frame->data and then pass the frame to encoding but I'm not sure that is the correct way.

    &#xA;&#xA;

    UPD : I noticed that when I use G711 if I set AVCodecContext frame_size to 160 and size of my input data is 160 or 320 everething works fine, but if input data size is 640 then i get bad buzzing sound.

    &#xA;

  • Converting PCM-ALAW data to an audio file using ffmpeg

    8 septembre 2020, par bbdd

    In my project, I processed the received RTP packets with the payload, and extracted all the payload to a separate buffer. This payload is - PCM ALAW (Type 8). How do I implement a class that will take as arguments - the file name and a buffer with raw data to create an audio file. Exactly what steps do I have to go through in order to encode raw data into an audio file ? As an example, I used this example.

    &#xA;