Recherche avancée

Médias (0)

Mot : - Tags -/alertes

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

Autres articles (82)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

Sur d’autres sites (11917)

  • Re-streaming RTSP with higher FPS

    4 février 2021, par AndBondStyle

    I have RTSP stream with very low and non-constant FPS (varying between 0.2 ... 0.5). It is generated using -skip_frame flag to reduce network and CPU usage as much as possible :

    


    ffmpeg -skip_frame nointra -i  -vsync 2 -f rtsp 


    


    As a consequence, it takes a very long time (1 ... 3 minutes) to connect to that stream and see first meaningful image. I want this stream to work with generic players without any tweaks, so my decision was to re-stream it with higher FPS (10, to be exact) :

    


    ffmpeg -i  -vf "fps=fps=10,setpts=N/(10*TB)" -f rtsp 


    


    Not entirely sure how that command is working, but it somehow did the trick and reduced connection time to about 5 seconds. However, I suspect that it's outputting frames in bursts, which is not ideal. For example, if original low-fps stream contains 2 frames which are 3 seconds apart, my re-stream command (probably) does the following :

    


      

    • When the first input frame comes, output a bunch of frames as fast as possible
    • 


    • Don't output anything for an entire 3 seconds
    • 


    • When the second frame comes, output 3 * 10 = 30 frames as fast as possible
    • 


    • Sleep again until new input frame shows up...
    • 


    


    Is there a way to make my re-stream command output frames evenly (with a constant FPS) ? Or maybe there's another way to reduce RTSP connection (buffering ?) time ?

    


  • ffmpeg timestamp to logfile [on hold]

    16 mars 2016, par user3580316

    How can I log the timestamp for each frame ?

    Command :

    ffmpeg -i movie.mp4 image%d.jpg -vstats -timestamp now

    Log file :

    root@chef-server:/home/user# cat vstats_111633.log
    frame=     1 q= 1.8 f_size=  14964 s_size=       15kB time= 0.040 br=  2992.8kbits/s avg_br=  2992.8kbits/s type= I
    frame=     2 q= 1.6 f_size= 150673 s_size=      162kB time= 0.080 br= 30134.6kbits/s avg_br= 16563.7kbits/s type= I
    frame=     3 q= 1.6 f_size= 150794 s_size=      309kB time= 0.120 br= 30158.8kbits/s avg_br= 21095.4kbits/s type= I
    frame=     4 q= 2.1 f_size= 150853 s_size=      456kB time= 0.160 br= 30170.6kbits/s avg_br= 23364.2kbits/s type= I
    frame=     5 q= 4.4 f_size=  95332 s_size=      549kB time= 0.200 br= 19066.4kbits/s avg_br= 22504.6kbits/s type= I
    frame=     6 q= 7.0 f_size=  65227 s_size=      613kB time= 0.240 br= 13045.4kbits/s avg_br= 20928.1kbits/s type= I
    frame=     7 q= 9.8 f_size=  50215 s_size=      662kB time= 0.280 br= 10043.0kbits/s avg_br= 19373.1kbits/s type= I

    So ideal would be to log the timestamp e.g 11:33:56

  • set MediaRecorder to record 1 frame every N seconds

    19 août 2022, par The Blind Hawk

    Summary

    


    I have a version of my code already working on Chrome and Edge, but I need some fixes for it to work on Safari.
    
My objective is to record around 25 minutes and download a timelapse version of the recording.
    
final product requirements :

    


    speed: 3fps
length: ~25s

(I need to record one frame every 20 seconds for 25 mins)


    


    this.secondStream settings :

    


    this.secondStream = await navigator.mediaDevices.getUserMedia({
    audio: false,
    video: {width: 430, height: 430, facingMode: "user"}
});


    


    My code for IOS so far :

    


            startIOSVideoRecording: function() {
            console.log("setting up recorder");
            var self = this;
            this.data = [];

            if (MediaRecorder.isTypeSupported('video/mp4')) {
                // IOS does not support webm, so I will be using mp4
                var options = {mimeType: 'video/mp4', videoBitsPerSecond : 1000000};
            } else {
                console.log("ERROR: mp4 is not supported, trying to default to webm");
                var options = {mimeType: 'video/webm'};
            }
            console.log("options settings:");
            console.log(options);

            this.recorder = new MediaRecorder(this.secondStream, options);

            this.recorder.ondataavailable = function(evt) {
                if (evt.data && evt.data.size > 0) {
                    self.data.push(evt.data);
                    console.log('chunk size: ' + evt.data.size);
                }
            }

            this.recorder.onstop = function(evt) {
                console.log('recorder stopping');
                var blob = new Blob(self.data, {type: "video/mp4"});
                self.download(blob, "mp4");
                self.sendMail(videoBlob);
            }

            console.log("finished setup, starting")
            this.recorder.start(1200);

            function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms));}

            async function looper() {
                // I am trying to pick one second every 20 more or less
                await sleep(500);
                self.recorder.pause();
                await sleep(18000);
                self.recorder.resume();
                looper();
            }
            looper();
        },


    


    Issues

    


    Only one call to getUserMedia()

    


    I am already using this.secondstream elsewhere, and I need the settings to stay as they are for the other functionality.
    
On Chrome and Edge, I could just call getUserMedia() again with different settings, and the issue would be solved, but on IOS calling getUserMedia() a second time kills the first stream.
    
The settings that I was planning to use (works for Chrome and Edge) :

    


    navigator.mediaDevices.getUserMedia({
    audio: false,
    video: { 
        width: 360, height: 240, facingMode: "user", 
        frameRate: { min:0, ideal: 0.05, max:0.1 } 
    },
}


    


    The timelapse library I am using does not support mp4 (ffmpeg as alternative ?)

    


    I am forced to use mp4 on IOS apparently, but this does not allow me to use the library I was relying on so I need an alternative.
    
I am thinking of using ffmpeg but cannot find any documentation to make it interact with the blob before the download.
    
I do not want to edit the video after downloading it, but I want to be able to download the already edited version, so no terminal commands.

    


    MediaRecorder pause and resume are not ideal

    


    On Chrome and Edge I would keep one frame every 20 seconds by setting the frameRate to 0.05, but this does not seem to work on IOS for two reasons.
    
First one is related to the first issue of not being able to change the settings of getUserMedia() without destroying the initial stream in the first place.
    
And even after changing the settings, It seems that setting the frame rate below 1 is not supported on IOS. Maybe I wrote something else wrong, but I was not able to open the downloaded file.
    
Therefore I tried relying on pausing and resuming the MediaRecorder, but this brings forth another two issues :
    
I am currently saving 1 second every 20 seconds and not 1 frame every 20 seconds, and I cannot find any workarounds.
    
Pause and Resume take a little bit of time, making the code unreliable, as I sometimes pick 2/20 seconds instead of 1/20, and I have no reliability that the loop is actually running every 20 seconds (might be 18 might be 25).