Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (21)

  • 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

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (4615)

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

    



    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.

    



    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;

  • How to modify SPS/PPS aka Codec Private data of a mkv file

    13 novembre 2019, par Minh Nghĩa

    I encode my clip in 5 parts (output is x265 in MKV), using -ss and -t to seek to cut position. Now mkvtoolnix refuses to merge the encoded files, warning that codec private data doesn't match.

    From this question in mkvtoolnix repo, I learned that the codec private data is encoded in PPS/SPS field of the file. I check the encoding settings from mediainfo, and found that all settings are the same, just one file has a different numa-pool argument. I think my files can still be merged.

    How can I edit SPS/PPS data to fool mkvmerge into merging my files ? Thanks !