Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (44)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

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

  • error enoent when assigning path to ffmpeg

    12 septembre 2022, par seriously

    I am trying to set up a relay from my rtmp server and I'm using an npm module called node-media-server. I have set up my rtmp protocol successfully but when I am trying to set up the relay it expects me to add a path my my ffmpeg library so i npm installed ffmpeg then supplied the node_module path to the relay but I keep on getting error uncaughtException Error: spawn C:\blah\blah\node_modules\ffmpeg ENOENT the ffmpeg library definitely exist at the specified location. Why is this happening ? Thanks in advance.

    


    Link to the module im using : https://www.npmjs.com/package/node-media-server

    


    

    

    const NodeMediaServer = require('node-media-server');
const path = require('path')
const ffmpegPath = path.join(__dirname, '..', 'node_modules', 'ffmpeg')

const config = {
  rtmp: {
    port: 1935,
    chunk_size: 60000,
    gop_cache: true,
    ping: 30,
    ping_timeout: 60
  },
  http: {
    port: 8000,
    allow_origin: '*'
  },
  relay: {
    ffmpeg: ffmpegPath,
    tasks: [{
        app: 'live',
        mode: 'push',
        edge: 'rtmp://localhost:1936',
      },
      {
        app: 'live',
        mode: 'push',
        edge: 'rtmp://localhost:1937',
      }
    ]
  }
};

var nms = new NodeMediaServer(config)
nms.run();

    


    


    



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

    


  • OpenCV FFMPEG RTSP Camera Feed Errors

    4 avril, par trn2020

    I'm getting these errors at random times when saving frames from an rtsp camera feed. The errors happen at different times, usually after 100-200 images have been saved, and the errors themselves are not always exactly the same. They cause the images that are saved at the time of the error to be distorted either to the point of being completely grey or contain distorted pixels.

    


    #Frame_142 - [hevc @ 0c3bf800] The cu_qp_delta 29 is outside the valid range [-26, 25].

    


    #Frame_406 - [hevc @ 0b6bdb80] Could not find ref with POC 41

    


    I've tried implementing the code in both python and c++ with the same result. Also tried saving as .png instead of .jpg. The rtsp feed works fine when using imshow to display the camera, the problem only appears to happen when trying to save the frames. From what I can gather the errors have to do with ffmpeg but google isn't much help for these types of errors.

    


    #include <iostream>&#xA;#include &#xA;#include <chrono>&#xA;#include <thread>&#xA;&#xA;using namespace std;&#xA;using namespace cv;&#xA;&#xA;int main() {&#xA;&#xA;    VideoCapture cap("rtsp://admin:admin@192.168.88.97/media/video1");&#xA;    if (!cap.isOpened())&#xA;        return -1;&#xA;&#xA;    for (int i = 0; i &lt; 500; i&#x2B;&#x2B;)&#xA;    {&#xA;        Mat frame;&#xA;        cap >> frame;&#xA;        imwrite("C:\\Users\\Documents\\Dev\\c&#x2B;&#x2B;\\OpenCVExample\\frames\\frame" &#x2B; std::to_string(i) &#x2B; ".png", frame);&#xA;        cout &lt;&lt; i &lt;&lt; "\n";&#xA;        std::this_thread::sleep_for(std::chrono::milliseconds(10));&#xA;&#xA;    }&#xA;&#xA;    return 0;&#xA;}&#xA;</thread></chrono></iostream>

    &#xA;