This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Spaces in path names

Tags: None
(comma "," separated)
delfine
Registered Member
Posts
30
Karma
0

Spaces in path names

Sat Apr 14, 2012 11:57 am
Melt doesn't seem to like spaces in path names. I have a Western Digital Hard drive which is quite unfortunately called "WD HDD", and Kdenlive is unable to render either from the GUI or from the command line script it produces.
delfine
Registered Member
Posts
30
Karma
0

Re: Spaces in path names

Sat Apr 14, 2012 12:11 pm
Changing the name of the external drive to WDHDD (without the space) and doing global search/replace with the name of the new drive name within the Kdenlive project file solved the problem, but I wanted to mention it anyway in case someone else was tearing their hair out wondering why the renderer wasn't working.
j-b-m
Registered Member
Posts
804
Karma
1

Re: Spaces in path names

Sat Apr 14, 2012 5:09 pm
Which Kdenlive /MLT version are you using? It works correctly for me with current git versions and should also work with Kdenlive 0.8.x
delfine
Registered Member
Posts
30
Karma
0

Re: Spaces in path names

Mon Apr 16, 2012 12:38 pm
Hello j-b-m, thanks for your reply.

I'm using Kdenlive 0.8.3 and Melt 0.7.9.

I've already changed the name of the external drive, but I've found that I can reproduce the problem if I put a space in the file name of the script I am exporting from the renderer. If I put a space in the target file name only (but not in the script name), the script runs fine.

This leads me to believe that there's a problem with how the script deals with the SOURCE variable. It wants to interpret the space as a new argument.

Perhaps it's something as small as putting quotation marks around the $SOURCE variable when it is called in the PARAMETERS declaration, but I'm no expert.

Here are the contents of "test script.sh":

#! /bin/sh

SOURCE="/home/delfine/kdenlive/scripts/test script.sh.mlt"
TARGET="file:///home/delfine/kdenlive/test%20file.mp4"
RENDERER="/usr/bin/kdenlive_render"
MELT="/usr/bin/melt"
PARAMETERS="-pid:2150 $MELT /home/delfine/.kde/share/apps/kdenlive/profiles/customprofile0 avformat - $SOURCE $TARGET f=mp4 hq=1 acodec=aac ab=384k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 vb=12000k g=250 bf=3 b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9 pass=1 an=1 threads=1 real_time=-1"
$RENDERER $PARAMETERS

And here is the command line:

bash '/home/delfine/kdenlive/scripts/test script.sh'
//STARTING RENDERING: false , false , "/usr/bin/melt" , "/home/delfine/.kde/share/apps/kdenlive/profiles/customprofile0" , "avformat" , "-" , "/home/delfine/kdenlive/scripts/test" , "script.sh.mlt" , () , ("file:///home/delfine/kdenlive/test%20file.mp4", "f=mp4", "hq=1", "acodec=aac", "ab=384k", "ar=48000", "pix_fmt=yuv420p", "vcodec=libx264", "minrate=0", "vb=12000k", "g=250", "bf=3", "b_strategy=1", "subcmp=2", "cmp=2", "coder=1", "flags=+loop", "flags2=dct8x8", "qmax=51", "subq=7", "qmin=10", "qcomp=0.6", "qdiff=4", "trellis=1", "aspect=@16/9", "an=1", "threads=1", "real_time=-1") , -1 , -1
Started render process: "/usr/bin/melt" "/home/delfine/kdenlive/scripts/test -profile /home/delfine/.kde/share/apps/kdenlive/profiles/customprofile0 -consumer avformat:script.sh.mlt progress=1 file:///home/delfine/kdenlive/test%20file.mp4 f=mp4 hq=1 acodec=aac ab=384k ar=48000 pix_fmt=yuv420p vcodec=libx264 minrate=0 vb=12000k g=250 bf=3 b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=@16/9 an=1 threads=1 real_time=-1"
Rendering of "script.sh.mlt" finished
j-b-m
Registered Member
Posts
804
Karma
1

Re: Spaces in path names

Mon Apr 16, 2012 9:02 pm
Ok, thanks for your feedback. I now fixed the problem in git.
User avatar
DaveQB
Registered Member
Posts
15
Karma
0
OS

Re: Spaces in path names

Sun Apr 21, 2013 10:29 am
I just wanted to say I have the same issue.
ver 0.8.2.1 | Mint 13

I noticed the shell script didn't protect the $SOURCE and $TARGET variables, so I put quotes around them but same result; it still splits on the space.

eg

//STARTING RENDERING: false , false , "/usr/bin/melt" , "atsc_1080p_25" , "avformat" , "-" , "/mnt/bravo/TV/Ross" , "Kemp/scripts/Ep01-1080p.sh.mlt"

I tried putting in an HTML space character for the space like the script has in the target
eg
SOURCE="/mnt/bravo/TV/Ross%20Kemp/scripts/Ep01-1080p.sh.mlt"

There is no error now and the output looks right, but the render finishes straight away and the output file is 0 bytes.


Which ver is the fix for this in?

Thanks.

User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS

Re: Spaces in path names

Mon Apr 22, 2013 6:06 am
Try for the most recent version 0.9.6 or the one before 0.9.4

http://kdenlive.org/downloading-and-installing-kdenlive

I note that mint is based on ubuntu so you probably can just use Sunab's alternative repository as described here http://kdenlive.org/download-ubuntu
User avatar
DaveQB
Registered Member
Posts
15
Karma
0
OS

Re: Spaces in path names

Thu Apr 25, 2013 2:18 am
ttguy,

Thanks for that. I will take that for a spin.

Cheers.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar