WebM audio file made from an Ogg Vorbis file doesn't display in audio tag

418 views
Skip to first unread message

antistress

unread,
May 28, 2010, 4:03:57 AM5/28/10
to WebM Discussion
Hi,

I've followed Zaheer Abbas Merali advice to convert an Ogg Vorbis file
into a WebM one without re-encoding, using gstreamer (gst-launch
filesrc location=inputfile ! oggdemux ! vorbisparse ! webmmux !
filesink location=outputfile)

The Ogg Vorbis file works in audio tag but not the WebM one

Any idea please ?

Here is my HTML code :
<p><audio controls="controls">
<source src="http://libre-ouvert.toile-libre.org/data/documents/
retour_vers_le_futur_2_ohlala.webm" type='audio/webm; codecs=vorbis'>
<source src="http://libre-ouvert.toile-libre.org/data/documents/
retour_vers_le_futur_2_ohlala.ogg" type='audio/ogg; codecs=vorbis'>
</audio></p>

antistress

unread,
May 28, 2010, 4:05:23 AM5/28/10
to WebM Discussion
i've tested it with both Epiphany (with latest gstreamer) and Firefox
WebM Build

Also i've noticed that the ogg file is 83,9 Kio whereas the webm file
is 101,2 Kio

Steve Lhomme

unread,
May 28, 2010, 4:19:15 AM5/28/10
to antistress, WebM Discussion
GStreamer doesn't seem to be using lacing for audio (wouldn't be good for video) that's why the size is sub optimal. Try to mux with mkvtoolnix and change the doctype with mkclean and it should be about the same size as the "raw" Ogg Vorbis file.

Matthew Gregan

unread,
May 28, 2010, 4:19:37 AM5/28/10
to antistress, WebM Discussion
At 2010-05-28T01:05:23-0700, antistress wrote:
> i've tested it with both Epiphany (with latest gstreamer) and Firefox
> WebM Build

The file is being served with a Content-Type of application/octet-stream,
which is why Firefox refuses to play it. There's a bug about supporting
this via content sniffing (bug 546129 in Mozilla's Bugzilla). If you
correct the configuration on your HTTP server to serve the file as
audio/webm it should work fine.

> Also i've noticed that the ogg file is 83,9 Kio whereas the webm file
> is 101,2 Kio

The WebM file is muxed fairly inefficiently. Each audio packet is stored in
it's own Block (there's no lacing in use), and the file using using Blocks
rather then SimpleBlocks.

Cheers,
-mjt
--
Matthew Gregan |/
/| kin...@flim.org

Lachlan Hunt

unread,
May 28, 2010, 4:28:51 AM5/28/10
to antistress, WebM Discussion
On 2010-05-28 10:03, antistress wrote:
> Hi,
>
> I've followed Zaheer Abbas Merali advice to convert an Ogg Vorbis file
> into a WebM one without re-encoding, using gstreamer (gst-launch
> filesrc location=inputfile ! oggdemux ! vorbisparse ! webmmux !
> filesink location=outputfile)

> The Ogg Vorbis file works in audio tag but not the WebM one

Your file worked fine for me in Opera and Chome. But you should try
checking the file with mkvalidator. Gstreamer has known bugs that make
it output invalid webm files, though this can be cleaned up with mkclean.

But I've had good experience with using mkvmerge instead to remux the
ogg into mkv followed by mkclean to remux into webm.

$ mkvmerge -o temp.mkv input.ogg
$ mkclean --doctype 4 temp.mkv output.webm

This also has the benefit of optimising the file for use over HTTP by
ensuring the cues are at the beginning and removing unnecessary elements.

--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Zaheer Merali

unread,
May 28, 2010, 4:36:25 AM5/28/10
to Lachlan Hunt, antistress, WebM Discussion
On Fri, May 28, 2010 at 9:28 AM, Lachlan Hunt <lachla...@lachy.id.au> wrote:
> Gstreamer has known bugs that make it output invalid webm files

GStreamer does not output invalid files. There is only one bug in the
GStreamer bugzilla regarding this:
https://bugzilla.gnome.org/show_bug.cgi?id=619374 and all the points
that GStreamer does/doesn't do are in parts of the spec that are not
MUST.

It may create suboptimal audio files as was shown by the original
poster but it does not imply invalidity.

