After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 171563 - Vorbis support for Matroska muxer
Vorbis support for Matroska muxer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other All
: Normal enhancement
: 0.8.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-25 08:59 UTC by Michal Benes
Modified: 2005-07-20 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding Vorbis to Matroska muxer. (4.97 KB, patch)
2005-03-25 09:01 UTC, Michal Benes
needs-work Details | Review
Matroska muxer test (1.74 KB, text/x-csrc)
2005-03-29 08:46 UTC, Michal Benes
  Details
Patch test case. (1.74 KB, text/plain)
2005-06-22 08:56 UTC, Michal Benes
  Details
New version of matroska Vorbis support patch (2.12 KB, patch)
2005-06-22 12:45 UTC, Michal Benes
none Details | Review
Vorbis support to matroska (3.28 KB, patch)
2005-06-22 13:00 UTC, Michal Benes
none Details | Review

Description Michal Benes 2005-03-25 08:59:49 UTC
Here is a patch that adds Vorbis support to Matroska muxer.
Comment 1 Michal Benes 2005-03-25 09:01:08 UTC
Created attachment 39234 [details] [review]
Patch adding Vorbis to Matroska muxer.
Comment 2 Michal Benes 2005-03-25 09:13:40 UTC
This patch involves rewriting the tracks info after gst_matroska_mux_prepare_data. 
It seems like a bad hack to me, but the muxer did not work unless I have written
whole header before gst_matroska_mux_prepare_data in gst_matroska_mux_write_data.

Sidenote: the first gst_matroska_mux_prepare_data in _loop function always fails
in my setup, so I had to comment out the error fallback.

I will try to look deeper into these problems.
Comment 3 Ronald Bultje 2005-03-25 17:45:14 UTC
The failing prepare_data() implies a bug elsewhere. It should work (in theory).
As for the vorbis header data, I think you need to get the first three buffers
fromt he stream for that. It is not in the caps, as far as I know.

What is your testcase?
Comment 4 Michal Benes 2005-03-29 08:46:01 UTC
Created attachment 39372 [details]
Matroska muxer test

Here is my simple test code. I am using gstreamer 0.8.9 and gstreamer-plugins
0.8.8 from Debian Sarge (testing).

The problem with failing prepare_data() occurs here but also in any other setup
I have tried so far. 

Regarding the ogg vorbis setup headers: rawvorbis encoder sets them to
"streamheader" caps metadata when its _chain function is first called. (see
gst-plugins/ext/vorbis/vorbisenc.c)
Comment 5 Ronald Bultje 2005-06-09 17:07:38 UTC
It has always worked for me, so I'd assume you're doing something weird. Muxers
assume you link pads, and only then start iterating. Any other setup is not
supported.

I find your patch weird. First of all, the changes in data handling aren't
obvious, some even look wrong. The _mux_header_tracks() part, for example, is
very unobvious for me; The reason that we need data before writing the tracks is
*so that* we will have the data type of all contained streams. Other muxers work
this way, too. I'm willing to apply the vorbis-part of it and make that work,
but not the rest.

Your testcase has x-csrc as mimetype, but does not open in any of my editors.
Can you please re-attach it?
Comment 6 Michal Benes 2005-06-22 08:56:37 UTC
Created attachment 48141 [details]
Patch test case.

I reattach the testcase with mime type text/plain.
Comment 7 Michal Benes 2005-06-22 12:45:32 UTC
Created attachment 48152 [details] [review]
New version of matroska Vorbis support patch

I have investigated this problem and I have found that the reason why I was not
able to run gst_matroska_mux_prepare_data before writing header (what caused
that I had not correct vorbis headers) was a bug in
gst_matroska_mux_prepare_data (filled as bug #308633), this new patch need not
use the _mux_header_tracks() part.
Comment 8 Michal Benes 2005-06-22 13:00:14 UTC
Created attachment 48153 [details] [review]
Vorbis support to matroska

I am sorry, the last patch was in a bad format. I am resubmitting.
Comment 9 Ronald Bultje 2005-07-20 17:48:13 UTC
Thanks, looks perfect.