Silly filesink question

Tim Müller tim at centricular.com
Thu Jun 19 01:13:38 PDT 2014


On Wed, 2014-06-18 at 17:45 -0700, fahad wrote:
> it seems that I cannot specify a path containing empty spaces as part of
> 'location' property of filesink. Since it is not a URI, attempting to add
> %20 in place of a space does not work either. Any one has a work around for
> this issue? or there is another element that can be used to write captured
> streams to a file. 
> Saving the files temporarily and then moving it to the correct path
> (containing spaces) would be an option but I would like to avoid it if at
> all possible.

Sure you can, but since we have no idea what you're doing exactly, we
can't really help..

If you're writing code, setting the location property to a filename
containing spaces should work just fine.

In gst-launch from the command line, you need to escape it like this:

$ echo hello > "test file.txt"
$ gst-launch-1.0 filesrc location= test\ file.txt ! fakesink dump=true

If you're using gst_parse_launch() and a pipeline string in your code,
you need to give the filesrc/sink a name like filesink name=sink and
then get it with sink=gst_bin_get_by_name(pipeline, "sink") and then set
the location property on it.

If that doesn't cover what you're doing, you should perhaps tell us what
you've tried exactly.

 Cheers 
  -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list