antimatter15 / whammy

A real time javascript webm encoder based on a canvas hack
http://antimatter15.github.com/whammy/clock.html
MIT License
1.02k stars 182 forks source link

Sound track #12

Open shunzh opened 10 years ago

shunzh commented 10 years ago

Can I add a sound track when compiling it? I didn't find such function in the source code though..

antimatter15 commented 10 years ago

I never built support for adding an audio track but it should be possible (with a considerable amount of work) by encoding the audio as Vorbis and embedding it within the matryoshka container.

Sent from my iPhone

On Jul 1, 2014, at 12:19 PM, S.Zhang notifications@github.com wrote:

Can I add a sound track when compiling it? I didn't find such function in the source code though..

— Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

I am also interested in this feature, but I have absolutely no idea where to start with embedding into the container. How considerable is "considerable"?

antimatter15 commented 9 years ago

It turns out that someone has already successfully used Emscripten to compile a vorbis encoder to javascript, so beyond that it's a matter of adding an audio track and putting the audio packets in the right spots.

You can probably find some good information looking at the matroska and webm specs: http://www.webmproject.org/docs/container/ http://matroska.org/technical/specs/codecid/index.html

You can experiment with what tags are involved by taking some webm video and opening the file in some EBML viewer like https://code.google.com/p/ebml-viewer/

ghost commented 9 years ago

Thanks for the response! Yeah after taking a look, this is a bit too complicated for me at this point. I coud probably handle adding the track, but I'm out of my element with the rest.

RahulRawat1994 commented 6 years ago

I am also want to add sound track in video but it look complicated for me.