[FFmpeg-trac] #3334(undetermined:reopened): Escaping and quoting not working with subtitles video filter

FFmpeg trac at avcodec.org
Mon Jan 20 22:07:14 CET 2014


#3334: Escaping and quoting not working with subtitles video filter
-------------------------------------+-------------------------------------
             Reporter:  ramitbhalla  |                    Owner:
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:               |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by ramitbhalla):

 Okay taking a comment from another user (@james) below, the issue is that
 the documentation is incorrect. Each special character needs to be
 escapted within the quotes and then each escape needs to be reescaped!
 This is really silly but either way either the documentation needs to be
 updated or ffmpeg needs to be fixed.


 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:
 {{{
 ffmpeg.exe -i "D:\MCEBuddy\MCEBuddy
 2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small'.ts" -vf
 subtitles="D\\:\\\\MCEBuddy\\\\MCEBuddy
 2.x\\\\MCEBuddy.ServiceCMD\\\\bin\\\\x86\\\\Debug\\\\working0\\\\HD
 Small\\\'.srt" -vcodec mpeg4 -b 1400k -acodec copy test.ts -y
 }}}


 MAkes me wonder - are there any more characters to be escaped by beyond
 the three given in the documentation \ and ' (: isn't event mention and
 needs to be escaped)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3334#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list