Any sample code to mux audio and video into webm format?

1,346 views
Skip to first unread message

ptr...@gmail.com

unread,
Feb 7, 2014, 5:12:42 AM2/7/14
to webm-d...@webmproject.org
Folks,

In my code, I am able to create VP8 video and Vorbis audio. Now, I am trying to see how I can mux the two into wbem format. 

On Google search, I get references to VLC and FFMPEG as they both are capable of muxing. However, both the applications are harder to understand

I am wondering if there is any example out there, preferably in C/C++,  that shows how to mux VP8/Vorbin into wbem format. I am thinking the APIs to mux must be part of libvpx.

The ultimate idea is to build webm stream on the fly and pass it to Google chrome.

Thank you in advance for your help.

Regards,
Peter

Matthew Heaney

unread,
Feb 7, 2014, 1:56:50 PM2/7/14
to WebM Discussion
You can look at libwebm or webmdshow:




--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To post to this group, send email to webm-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.

Tom Finegan

unread,
Feb 7, 2014, 2:00:02 PM2/7/14
to WebM Discussion
On Fri, Feb 7, 2014 at 10:56 AM, Matthew Heaney <matthew...@google.com> wrote:
You can look at libwebm or webmdshow:



Also take a look at some of the code in the webm-tools[1] project; WebmLiveMuxer[2] sounds like exactly what you want. 

Ralph Giles

unread,
Feb 7, 2014, 2:14:41 PM2/7/14
to webm-d...@webmproject.org
On 2014-02-07 2:12 AM, ptr...@gmail.com wrote:

> I am wondering if there is any example out there, preferably in C/C++,
> that shows how to mux VP8/Vorbin into wbem format. I am thinking the
> APIs to mux must be part of libvpx.

There's no audio muxing code in libvpx. In addition to the links already
meantioned you might try:

https://github.com/mbunkus/mkvtoolnix.git (stand-alone file muxer)

Firefox has code to write VP8+Vorbis in WebM, but it's probaby not much
easier to understand than ffmpeg for VLC.
https://github.com/mozilla/gecko-dev/blob/master/content/media/webm/WebMWriter.cpp
is the main entrypoint.

> The ultimate idea is to build webm stream on the fly and pass it to
> Google chrome.

For live streams you might also look at David Schleef's
gst-streaming-server at
http://gstreamer.freedesktop.org/modules/gst-streaming-server.html or
David Richard's https://github.com/oneman/kradradio

Hope that's some help. Media frameworks tend to be complicated.

-r

Brendan Bolles

unread,
Feb 7, 2014, 3:13:24 PM2/7/14
to webm-d...@webmproject.org
On Feb 7, 2014, at 2:12 AM, ptr...@gmail.com wrote:

> I am wondering if there is any example out there, preferably in C/C++, that shows how to mux VP8/Vorbin into wbem format. I am thinking the APIs to mux must be part of libvpx.


My Premiere plug-in uses libwebm and I think is pretty straight forward.

https://github.com/fnordware/AdobeWebM


See src/premiere/WebM_Premiere_Export.cpp


Brendan

Reply all
Reply to author
Forward
0 new messages