JavaScript - Convert webm to mp4











up vote
0
down vote

favorite












I have looked a bit around, but I couldn't find a proper library and everyone point at a different direction.



So my question is simple; is it possible to convert a media (webm) on a web page to mp4 and immediatly start the download ?



I'm making an extansion for firefox, but I have no idea how to do the conversion part.










share|improve this question






















  • You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
    – t.niese
    Nov 12 at 16:23












  • E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
    – t.niese
    Nov 12 at 16:29












  • Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
    – Arkarr
    Nov 12 at 16:35










  • By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
    – t.niese
    Nov 12 at 17:02












  • And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
    – t.niese
    Nov 12 at 17:10

















up vote
0
down vote

favorite












I have looked a bit around, but I couldn't find a proper library and everyone point at a different direction.



So my question is simple; is it possible to convert a media (webm) on a web page to mp4 and immediatly start the download ?



I'm making an extansion for firefox, but I have no idea how to do the conversion part.










share|improve this question






















  • You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
    – t.niese
    Nov 12 at 16:23












  • E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
    – t.niese
    Nov 12 at 16:29












  • Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
    – Arkarr
    Nov 12 at 16:35










  • By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
    – t.niese
    Nov 12 at 17:02












  • And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
    – t.niese
    Nov 12 at 17:10















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have looked a bit around, but I couldn't find a proper library and everyone point at a different direction.



So my question is simple; is it possible to convert a media (webm) on a web page to mp4 and immediatly start the download ?



I'm making an extansion for firefox, but I have no idea how to do the conversion part.










share|improve this question













I have looked a bit around, but I couldn't find a proper library and everyone point at a different direction.



So my question is simple; is it possible to convert a media (webm) on a web page to mp4 and immediatly start the download ?



I'm making an extansion for firefox, but I have no idea how to do the conversion part.







javascript mp4 webm






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 16:20









Arkarr

436




436












  • You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
    – t.niese
    Nov 12 at 16:23












  • E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
    – t.niese
    Nov 12 at 16:29












  • Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
    – Arkarr
    Nov 12 at 16:35










  • By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
    – t.niese
    Nov 12 at 17:02












  • And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
    – t.niese
    Nov 12 at 17:10




















  • You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
    – t.niese
    Nov 12 at 16:23












  • E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
    – t.niese
    Nov 12 at 16:29












  • Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
    – Arkarr
    Nov 12 at 16:35










  • By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
    – t.niese
    Nov 12 at 17:02












  • And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
    – t.niese
    Nov 12 at 17:10


















You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
– t.niese
Nov 12 at 16:23






You should explain what problems you had with the different directions you got. Otherwise you will most likely get that exact same information again.
– t.niese
Nov 12 at 16:23














E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
– t.niese
Nov 12 at 16:29






E.g searching for JavaScript webm to mp4 leads to github.com/muaz-khan/Ffmpeg.js as one of the first results. So what was the particular problem using/adapting that code?
– t.niese
Nov 12 at 16:29














Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
– Arkarr
Nov 12 at 16:35




Well, can you figure it out how he manage to convert an already existing webm video to mp4 ? Because I couldn't find out. I have been through his exemple there : github.com/muaz-khan/Ffmpeg.js/blob/master/webm-to-mp4.html
– Arkarr
Nov 12 at 16:35












By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
– t.niese
Nov 12 at 17:02






By reading a file into videoBlob and pass that to fileReader.readAsArrayBuffer(videoBlob); or by passing a File directly to fileReader.readAsArrayBuffer. The converting works, but it will be slow because of the missing hardware acceleration.
– t.niese
Nov 12 at 17:02














And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
– t.niese
Nov 12 at 17:10






And as I suspected, the first hints you got were the same you already know. If you want to have a useful answer then share your previous findings. And if you have a specific problem e.g. with ffmpeg.js then create a question where you explain what you tried (including your code) to get that to work, and what exact problem you are facing.
– t.niese
Nov 12 at 17:10














1 Answer
1






active

oldest

votes

















up vote
0
down vote













I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.






share|improve this answer





















  • Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
    – t.niese
    Nov 12 at 16:33












  • I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
    – Arkarr
    Nov 12 at 16:36










  • Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
    – Kingsley
    Nov 12 at 17:07











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266185%2fjavascript-convert-webm-to-mp4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.






share|improve this answer





















  • Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
    – t.niese
    Nov 12 at 16:33












  • I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
    – Arkarr
    Nov 12 at 16:36










  • Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
    – Kingsley
    Nov 12 at 17:07















up vote
0
down vote













I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.






share|improve this answer





















  • Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
    – t.niese
    Nov 12 at 16:33












  • I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
    – Arkarr
    Nov 12 at 16:36










  • Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
    – Kingsley
    Nov 12 at 17:07













up vote
0
down vote










up vote
0
down vote









I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.






share|improve this answer












I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 12 at 16:27









Kingsley

5471418




5471418












  • Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
    – t.niese
    Nov 12 at 16:33












  • I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
    – Arkarr
    Nov 12 at 16:36










  • Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
    – Kingsley
    Nov 12 at 17:07


















  • Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
    – t.niese
    Nov 12 at 16:33












  • I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
    – Arkarr
    Nov 12 at 16:36










  • Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
    – Kingsley
    Nov 12 at 17:07
















Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
– t.niese
Nov 12 at 16:33






Using a clients side api also has advantages. You don’t waste bandwidth, you don’t need to check how that service provider handles the data, you could use it even if that service provider is not reachable.
– t.niese
Nov 12 at 16:33














I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
– Arkarr
Nov 12 at 16:36




I am aware of that solution, but I rather don't want to be depend of it. Plus, you have to pay for API keys, wich is definitly a block on my project.
– Arkarr
Nov 12 at 16:36












Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
– Kingsley
Nov 12 at 17:07




Understood! Just listing a possibility as you didn't specify. I've not investigated any possible JS packages that handle conversion, but I'm curious!
– Kingsley
Nov 12 at 17:07


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53266185%2fjavascript-convert-webm-to-mp4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?