Recherche avancée

Médias (1)

Mot : - Tags -/blender

Autres articles (23)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (4296)

  • Decode IP camera RTSP stream to pictures with ffmpeg library

    10 mars 2024, par lars

    I use c++ with curl library on linux to connect to my IP camera and retrieve data from RTPS video stream. I have succeeded to decode RTSP and RTP data but I haven't managed to put together the data into a frame that ffmpeg can read. I have read everything there is to read with no success. Is there anyone who can explain how to do this.

    


    Thanks

    


    Here is what I have come up with.

    


    curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_DESCRIBE);


    


    Parsing callback sdp description :

    


    packetization_mode = 1 e.i Non-Interleaved mode

    


    sprop-parameter-sets :

    


    Nal unit (SPS) = 274d0028e7403c0113f2e029414141...8ae0000f4145fffc0a 
Nal unit (PPS) = 28ee3c80 (Both are decoded values)


    


    Parsing SPS givs pic size 1920x1088 (the 8 ?)

    


    curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_PLAY);
curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, URL_RTSPREQ_RECEIVE);


    


    Callback function :
Search for SPS, PPS and fragmentations

    


    size_t interleavedCallback(uint8_t *data, size_t size, size_t nmemb, USER_DATA *userp) {
    size_t data_size = size * nmemb;
    uint8_t *rtp_hdr = data + RTSP_HDR_SIZE;
    uint8_t *payload = data + RTSP_HDR_SIZE + RTP_HDR_SIZE;
    size_t payload_size = data_size - (RTSP_HDR_SIZE + RTP_HDR_SIZE);
    int seqNum = 0;

    uint8_t u = payload[0] << 3;
    int type = u >> 3;              // nal_unit_type
    int nri = payload[0] >> 5;
    seqNum = (rtp_hdr[2] << 8) + rtp_hdr[3];

   int ret = memcmp(payload, userp->sdp_data.SPS, userp->sdp_data.sizeSPS);
   if (0 == ret && !userp->newFrame) {
       userp->newFrame = true;
       payload[0] = type + 0x60;  // nal_unit_type

       size_t memsize = payload_size + sizeof(uint32_t);
       userp->frame.pFrame = (uint8_t*)calloc(memsize, sizeof(uint8_t));
       userp->frame.pFrame[3] = 1;
       memcpy(userp->frame.pFrame + sizeof(uint32_t), payload, payload_size);
       userp->frame.size = memsize;
    }
    else if (userp->newFrame && 28 == type && payload[1] == 0x45) {
        stop;
        userp->newFrame = false;
        size_t memsize = userp->frame.size + payload_size;
        userp->frame.pFrame = (uint8_t*)realloc(userp->frame.pFrame, memsize);
        payload[0] += 0x40;
        memcpy(userp->frame.pFrame + userp->frame.size, payload, payload_size);
        userp->frame.size = memsize;
    
        streamParser(userp->frame.pFrame, userp->frame.size);
    }
    else if (userp->newFrame) {
        if (8 == type) {
            payload[0] = type + 0x60;  // nal_unit_type
            size_t memsize = userp->frame.size + payload_size;
            userp->frame.pFrame[0] = 0;
            userp->frame.pFrame[1] = 0;
            userp->frame.pFrame[2] = 0;
            userp->frame.pFrame[3] = 1;
            userp->frame.pFrame = (uint8_t*)realloc(userp->frame.pFrame, memsize);
            memcpy(userp->frame.pFrame + userp->frame.size, 
                payload, payload_size);
            userp->frame.size = memsize;
        }
        else if (28 == type) {
            size_t memsize = userp->frame.size + payload_size;
            userp->frame.pFrame = (uint8_t*)realloc(userp->frame.pFrame, memsize);
            payload[0] += 0x40;
            memcpy(userp->frame.pFrame + userp->frame.size, payload, payload_size);
            userp->frame.size = memsize;
        }
    }

    return data_size;
}


void streamParser(uint8_t *frame, size_t size) {
    AV avinfo;

    avinfo.packet = av_packet_alloc();
    avinfo.codec = avcodec_find_decoder(AV_CODEC_ID_H264);
    avinfo.context = avcodec_alloc_context3(avinfo.codec);
    if (avcodec_open2(avinfo.context, avinfo.codec, NULL) >= 0) {
        avinfo.frame = av_frame_alloc();
        avinfo.packet->data = frame;
        avinfo.packet->size = size;
    
        int ret = avcodec_send_packet(avinfo.context,avinfo.packet);
        if (ret < 0) {
            return -1;
        }
        ......

        av_frame_free(&avinfo.frame);
    }
    avcodec_close(avinfo.context);
    av_free(avinfo.context);
}


    


    Error from avcodec_send_packet : no frame !

    


  • Anomalie #2378 : dimensions MINimales pour les documents et logo

    12 août 2020

    Ceci dit, je réalise qu’il y a quand même parfois des exceptions : par exemple, une image appelée par un squelette sans redimensionnement par le squelette, où il faut donc mettre l’image précisément de la taille voulue.

    J’ai le cas pour le logo du site.

    Ça complique singulièrement parce qu’il faudrait pouvoir afficher une alerte indiquant que l’image est trop petite et demander si c’est vraiment ça que l’on veut faire. (Ceci expliquerait l’ancienneté de ce ticket ?)
    Ou alors, une case à cocher avant upload : [ ] Image volontairement petite

  • avcodec/mpegvideo_enc : fix padding for odd dimensions and interlaced video

    11 juin 2014, par Michael Niedermayer
    avcodec/mpegvideo_enc : fix padding for odd dimensions and interlaced video
    

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/mpegvideo_enc.c
    • [DH] tests/ref/vsynth/vsynth3-mpeg2-422
    • [DH] tests/ref/vsynth/vsynth3-mpeg2-ilace
    • [DH] tests/ref/vsynth/vsynth3-mpeg2-thread
    • [DH] tests/ref/vsynth/vsynth3-mpeg2-thread-ivlc