issue with spaces in filesink location

Pablo Rodríguez oinos at web.de
Fri Dec 10 16:35:37 UTC 2021


On 12/9/21 10:54 PM, Antonio Ospite via gstreamer-devel wrote:
> On Thu, 9 Dec 2021 18:56:50 +0100
> Pablo Rodríguez via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> [...]
>>
>> My error should have a simple fix, but how can I get that filesink
>> accepts URI to set the output file?
>
> filesink accepts locations as local paths, not URIs, it will convert
> the filename to a URI internally, as you can see if you set
> GST_DEBUG=filesink:4, but this is a detail.

Many thanks for your reply, Antonio.

I had problems with that, because in Windows you have to replace paths
then "\\" with "/".

> [...]
> -        # ~ self.audiofilename = sys.argv[1]
> -        self.audiofilename = sys.argv[1].replace(" ", "%20")
> +        self.audiofilename = sys.argv[1]

Your fix solves the issue, but I still needed to add:

        self.audiofilename = sys.argv[1].replace("\\", "/")

Otherwise, I don’t get paths working right in Windows. I wonder whether
this is intended.

Many thanks for your help,

Pablo


More information about the gstreamer-devel mailing list