[FFmpeg-user] Subtitle filter and filename with quotes and spaces

Pavel Koshevoy pkoshevoy at gmail.com
Mon Jan 20 19:23:05 CET 2014


On 01/20/2014 08:41 AM, Ramit Bhalla wrote:
> I've even tried this:
>
> -vf subtitles='D'\:\\'MCEBuddy'\\'MCEBuddy
> 2.x'\\'MCEBuddy.ServiceCMD'\\'bin'\\'x86'\\'Debug'\\'working0'\\'HD
> Small'\''.srt'
>
> and it still throws an error:
>
> [NULL @ 04596620] Unable to find a suitable output format for
> '2.x'\\'MCEBuddy.ServiceCMD'\\'bin'\\'x86'\\'Debug'\\'working0'\\'HD'
> 2.x'\\'MCEBuddy.ServiceCMD'\\'bin'\\'x86'\\'Debug'\\'working0'\\'HD:
> Invalid argument
>

Again, this has nothing to do with ffmpeg.

If you tried this command it would similarly fail:

dir 'D'\:\\'MCEBuddy'\\'MCEBuddy 2.x'\\'MCEBuddy.ServiceCMD'\\'bin'\\'x86'\\'Debug'\\'working0'\\'HD Small'\''.srt'


It should become obvious to you by now, that windows command shell does not interpret the quotes.  If you have a space in the file path that you wish to pass as a parameter via windows command shell, then you have to prefix the space with an escape character.  On UNIX systems the escape character is \, on windows it's ^.  So, try that:

dir D:\MCEBuddy\MCEBuddy^ 2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD^ Small'.srt

and make sure the path is actually correct, that you didn't misspell it somewhere

Once you get the dir command to accept the properly escaped file path, then you can pass that file path to ffmpeg.



More information about the ffmpeg-user mailing list