muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.58k stars 1.76k forks source link

Timeline in videos #581

Open DaGLiMiOuX opened 4 years ago

DaGLiMiOuX commented 4 years ago

Hi there.

Recording videos works mostly as expected, but I'm having troubles with timelines. If I use any of Windows 10 player or VLC player, both can play the video recorded from WebRTC streams, but the timeline is like "corrupted" and cannot make it work.

For example, if I want to go to 00:45 in a 02:00 recording, I cannot use the player's timeline to reach that point.

Is there any work on it or it is about something wrong in my config?

var recorders = [];
function callRecording() {
    const config = {
        type: 'video',
        mimeType: 'video/webm;codecs=vp8'
        checkForInactiveTracks: false,
    }
    const streams = [];
    // Custom class to manage streams
    StreamManager.getList().forEach((streamObj) => {
        streams.push(streamObj.stream);
    });
    streams.forEach((stream) => {
        const r = new RecordRTC(stream, config);
        recorders.push(r);
        r.startRecording();
    });
}

function stopRecording() {
    recorders.forEach((recorder) => {
        recorder.stopRecording(() => {
            const blob = recorder.getBlob();
            invokeSaveAsDialog(blob, Date.now() + '.webm');
        });
    });
}

There is also a question related that shows "a green bar" at the bottom of the videos. Only happens sometimes and I dunno why. When I started using video/webm;codecs=vp8 stopped happening. I do not know if it will happen again, but if you have any information of a fix related with this issue, I would like to know it.

Best regards, D.