multifilesrc & splitfilesrc difference

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Feb 8 02:48:08 PST 2013


On Fri, 2013-02-08 at 02:27 -0800, Paddy wrote:

Hi Paddy,

> I'm wondering what the differences are between multifilesrc & splitfilesrc -
> in particular when should one be used instead of the other. The information
> available is a little sparse.

multifilesrc will output each file as one single buffer. This is
sometimes used to feed multiple image files into a pipeline for
examples. There's not really any support for things like seeking etc.

splitfilesrc is basically like filesrc, only that you can pass multiple
input files to it. It will pretend all of the input files are one giant
file, so it's basically the same as doing

  $ cat file1 file2 file3 > bigfile

and then using filesrc location=bigfile ! ...

This is useful if you have, say, a bunch of files that were split for
some reason, e.g. because the file system used only supports files up to
2GB or so. Then you can still play the whole stream as if it was a
single file. (This was written for use with mpeg-ps files that were
split into pieces with multifilesrc)


> I'm asking as I'm playing back matroska video files (each ~2mins in length)
> using a (0.10) pipeline that looks a bit like: 
> splitfilesrc->demux->decode->imagesink
> however these files are not always contiguous - there may be a 3hr block
> followed by a 3hr gap followed by another 3hr block. splitfilesrc sees this
> as one 6hr long file rather than 2 3hr files - I could put them in different
> directories but that would be cumbersome & much pain. 

I don't think this is going to work well with matroska files (if it
does, it's by accident rather than design), since the demuxer basically
needs to be aware that there are distinct files and needs to reset
itself and process headers of the next file etc. etc. and that won't
work. With streaming-formats like MPEG-{TS,PS} or Ogg this works
differently.


> Could I use multifilesrc instead - it has start & stop indexes which would
> get over this issue. I'd try this but I'm stuck at gst-plugins-good-0.10.30
> on Fedora 16 atm trying to figure out how to get gst-plugins-good-0.10.31 (&
> the multifile goodness it contains) on there without breaking everything. 

Not sure I understood what you are actually trying to achieve. You want
to play 2 (or more) matroska files seamlessly in a row? Or play them in
a row, but taking into account some internal timestamps?

Cheers
 -Tim



More information about the gstreamer-devel mailing list