Recherche avancée

Médias (1)

Mot : - Tags -/censure

Autres articles (43)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Possibilité de déploiement en ferme

    12 avril 2011, par

    MediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
    Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)

Sur d’autres sites (5345)

  • Articles de documentation à faire/modifier pour la prochaine version (0.2)

    16 novembre 2012

    Il va falloir faire beaucoup de changements dans la documentation pour la sortie de la prochaine version.

    De nouveaux plugins sont à documenter :

    • embed_doc

    La documentation d’anciens plugins est à modifier suite aux améliorations :

    • inscription3 ;
    • mediaspip_player ;

    MediaSPIP sera compatible avec plus de plugins, il faut les indiquer et expliquer les intéractions entre MediaSPIP et eux :

    • Intéractions avec les réseaux sociaux :
      • microblog ;
      • facebook ;
      • oembed ;

    Il y en a beaucoup d’autres (à ajouter en commentaire si vous en voyez).

  • Developers and vendors : Want a Matomo Hoodie ? Add a tag to the Matomo Open Source Tag Manager and this could be yours !

    7 juin 2018, par Matomo Core Team — Community, Development

    The Free Open Source Tag Manager is now available as a public beta on the Matomo Marketplace. Don’t know what a Tag Manager is ? Learn more here. In Short : It lets you easily manage all your third party JavaScript and HTML snippets (analytics, ads, social media, remarketing, affiliates, etc) through a single interface.

    Over the last few months we have worked on building the core for the Matomo Tag Manager which comes with a great set of features and a large set of pre-configured triggers and variables. However, we currently lack tags.

    This is where we need your help ! Together we can build a complete and industry leading open source tag manager.

    Tag examples include Google AdWords Conversion Tracking, Facebook Buttons, Facebook Pixels, Twitter Universal Website Tags, LinkedIn Insights.

    Are you a developer who is familiar with JavaScript and keen on adding a tag ? Or are you a vendor ? Don’t be shy, we appreciate any tags, even analytics related :) We have documented how to develop a new tag here, which is quite easy and straightforward. You may also need to understand a tiny bit of PHP but you’ll likely be fine even if you don’t (here is an example PHP file and the related JS file).

    As we want to ship the Matomo Tag Manager with as many tags as possible out of the box, we appreciate any new tag additions as a pull request on https://github.com/matomo-org/tag-manager.

    We will send out “Matomo Contributor” stickers that cannot be purchased anywhere for every contributor who contributes a tag within the next 3 months. As for the top 3 contributors… you’ll receive a Matomo hoodie ! Simply send us an email at hello@matomo.org after your tag has been merged. If needed, a draw will decide who gets the hoodies.

    FYI : The Matomo Tag Manager is already prepared to be handled in different contexts and we may possibly generate containers for Android and iOS. If you are keen on building the official Matomo SDKs for any of these mobile platforms, please get in touch.

  • How parse and decode H264 file with libav/ffmpeg ?

    12 août 2022, par isrepeat

    According to official documentations I try decode my test.mp4 with AV_CODEC_ID_H264.

    


    Of course I can do this with av_read_frame(), but how do it with av_parser_parse2() ?

    


    The problem occurs at avcodec_send_packet(...) at decode_nal_units(...) at ff_h2645_packet_split(...) [h264dec.c]

    


    extern "C" {&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;}&#xA;&#xA;//#define INBUF_SIZE 4096&#xA;#define INBUF_SIZE 256000&#xA;&#xA;void decode(AVCodecContext* dec_ctx, AVFrame* frame, AVPacket* pkt, const char* filename);&#xA;&#xA;int main(int argc, char** argv)&#xA;{&#xA;    const char* filename;&#xA;    const AVCodec* codec;&#xA;    AVFormatContext* formatCtx = NULL;&#xA;    AVCodecParserContext* parser;&#xA;    AVCodecContext* c = NULL;&#xA;    AVStream* videoStream = NULL;&#xA;    FILE* f;&#xA;    AVFrame* frame;&#xA;    uint8_t inbuf[INBUF_SIZE &#x2B; AV_INPUT_BUFFER_PADDING_SIZE];&#xA;    uint8_t* data;&#xA;    size_t   data_size;&#xA;    int ret;&#xA;    AVPacket* pkt;&#xA;&#xA;    filename = "D:\\test.mp4";&#xA;&#xA;    //if (avformat_open_input(&amp;formatCtx, filename, nullptr, nullptr) &lt; 0) {&#xA;    //    throw std::exception("Could not open source file");&#xA;    //}&#xA;&#xA;    //if (avformat_find_stream_info(formatCtx, nullptr) &lt; 0) {&#xA;    //    throw std::exception("Could not find stream information");&#xA;    //}&#xA;&#xA;    //videoStream = formatCtx->streams[0];&#xA;&#xA;&#xA;&#xA;    pkt = av_packet_alloc();&#xA;    if (!pkt)&#xA;        exit(1);&#xA;&#xA;    /* set end of buffer to 0 (this ensures that no overreading happens for damaged MPEG streams) */&#xA;    memset(inbuf &#x2B; INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);&#xA;&#xA;    /* find the MPEG-1 video decoder */&#xA;    //codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);&#xA;    codec = avcodec_find_decoder(AV_CODEC_ID_H264);&#xA;    if (!codec) {&#xA;        fprintf(stderr, "Codec not found\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    parser = av_parser_init(codec->id);&#xA;    if (!parser) {&#xA;        fprintf(stderr, "parser not found\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    parser->flags = PARSER_FLAG_COMPLETE_FRAMES;&#xA;&#xA;    c = avcodec_alloc_context3(codec);&#xA;    if (!c) {&#xA;        fprintf(stderr, "Could not allocate video codec context\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    /* For some codecs, such as msmpeg4 and mpeg4, width and height&#xA;       MUST be initialized there because this information is not&#xA;       available in the bitstream. */&#xA;&#xA;    //avcodec_parameters_to_context(c, videoStream->codecpar);&#xA;&#xA;       /* open it */&#xA;    if (avcodec_open2(c, codec, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Could not open codec\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    f = fopen(filename, "rb");&#xA;    if (!f) {&#xA;        fprintf(stderr, "Could not open %s\n", filename);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    frame = av_frame_alloc();&#xA;    if (!frame) {&#xA;        fprintf(stderr, "Could not allocate video frame\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    // ---- Use parser to get packets ----&#xA;    while (!feof(f)) {&#xA;        /* read raw data from the input file */&#xA;        data_size = fread(inbuf, 1, INBUF_SIZE, f);&#xA;        if (!data_size)&#xA;            break;&#xA;&#xA;        /* use the parser to split the data into frames */&#xA;        data = inbuf;&#xA;        while (data_size > 0) {&#xA;            ret = av_parser_parse2(parser, c, &amp;pkt->data, &amp;pkt->size, data, data_size, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);&#xA;            if (ret &lt; 0) {&#xA;                fprintf(stderr, "Error while parsing\n");&#xA;                exit(1);&#xA;            }&#xA;            data &#x2B;= ret;&#xA;            data_size -= ret;&#xA;&#xA;            if (pkt->size)&#xA;                decode(c, frame, pkt, outfilename);&#xA;        }&#xA;    }&#xA;&#xA;    // ---- Use FormatContext to get packets ----&#xA;    //  while (av_read_frame(fmt_ctx, pkt) == 0)&#xA;    //  {&#xA;    //      if (pkt->stream_index == AVMEDIA_TYPE_VIDEO) {&#xA;    //          if (pkt->size > 0)&#xA;    //              decode(cdc_ctx, frame, pkt, fp_out);&#xA;    //      }&#xA;    //  }&#xA;&#xA;    /* flush the decoder */&#xA;    decode(c, frame, NULL, outfilename);&#xA;&#xA;    fclose(f);&#xA;&#xA;    av_parser_close(parser);&#xA;    avcodec_free_context(&amp;c);&#xA;    av_frame_free(&amp;frame);&#xA;    av_packet_free(&amp;pkt);&#xA;&#xA;    return 0;&#xA;}&#xA;&#xA;void decode(AVCodecContext* dec_ctx, AVFrame* frame, AVPacket* pkt, const char* filename)&#xA;{&#xA;    char buf[1024];&#xA;    int ret;&#xA;&#xA;    ret = avcodec_send_packet(dec_ctx, pkt);&#xA;    if (ret &lt; 0) {&#xA;        char buff[255]{ 0 };&#xA;        std::string strError = av_make_error_string(buff, 255, ret);&#xA;        fprintf(stderr, "Error sending a packet for decoding\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    while (ret >= 0) {&#xA;        ret = avcodec_receive_frame(dec_ctx, frame);&#xA;        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)&#xA;            return;&#xA;        else if (ret &lt; 0) {&#xA;            fprintf(stderr, "Error during decoding\n");&#xA;            exit(1);&#xA;        }&#xA;&#xA;        printf("saving frame %3d\n", dec_ctx->frame_number);&#xA;        fflush(stdout);&#xA;        /* the picture is allocated by the decoder. no need to&#xA;           free it */&#xA;        // handle frame ...&#xA;    }&#xA;}&#xA;

    &#xA;