Trouble getting fully valid files with matroskamux

Pedro Côrte-Real pedro at pedrocr.net
Thu Jan 2 09:21:04 PST 2014


On Tue, Dec 31, 2013 at 6:20 AM, Pedro Côrte-Real <pedro at pedrocr.net> wrote:
> I've been using matroska as a container for h264 and am having trouble
> getting correct file sizes when read by totem/vlc:
>
> 1) When streamed from a live source (rtsp) vlc/totem don't know the
> video length at the beginning of playback
> 2) When concatenated from several demuxed mkv files the total length
> is correct, the total file size is correct too, but when it gets to
> the end of the length of the first original file the stream stops
> playing
> 3) vlc always complains of "mkv demux error: Cluster too big, aborting"

So 1) and 3) got fixed with the proper EOS sending to the elements to
close the files properly. 2) however is still there and is very
strange:

When I concatenate the files with this code:

https://github.com/pedrocr/camerasink/blob/67078c0360f499755a742f7a2fa199b9a34fb368/bin/testread.c

I get a file with the following characteristics:

1) Both totem and vlc say it has the full length
2) Both totem and vlc stop playing with EOF a the moment of the first
file input swap
3) Using gst-master and doing "gst-launch-1.0 filesrc
location=file.mkv ! matroskademux ! avdec_h264 ! videoconvert !
ximagesink" also stops with EOS at the moment of the first file swap
4) And yet "gst-launch-1.0 filesrc location=file.mkv ! matroskademux !
avdec_h264 ! filesink location=output.raw" actually outputs the full
stream

My guess is that something is introducing an EOS marker in the h264
stream itself. My pipeline is matroskademux ! matroskamux so maybe
matroskademux outputs some form of an EOF marker on the stream itself
before it sends EOS to the pipeline?

Pedro


More information about the gstreamer-devel mailing list