muaz-khan / ConcatenateBlobs

Simply pass array of blobs. This javascript library will concatenate all blobs in single Blob object.
https://www.webrtc-experiment.com/ConcatenateBlobs/
39 stars 14 forks source link

Concat not working... #2

Open ulissesvaquero opened 9 years ago

ulissesvaquero commented 9 years ago

I tried to concat my webm blobs but doesn't work...

ConcatenateBlobs(window.arrVideoBlob, document.getElementById('video').getAttribute('data-type'), function(resultingBlob) {
    console.log(bytesToSize(resultingBlob.size));
    document.getElementById('video').src = URL.createObjectURL(resultingBlob);
    document.getElementById('video').play();
});

this is the code

muaz-khan commented 9 years ago

What is original blob's size?

alert (
   bytesToSize( window.arrVideoBlob )
);

Are you using Firefox or Chrome?

ulissesvaquero commented 9 years ago

Size is correct, but when i play video, the result shows me only first 5 seconds..

abhijay9 commented 9 years ago

I am trying to download the concatenated blob like this : ConcatenateBlobs(blobArray,'audio/wav', function(resultingBlob) { var resultingUrl= URL.createObjectURL(resultingBlob); hf= document.createElement('a'); hf.href = resultingUrl; hf.download = new Date().toISOString() + '.wav'; hf.innerHTML = hf.download; var li = document.createElement('li'); li.appendChild(hf); document.getElementById('concatenatedBlob').appendChild(li); }); But when I press on the link to download it only gives me the first audio blob which I recorded. Also when I play it using

crollioac commented 9 years ago

In your demo page also it is not working properly. Please can you check this issue. https://www.webrtc-experiment.com/ConcatenateBlobs/. In mozilla it is playing only first part. but in chrome it is playing entire audio but audio tag shows duration of first blob only. as mentioned above by @abhijayghildyal.

MuhammadAftabAslam commented 8 years ago

@ulissesvaquero @abhijayghildyal I have the same issue did you find any solution?

abhijay9 commented 8 years ago

The way I implemented it was useful for the project I was working on. It required me to upload the audio files on the server and also have the stitched audio. So I used a simple ffmpeg command on the backend to stitch the audio. I uploaded a sample which you'll find here: link

pons1991 commented 7 years ago

I am facing the same problem? Is anyone managed to solve the issue?

MuhammadAftabAslam commented 7 years ago

@pons1991 I have used the same way @abhijayghildyal mentioned above.

pons1991 commented 7 years ago

Hey, Thanks for the reply, I dont want to play the audio in the browser. I am using native javascript and php, I want to concatenate all the blobs and send it to the backend over AJAX. the resultingblob contains only the audio of the first blob. Is there any fix for it? Am i doing any wrong?