two problems with latest matroska mux/demux

grd grd at loganmill.net
Sun Jul 26 11:31:46 PDT 2015


So it turns out that the stream tags are being written. My problem was with
mkvinfo: just running 'mkvinfo file.mkv' won't always report all stream
tags: looks like it depends on how the mkv file is
structured.  But calling it with an increased verbosity (i.e. -v)  does,
though because of the profuse output, had to grep to filter the result from
the noise:

$ mkvinfo  -v  x.mkv | grep -A 20 Tags
|+ Tags
| + Tag
|  + Targets
|   + TrackUID: 8728794964024215333
|  + Simple
|   + Name: COMMENTS
|   + String: hello


After a closer reading of the src, it seems that matroskamux will write out
stream tags at one of two times (but not both):

1. In gst_matroska_mux_start(...): called when the muxer receives its first
buffer. Stream tags are written here if and only if streamable=true.  If its
true, then any already-injected tags will be written, whether or not the
muxer is ever closed cleanly.

2. In gst_matroska_mux_finish (...): called when the muxer senses EOS, but
only if streamable=false (the default). If streamable=true, it is never
called, whether or not the muxer is closed cleanly. Writes out tags, track
durations, and indexes.

I have an application that muxes the output of multiple ip cameras into a
single file.  When processing the resulting file, I need to reliably
identify which stream was created by which camera.  Perhaps there are better
ways of doing this, but using the 'taginject' element to associate an
identifier (for example, the camera's rtsp uri) with each camera's data
stream seemed like a straight-forward solution.  Unfortunately, I can't
guarantee that the underlying pipeline will always be shut down gracefully. 
If its not, then unless I set streamable=true, I lose the identifier/camera
association.  If I do set streamable=true, I lose accurate durations and
indexes.  

Course, maybe there's a better way to to this?

-grd









--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/two-problems-with-latest-matroska-mux-demux-tp4672845p4672853.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list