Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (64)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, 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 (...)

  • 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

Sur d’autres sites (6168)

  • ffmpeg returns "Invalid data found when processing input" when creating RTSP stream from H.264

    22 mars 2019, par Ahm23

    I’m trying to create an RTSP stream from an H.264 source on Ubuntu using ffmpeg, however, I keep getting the error prompt "Invalid data found when processing input". I’m working on an AWS DeepLens.

    There seem to be some solutions on the internet for similar problems but none of them seem to be working.

    Executed Command :

    ffmpeg -loglevel error -re -f concat -safe 0 -i /opt/awscam/out/ch1_out.h264 -c:v copy -flags +global_header -rtsp_transport tcp -f rtsp "RTSP"

    Where "RTSP" is the rtsp path/url.

  • libav C++ sw_scale returns variable byte size of BGR24 buffer

    6 mars 2021, par igor

    I'm trying to convert my local /dev/video0 cam to BGR24 format. It works if I resize the image (although not 100% of the time, more like 85% of the time), but I'd like to keep the same size as input video.

    


    I initialize BGR image like so including the sws context :

    


    AVPixelFormat outputPixFormat = AV_PIX_FMT_BGR24;

    AVFrame* pFrameBGR = av_frame_alloc();
    pFrameBGR->width = decoder->video_codec_context->width;
    pFrameBGR->height = decoder->video_codec_context->height;
    pFrameBGR->format = outputPixFormat;

    int alloRet = av_image_alloc(pFrameBGR->data, pFrameBGR->linesize, decoder->video_codec_context->width, decoder->video_codec_context->height, outputPixFormat, 1);
    if (alloRet < 0) {
        logging("failed to allocate image");
        return -1;
    }

    struct SwsContext *sws_ctx = NULL;

    sws_ctx = sws_getContext(decoder->video_codec_context->width,
    decoder->video_codec_context->height,
    decoder->video_codec_context->pix_fmt,
    decoder->video_codec_context->width,
    decoder->video_codec_context->height,
    outputPixFormat,
    SWS_DIRECT_BGR,
    0,
    0,
    0
    );


    


    This is the portion of my decoding loop :

    


    int response = avcodec_send_packet(pCodecContext, pPacket);
    if (response < 0) {
        logging("Error while sending a packet to decoder: %s", av_err2str(response));
        return response;
    }

    while (response >= 0) {
        response = avcodec_receive_frame(pCodecContext, pFrame);
         if (response == AVERROR(EAGAIN) || response == AVERROR_EOF) {
            break;
        } else if (response < 0) {
            logging("Error while receiving a frame from the decoder: %s", av_err2str(response));
            return response;
        }
        if (response >= 0) {

            sws_scale(sws_ctx,  (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecContext->height, pFrameBGR->data, pFrameBGR->linesize);



    


    THe question is how to copy the plane of AVFrame into a buffer :

    


      size_t rgb_size = av_image_get_buffer_size(AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);

    uint8_t *dst_data;
    dst_data = (uint8_t *)(av_malloc(rgb_size));

    av_image_copy_to_buffer(dst_data, rgb_size, (const uint8_t* const *)bgrFrame->data, bgrFrame->linesize, AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);



    


    If I try to save to file the BGR image is correctly copied :

    


    char filebuf[256];
snprintf(filebuf, sizeof filebuf, "%s%d%s", "out_", pPacket->dts, ".rgb");
std::FILE *output=fopen(filebuf,"wb+");  

fwrite(bgrFrame->data[0],(pFrame->width)*(pFrame->height)*3,1,output);  
std::fclose(output);


    


    So it looks like my copy to buffer function is faulty, but I can figure out what's wrong with it :

    


      uint8_t *dst_data;
    dst_data = (uint8_t *)(av_malloc(rgb_size));

    av_image_copy_to_buffer(dst_data, rgb_size, (const uint8_t* const *)bgrFrame->data, bgrFrame->linesize, AV_PIX_FMT_BGR24, bgrFrame->width, bgrFrame->height, 1);


    


  • Revision 2901bf2d00 : Reducing the number of recursive calls. Both decode_modes_sb and decode_modes_b

    30 octobre 2013, par Dmitry Kovalev

    Changed Paths :
     Modify /vp9/decoder/vp9_decodframe.c



    Reducing the number of recursive calls.

    Both decode_modes_sb and decode_modes_b had conditions to immediately
    return at the beginning. Eliminating these conditions here and calling
    these functions only to do a real work. Also unrolling loop for
    PARTITION_SPLIT.

    Change-Id : I2fc41cb74ac491f045a2f04fe68d30ff4aaa555d