Zaheer

Steve Lhomme

unread,
May 28, 2010, 4:37:12 AM5/28/10
to Lachlan Hunt, antistress, WebM Discussion
For the record I made an update of mkclean yesterday. --doctype 3 (webm v1) is not possible anymore, only DocTypeVersion 2 will be written for webm.

antistress

unread,
May 28, 2010, 9:27:36 PM5/28/10
to WebM Discussion
Thank you everyone for your answers, i'll try all this week end

BTW, any chance to see all these amazing matroska tools (mkclean,
mkvalidator & MKVToolNix) in a PPA for ubuntu ?

On May 28, 10:37 am, Steve Lhomme <slho...@matroska.org> wrote:
> For the record I made an update of mkclean yesterday. --doctype 3 (webm v1)
> is not possible anymore, only DocTypeVersion 2 will be written for webm.
>

Moritz Bunkus

unread,
May 29, 2010, 7:28:15 AM5/29/10
to webm-d...@webmproject.org
Hey,

On Saturday 29 May 2010 03:27:36 antistress wrote:

> BTW, any chance to see all these amazing matroska tools (mkclean,
> mkvalidator & MKVToolNix) in a PPA for ubuntu ?

I always provide MKVToolNix binaries for various releases of Debian &
Ubuntu on the MKVToolNix site:
http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#ubuntu

Regards,
Mosu

--
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds

antistress

unread,
May 29, 2010, 10:02:50 AM5/29/10
to WebM Discussion
Thank you Moritz Bunkus for your hard work, i really appreciate :-)
Is the 3.4.0 version ok for webm ? I've erad on your blog that a new
version called mkvtoolnix-3.4.0-webmedia-244 is needed.
Or should i 1sft create a mkv file with mkvmerge and then turni it
into a webm file with mkclean as Lachlan Hunt has suggested above ?

1°) i've check my file "created with GStreamer plugin version
0.10.22.3 / GStreamer Matroska muxer" with mkvalidator 0.1.8 and i get
a lot of errors.

i've got a "ERR201: Invalid Tag for profile 'webm v2' at 103623 in
Tags" (which is not a real bug as reported above by Zaheer Merali),
but also a lot of "ERR0B1: Block at X track #1 is not a keyframe" and
"ERR312: CueEntry Track #1 and timecode X ms not found"

The file embeded in an audio tag doesn't play neither in Firefow WebM
build nor in Epiphany

2°) concerning Firefox "bug" (as reported above by Matthew Gregan),
since i've specified "type='audio/webm; codecs=vorbis'" there should
be no need to do content-sniffing i think ?

3°) using mkclean (mkclean --doctype 4
retour_vers_le_futur_2_ohlala.webm) reduced the file and remove some
errors but didn't help to listen to it with Epiphany nor Firefox

Moritz Bunkus

unread,
May 29, 2010, 10:11:02 AM5/29/10
to webm-d...@webmproject.org
Hey,

On Saturday 29 May 2010 16:02:50 antistress wrote:

> Thank you Moritz Bunkus for your hard work, i really appreciate :-) Is
> the 3.4.0 version ok for webm ?

No. 3.4.0 does not yet contain the code for WebM. The upcoming release
due next week will contain all the necessary code.

However, building your own Ubuntu package from my Git repository is
pretty easy. Here are instructions:
http://www.bunkus.org/videotools/mkvtoolnix/source.html#debian_ubuntu_package

> Or should i 1sft create a mkv file with mkvmerge and then turni it
> into a webm file with mkclean as Lachlan Hunt has suggested above ?

That works as well.

Silvia Pfeiffer

unread,
May 29, 2010, 10:39:45 AM5/29/10
to Moritz Bunkus, webm-d...@webmproject.org
On Sun, May 30, 2010 at 12:11 AM, Moritz Bunkus <mor...@bunkus.org> wrote:
> Hey,
>
> On Saturday 29 May 2010 16:02:50 antistress wrote:
>
>> Thank you Moritz Bunkus for your hard work, i really appreciate :-) Is
>> the 3.4.0 version ok for webm ?
>
> No. 3.4.0 does not yet contain the code for WebM. The upcoming release
> due next week will contain all the necessary code.
>
> However, building your own Ubuntu package from my Git repository is
> pretty easy. Here are instructions:
> http://www.bunkus.org/videotools/mkvtoolnix/source.html#debian_ubuntu_package

