p5.capture icon indicating copy to clipboard operation
p5.capture copied to clipboard

Capture video with sound

Open NoBodyButMe opened this issue 2 years ago • 1 comments

It works well for capturing video from the webcam, but I can't get it to record/save the sound too. What can I do to "save" the sound?

let video;

    function setup() {
        createCanvas(640, 480);

        let constraints = {
            video: {
                facingmode: "user" //environment
            },
            audio: true
        };
        video = createCapture(constraints, function(s) {
            console.log(s);
        });
        //video.size(640, 480);
        video.volume(0);
        video.hide(); // Verberg het video-element
    }

    function draw() {
        background(220);
        image(video, 0, 0, width, height);
    }

NoBodyButMe avatar Aug 19 '23 08:08 NoBodyButMe

Hi, @NoBodyButMe !

Sorry for the late reply. p5.capture does not have the feature to record sound. This is because it uses a frame rate safe recording method and is not suitable for recording with sound.

tapioca24 avatar Oct 09 '23 10:10 tapioca24