GNOME Bugzilla – Bug 311586
Matroska mux/demux don't support flac
Last modified: 2008-08-22 16:04:54 UTC
The matroska mux/demuxers don't take or output flac audio.
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.
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?
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.
Confirm... Wait for good news ^_^
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.
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.