If you need a debian maintainer for this to actually include into
debian distribution (and thus into ubuntu), I can ask a friend. Just
let me know.

Cheers,
Silvia.

antistress

unread,
May 29, 2010, 10:46:05 AM5/29/10
to WebM Discussion
Many thanks
i've made a blog post (in french) to share the info
http://libre-ouvert.toile-libre.org/?article31/transformer-un-ogg-vorbis-en-webm-sans-reencoder

Last question : with new version of mkvmerge, will still there be some
benefits to use mkclean after, or will mkmerge produce the same kind
of optimisation out-of-the-box ?

On May 29, 4:11 pm, Moritz Bunkus <mor...@bunkus.org> wrote:
> Hey,
>
> On Saturday 29 May 2010 16:02:50 antistress wrote:
>
> > Thank you Moritz Bunkus for your hard work, i really appreciate :-) Is
> > the 3.4.0 version ok for webm ?
>
> No. 3.4.0 does not yet contain the code for WebM. The upcoming release
> due next week will contain all the necessary code.
>
> However, building your own Ubuntu package from my Git repository is
> pretty easy. Here are instructions:http://www.bunkus.org/videotools/mkvtoolnix/source.html#debian_ubuntu...

Moritz Bunkus

unread,
May 29, 2010, 10:55:39 AM5/29/10
to webm-d...@webmproject.org
Hey,

On Saturday 29 May 2010 16:39:45 Silvia Pfeiffer wrote:

> If you need a debian maintainer for this to actually include into
> debian distribution (and thus into ubuntu), I can ask a friend. Just
> let me know.

Thanks for the offer, but mkvtoolnix is already part of Debian and
Ubuntu. In the past the maintainer has been pretty slow with releases so
I provide my own packages as well.

Moritz Bunkus

unread,
May 29, 2010, 10:58:15 AM5/29/10
to webm-d...@webmproject.org
Hey,

On Saturday 29 May 2010 16:46:05 antistress wrote:

> Last question : with new version of mkvmerge, will still there be some
> benefits to use mkclean after, or will mkmerge produce the same kind
> of optimisation out-of-the-box ?

Not exactly the same -- e.g. the cues (index used for seeking) is not
placed at the start of the file (this is impossible without two-pass
muxing). However, this should not be a major problem.

Other than that the files will be WebM spec compliant.

antistress

unread,
May 29, 2010, 11:16:42 AM5/29/10
to WebM Discussion
Thanks again :-)

antistress

unread,
May 29, 2010, 2:34:15 PM5/29/10
to WebM Discussion
Ok, back to my initial question !

I have used Lachlan Hunt tip to convert somme ogg vorbis files into
webm (mkvmerge+mkclean)

I guess therefore my files are valid. However still neither Firefox
nor Epiphany manage to play webm in audia tag...

any idea ?

There is my blog post http://libre-ouvert.toile-libre.org/?article29/
with HTML5/WebM and HTML5/Ogg fallback. Both browTsers jump WebM to
play the Ogg file.
Files are available here http://libre-ouvert.toile-libre.org/?static10/

Thanks

Lachlan Hunt

unread,
May 29, 2010, 6:13:33 PM5/29/10
to antistress, WebM Discussion
On 2010-05-29 20:34, antistress wrote:
> Ok, back to my initial question !
>
> I have used Lachlan Hunt tip to convert somme ogg vorbis files into
> webm (mkvmerge+mkclean)
>
> I guess therefore my files are valid. However still neither Firefox
> nor Epiphany manage to play webm in audia tag...
>
> any idea ?
>
> There is my blog post http://libre-ouvert.toile-libre.org/?article29/
> with HTML5/WebM and HTML5/Ogg fallback. Both browTsers jump WebM to
> play the Ogg file.
> Files are available here http://libre-ouvert.toile-libre.org/?static10/

Matthew Gregan already explained to you why the files aren't playing in
Firefox. Your server is sending the wrong MIME type:

