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 311586 - Matroska mux/demux don't support flac
Matroska mux/demux don't support flac
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 340492
Blocks:
 
 
Reported: 2005-07-26 12:09 UTC by Iain
Modified: 2008-08-22 16:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Iain 2005-07-26 12:09:33 UTC
The matroska mux/demuxers don't take or output flac audio.
Comment 1 Michal Benes 2006-01-16 10:29:32 UTC
Hi, demuxer can be implemented easily.

The problem with muxer is that I need to know all the stream headers in the time when flacenc sends its first buffer (matroska header is written at the time when pads_collected is called for the first time).

This will probably need a change in flacenc.
Comment 2 Tim-Philipp Müller 2006-04-25 19:40:20 UTC
Step #1 would be to make flacenc put the stream headers into the caps it attaches to the first buffer as an array (list? I forget which one) of GstBuffers called 'streamheaders', just like vorbisenc already does. That way matroskamux should be able to pick these up in the setcaps function before it gets the first buffer.

For flac support in the demuxer, I'd really like a sample file. Does anyone have one at hand by any chance?
Comment 3 Tim-Philipp Müller 2006-05-25 11:02:48 UTC
Note: when adding flac support to matroska-mux, watch out for flacenc sending a newsegment BYTE event with offset 0 and another header packet with the total duration when it receives an EOS and ignore that in the muxer.
Comment 4 Tsai Dung-Bang 2006-08-04 11:11:33 UTC
Confirm...

Wait for good news   ^_^ 
Comment 5 Tim-Philipp Müller 2006-09-04 15:08:02 UTC
Update:

 2006-09-04  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/matroska/matroska-demux.c: (gst_matroska_demux_push_hdr_buf),
        (gst_matroska_demux_push_flac_codec_priv_data),
        (gst_matroska_demux_push_xiph_codec_priv_data),
        (gst_matroska_demux_parse_blockgroup_or_simpleblock),
        (gst_matroska_demux_video_caps), (gst_matroska_demux_audio_caps):
        * gst/matroska/matroska-ids.h:
          Add basic FLAC support (#311586), not perfect yet though, needs some
          tweaking in flacdec; also, seeking could be better.
          Do better bounds checking when deserialising vorbis stream headers
          to make sure we don't read beyond the end of the buffer on bad input.

Comment 6 Sebastian Dröge (slomo) 2008-08-09 13:48:06 UTC
2008-08-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        * gst/matroska/matroska-mux.c: (flac_streamheader_to_codecdata),
        (gst_matroska_mux_audio_pad_setcaps):
        Add support for muxing FLAC into Matroska containers.
        Fixes bug #311586.