Jump to content

FFProbe failing on path with " in it


Recommended Posts

thefirstofthe300
Posted

So I recently renamed all of my music and the folders (had to do with getting semicolons to separate artists in the tags for the server) and ended up with a directory name 

/multimedia/Music/"Weird Al" Yankovic

which causes failures when FFmpeg attempts to FFprobe it.  I know this isn't exactly good practice for file naming but Linux can handle it just fine so this kind of name should be tolerated IMO.

 

Here is the log.

log.txt

Posted

can you figure out how to escape it on the command line? thanks.

thefirstofthe300
Posted (edited)

As in a script to do so?  Or just what to use?

 

Normally, simply prefixing a special character with a backslash (\) will do the job.  The other way to approach it is to put single quotes around the string that contains the double quotes (the single quotes, at least in bash, escape spaces, double quotes, and other special characters; the same will be true of double quotes: they will escape single quotes, spaces, and special characters).

Edited by DaBungalow
Posted

as in what to use. for example, create a shell script that launches ffmpeg with that file 

thefirstofthe300
Posted

Bash script is attached.

 

Just drop the .txt and run. Be sure you have an mp3 file named

/multimedia/Music/"Weird Al" Yankovic/Mandatory Fun/01 - Handy.mp3

launch-ffmpeg.sh.txt

Posted

well no, something that has more params. because with ffmpeg we always use -i before the input, and we always specify the protocol, in this case file. and that has to be wrapped with quotes itself

ffmpeg -i file:"{path}"
techywarrior
Posted

Typically in Linux you can just escape the it with \

 

you can even escape spaces with \ so you don't have to quote the path like in Windows:

ffmpeg - file:/path\ to\ file/filename.extension
thefirstofthe300
Posted

Did not know this.

 

How 'bout this?  I checked and it works.

launch-ffmpeg.sh.txt

Posted

thanks. that might be ok.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...