$ curl -I
http://libre-ouvert.toile-libre.org/data/documents/retour_vers_le_futur_2_ohlala.webm
HTTP/1.1 200 OK
Connection: close
Content-Type: application/octet-stream
ETag: "628056108"
Last-Modified: Fri, 09 Apr 2010 00:16:08 GMT
Content-Length: 85960
Date: Sat, 29 May 2010 21:51:52 GMT
Server: Lighttpd
Set-Cookie: SERVERID=prozac; path=/
Cache-control: private

That Content-Type should be audio/webm.

If you were using Apache, then you could fix this by adding these lines
to your .htaccess file:

AddType video/webm .webm
AddType audio/webm .weba

Then change the file extension of your audio-only webm files to .weba so
they are correctly sent as audio/webm.

However, the headers above show that you're using Lighttpd and I believe
you will therefore have to edit lighttpd.conf to assign the appropriate
types. I'm not familiar with Lighttpd, but this tutorial seems to
indicate how its done.

http://redmine.lighttpd.net/wiki/1/TutorialConfiguration

I guess you should just insert these two lines in the the appropriate
location in lighttpd.conf:

mimetype.assign = (
...,
".webm" => "video/webm",
".weba" => "audio/webm",
...
)

antistress

unread,
Jun 7, 2010, 7:43:08 PM6/7/10
to WebM Discussion
Thanks for the tip and your patience

My Web Host was kind enough to apply the workaround :

here is the same audio file with .webm and weba extension for testing
purpose :
Content-Type: video/webm
Accept-Ranges: bytes
ETag: "1775140618"
Last-Modified: Sat, 29 May 2010 18:39:34 GMT
Content-Length: 86306
Date: Mon, 07 Jun 2010 22:47:23 GMT
Server: Lighttpd
Set-Cookie: SERVERID=prozac; path=/
Cache-control: private

tb@tb-desktop:~$ curl -I http://libre-ouvert.toile-libre.org/data/documents/retour_vers_le_futur_2_ohlala.weba
HTTP/1.1 200 OK
Connection: close
Content-Type: audio/webm
Accept-Ranges: bytes
ETag: "1567424431"
Last-Modified: Mon, 07 Jun 2010 23:17:51 GMT
Content-Length: 86306
Date: Mon, 07 Jun 2010 22:50:29 GMT
Server: Lighttpd
Set-Cookie: SERVERID=turlute; path=/
Cache-control: private

On the other hand i've noticed some defaults on my 2 browsers running
on My Ubuntu 10.04 Lucid system at my page http://libre-ouvert.toile-libre.org/?article29/
which has a html5 audio tag with 1°) a weba file 2°) an Ogg Vorbis
file and 3° a text as fallback

- Epiphany 2.30 with recent GStreamer (1) shows the audio player but
skip the webm/weba file to directly play the ogg vorbis one.
With a html5 audio tag with only a weba file and a text as fallback
(no ogg vorbis), the player is displayed but doesn't play anything.
The fallback text is not displayed either.

- Firefox WebM build shows the player and plays the weba file but also
display the fallback text wheareas it shouldn't display the text

Shall i fill bugs against Epiphany and Firefox ?


(1) using PPA for WebKit, Epiphany and GStreamer :
https://launchpad.net/~webkit-team/+archive/ppa
https://launchpad.net/~webkit-team/+archive/epiphany
https://launchpad.net/~gstreamer-developers/+archive/ppa


On May 30, 12:13 am, Lachlan Hunt <lachlan.h...@lachy.id.au> wrote:
> On 2010-05-29 20:34, antistress wrote:
>
> > Ok, back to my initial question !
>
> > I have used Lachlan Hunt tip to convert somme ogg vorbis files into
> > webm (mkvmerge+mkclean)
>
> > I guess therefore my files are valid. However still neither Firefox
> > nor Epiphany manage to play webm in audia tag...
>
> > any idea ?
>
> > There is my blog posthttp://libre-ouvert.toile-libre.org/?article29/
> > with HTML5/WebM and HTML5/Ogg fallback. Both browTsers jump WebM to
> > play the Ogg file.
> > Files are available herehttp://libre-ouvert.toile-libre.org/?static10/
>
> Matthew Gregan already explained to you why the files aren't playing in
> Firefox.  Your server is sending the wrong MIME type:
>
> $ curl -Ihttp://libre-ouvert.toile-libre.org/data/documents/retour_vers_le_fut...

antistress

unread,
Jun 7, 2010, 8:02:49 PM6/7/10
to WebM Discussion
Firefox bug is specific to the WebM build since current 3.6.3 version
plays the Ogg Vorbis file and doesn't show the fallback text

On Jun 8, 1:43 am, antistress <thibaut.beth...@gmail.com> wrote:
> Thanks for the tip and your patience
>
> My Web Host was kind enough to apply the workaround :
>
> here is the same audio file with .webm and weba extension for testing
> purpose :
>
> $ curl -Ihttp://libre-ouvert.toile-libre.org/data/documents/retour_vers_le_fut...
> HTTP/1.1 200 OK
> Connection: close
> Content-Type: video/webm
> Accept-Ranges: bytes
> ETag: "1775140618"
> Last-Modified: Sat, 29 May 2010 18:39:34 GMT
> Content-Length: 86306
> Date: Mon, 07 Jun 2010 22:47:23 GMT
> Server: Lighttpd
> Set-Cookie: SERVERID=prozac; path=/
> Cache-control: private
>
> tb@tb-desktop:~$ curl -Ihttp://libre-ouvert.toile-libre.org/data/documents/retour_vers_le_fut...
> HTTP/1.1 200 OK
> Connection: close
> Content-Type: audio/webm
> Accept-Ranges: bytes
> ETag: "1567424431"
> Last-Modified: Mon, 07 Jun 2010 23:17:51 GMT
> Content-Length: 86306
> Date: Mon, 07 Jun 2010 22:50:29 GMT
> Server: Lighttpd
> Set-Cookie: SERVERID=turlute; path=/
> Cache-control: private
>
> On the other hand  i've noticed some defaults on my 2 browsers running
> on My Ubuntu 10.04 Lucid system at my pagehttp://libre-ouvert.toile-libre.org/?article29/
> which has a html5 audio tag with 1°) a weba file 2°) an Ogg Vorbis
> file and 3° a text as fallback
>
> - Epiphany 2.30 with recent GStreamer (1) shows the audio player but
> skip the webm/weba file to directly play the ogg vorbis one.
> With a html5 audio tag with only a weba file and a text as fallback
> (no ogg vorbis), the player is displayed but doesn't play anything.
> The fallback text is not displayed either.
>
> - Firefox WebM build shows the player and plays the weba file but also
> display the fallback text wheareas it shouldn't display the text
>
> Shall i fill bugs against Epiphany and Firefox ?
>
> (1) using PPA for WebKit, Epiphany and GStreamer :https://launchpad.net/~webkit-team/+archive/ppahttps://launchpad.net/~webkit-team/+archive/epiphanyhttps://launchpad.net/~gstreamer-developers/+archive/ppa

Matthew Gregan

unread,
Jun 7, 2010, 9:06:15 PM6/7/10
to WebM Discussion
At 2010-06-07T16:43:08-0700, antistress wrote:
> On the other hand i've noticed some defaults on my 2 browsers running
> on My Ubuntu 10.04 Lucid system at my page http://libre-ouvert.toile-libre.org/?article29/
> which has a html5 audio tag with 1�) a weba file 2�) an Ogg Vorbis
> file and 3� a text as fallback
>
> - Firefox WebM build shows the player and plays the weba file but also
> display the fallback text wheareas it shouldn't display the text

This is a change in behaviour related to the new HTML 5 parser, which is
enabled by default in the Firefox nightly builds. Thanks for reporting
this--I've filed a bug here:
https://bugzilla.mozilla.org/show_bug.cgi?id=570641

Cheers,
-mjg

Simon Pieters

unread,
Jun 8, 2010, 4:16:46 AM6/8/10
to WebM Discussion, antistress
On Tue, 08 Jun 2010 01:43:08 +0200, antistress <thibaut...@gmail.com>
wrote:

FWIW, the fallback text should never be shown in a browser that supports
<audio>/<video>, according to the spec. It's intended for browsers that
don't support <audio>/<video>.


> Shall i fill bugs against Epiphany and Firefox ?
>
>
> (1) using PPA for WebKit, Epiphany and GStreamer :
> https://launchpad.net/~webkit-team/+archive/ppa
> https://launchpad.net/~webkit-team/+archive/epiphany
> https://launchpad.net/~gstreamer-developers/+archive/ppa
>

--
Simon Pieters
Opera Software

Reply all
Reply to author
Forward
0 new messages