[FFmpeg-user] Subtitle filter and filename with quotes and spaces
ramitbhalla at gmail.com
Mon Jan 20 22:18:53 CET 2014
James, I didn't get on opint, why a triple \ before the ' (why not double)?
On Mon, Jan 20, 2014 at 3:57 PM, Ramit Bhalla <ramitbhalla at gmail.com> wrote:
> Thanks James, you're a genius. It worked! I was really losing my mind
> trying to figure this one out.
> You're right, it's kinda stupid but that what it is, you need to escape
> the \ : and ' and the those slashes need to be reescaped!
> I wonder if there's are any other special characters that ffmpeg requires
> to be escaped apart from \ : and '
> On Mon, Jan 20, 2014 at 3:25 PM, Pavel Koshevoy <pkoshevoy at gmail.com>wrote:
>> On 1/20/2014 12:28 PM, James Darnley wrote:
>>> On 2014-01-20 19:39, Ramit Bhalla wrote:
>>>> Okay will try it. But then help me understand a simple quotes around
>>>> the path and file works fine for the -i parameter. No escaping etc.
>>> Sorry to invalidate everyone's previous work here but this problem is is
>>> the fault of ffmpeg and libavfilter's escaping hell!
>>> Windows correctly passes your command line to ffmpeg. The problem comes
>>> when ffmpeg tries to parse the filename. ':' separates options
>>> for filters so you need to escape that. '\' (backslash) in the filename
>>> also need to be escaped. ffmpeg's escape character is '\' (backslash).
>>> This means that the filename for the subtitle filter needs to be, with
>>> the quotes:
>>>> "D\\:\\\\MCEBuddy\\\\MCEBuddy 2.x\\\\MCEBuddy.ServiceCMD\\\\
>>>> bin\\\\x86\\\\Debug\\\\working0\\\\HD Small\\\'.srt"
>>> And the full command line:
>>>> C:\Users\James>ffmpeg.exe -loglevel verbose -probesize 100M
>>>> -analyzeduration 300M -threads 0 -drc_scale 0.8 -y -i "D:\MCEBuddy\MCEBuddy
>>>> 2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small'.ts" -ss 3 -vf
>>>> subtitles="D\\:\\\\MCEBuddy\\\\MCEBuddy 2.x\\\\MCEBuddy.ServiceCMD\\\\
>>>> bin\\\\x86\\\\Debug\\\\working0\\\\HD Small\\\'.srt" -vcodec libx264
>>>> -b 1400000 -x264opts me=hex:trellis=1:subq=8:
>>>> no-dct-decimate=1:b-adapt=0:threads=auto -sn -acodec libfdk_aac -ab
>>>> 256k -cutoff 18000 -ac 2 "D:\MCEBuddy\MCEBuddy 2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD
>> I am sorry to have mislead Ramit earlier. I've used the ^ escape
>> sequence myself in a batch file (not with ffmpeg), so I know it works for
>> However, I tried dir C:\Program^ Files\ and it didn't work, so my
>> suggestion was wrong.
>> Still, I've googled this up just now, maybe it will help:
>> Sorry for causing the confusion,
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user