Recherche avancée

Médias (3)

Mot : - Tags -/plugin

Autres articles (111)

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

Sur d’autres sites (11694)

  • Révision 17418 : un pipeline header_prive_css pour inserer les css de bases ou js inline pre-css

    16 mars 2011, par cedric -
  • avfilter/vsrc_gradients : add circular type

    5 avril 2022, par Paul B Mahol
    avfilter/vsrc_gradients : add circular type
    
    • [DH] doc/filters.texi
    • [DH] libavfilter/vsrc_gradients.c
  • Is it possible to use something other than a circular buffer when using ffmpeg to pass RTSP video to a WebRTC client ?

    3 novembre 2024, par Doctico

    I have a Node application that uses ffmpeg to receive the RTSP stream of an ip camera (h264), and then pass send it using node-webrtc to a remote client. However, in my current implementation, ffmpeg only outputs 8192 byte chunks, which must be buffered in order to create the full frame that my current node-webrtc flow expects. This circular buffer results in a 1-2 second delay when the client is viewing the video. Is there any way to pass the stream through node-webrtc as the chunks come in, or at least extract complete frames so that circular buffering is not necessary ?

    


    So far, I have tried this, which works but has a 1-2 second delay, and even higher delay with higher resolution cameras :

    


        async startStream() {

        const rtspUrl = 'rtsp://my-rtsp-url';

        const videoSource = new wrtc.nonstandard.RTCVideoSource();
        const videoTrack = videoSource.createTrack();

        const width = 640;
        const height = 480;
        const frameSize = width * height * 1.5; // YUV420p format

        //circular buffer:
        let frameBuffer = Buffer.alloc(0);
        const frameStream = new Writable({
            write: (chunk, encoding, callback) => {
                frameBuffer = Buffer.concat([frameBuffer, chunk]);

                while (frameBuffer.length >= frameSize) {
                    const frame = frameBuffer.slice(0, frameSize);
                    frameBuffer = frameBuffer.slice(frameSize);

                    videoSource.onFrame({
                        width: width,
                        height: height,
                        data: new Uint8ClampedArray(frame)
                    });
                }
                callback();
            }
        });

        const ffmpegProcess = ffmpeg(rtspUrl)
            .inputOptions([
                `-fflags nobuffer`,
                `-flags low_delay`,
                `-rtsp_transport tcp`,
                `-strict experimental`,
                `-analyzeduration 0`,
                `-threads 0`,
                `-hwaccel auto`
            ])
            .outputOptions([
                `-f rawvideo`,
                `-c:v rawvideo`,
                '-b:v', streamId === 1 ? '2000k' : '1000k',
                '-bf', '0',
                `-s ${width}x${height}`,
                `-pix_fmt yuv420p`,
                `-tune zerolatency`
            ])
            .on('start', (cmd) => console.log('FFmpeg started:', cmd))
            .on('error', error => {
                console.error('FFmpeg error:', error);
                this.stopStream();
            })
            .on('end', () => {
                console.log('FFmpeg stream ended');
                this.stopStream();
            })

        ffmpegProcess
            .pipe(frameStream);

        return videoTrack;
    }