question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeslice blobs are corrupted

See original GitHub issue

Hi there.

Hi, I am facing the issue. The first slice is only playable. The rest of the slices seems to be corrupt.

My Code on Angular 10

startRecording(){
    if (!this.isRecording){
      this.isRecording = true;
      navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(s => {
        this.stream = s;
        this.video.nativeElement.srcObject = this.stream;

        this.video.nativeElement.muted = 'muted';
        // tslint:disable-next-line: prefer-const
        var thatRef = this;
        this.recorder = new RecordRTC.MediaStreamRecorder(this.stream, {
          type: 'video',
          mimeType: 'video/webm;codecs=vp9',
          numberOfAudioChannels: 1,
          timeSlice: 20000,
          videoBitsPerSecond: 180000,
          ondataavailable(blob) {

            // tslint:disable-next-line: prefer-const
            let reader = new FileReader();
            reader.readAsDataURL(blob);
            reader.onloadend = (e) => {
              thatRef.base64data = reader.result;
              const formPayload = {
                duration: ((new Date().getTime() - thatRef.questionStartTime) / 1000),
                order: thatRef.chunkNumber,
                file: thatRef.base64data,
                fileName: thatRef.chunkNumber + '.webm'
              };
              thatRef.questionStartTime = new Date().getTime();
              thatRef.chunkNumber = thatRef.chunkNumber + 1;
              thatRef.api.post(thatRef.utils.apiVersion, thatRef.appModuleInterface.saveChunkAPI, formPayload).subscribe(response => {
                console.log('Enter in a startRecording() method. Success()');
              }, (error) => {
                  this.logger.error('error : ' + JSON.stringify(error));
              });
            };
          }
        });

        this.recorder.record();
        this.questionStartTime = moment();
      });
    }
  }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

2reactions
bakaiadamcommented, Nov 5, 2020

i have the same problem. I thought i was doing something wrong.

0reactions
farizyogacommented, Nov 30, 2020

you should retrieve all chunked videos first, then process the video with your Node server or PHP server

#cmiiw

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeslice blobs are corrupted · Issue #376 - GitHub
Hey, Am having issues with the timestamp event. I am trying to upload a "slice" of the recorded video. Below is what I...
Read more >
Timeslice blobs are corrupted - - Bountysource
Timeslice blobs are corrupted ... Hey, Am having issues with the timestamp event. I am trying to upload a "slice" of the recorded...
Read more >
Concatenating multiple blobs produces corrupt media file
The timeslice parameter was provided and I am regularly getting data out of the media recorder. The issue is that combining the data...
Read more >
898771 - Media Recording - The second piece of blob data ...
Media Recording - The second piece of blob data retrieved from ondataavailable is unplayable media content during a recording with no timeslice.
Read more >
Time Slicing job is failing with ORA-00001 on bad data
This can be caused by a bad data in one of the time slice records. At this time we do not have information...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found