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

Ramit Bhalla ramitbhalla at gmail.com
Mon Jan 20 15:43:14 CET 2014


Anyone any advice how to escape a string for the subtitle filter which
contains colons, space and a single quote?

-vf subtitles="D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD
Small'.srt"

is not working :(


On Sun, Jan 19, 2014 at 7:34 PM, Ramit Bhalla <ramitbhalla at gmail.com> wrote:

> I'm trying to use the subtitle filter to burn in the subtitles while
> encoding. My filename has a space and a quote in it. I've tried every
> possible combination of escaping, quoting, double quoting etc but I just
> can't get it to work.
>
> This is what I 'want' to execute:
>
> ffmpeg.exe -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
> yadif=0:-1:1,hqdn3d,crop=1920:1072:0:4,scale=720:400,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:partitions=all:8x8dct=1:ref=3:rc-lookahead=50:keyint=25:min-keyint=20:bframes=1:weightb=1:level=4.0:b-pyramid=normal:direct=auto:mixed-refs=1:deblock=-1,-1:no-fast-pskip=1: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 Small'-converted.mp4"
>
> the SRT filepath is
>
> D:\MCEBuddy\MCEBuddy 2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD
> Small'.srt
>
>
> Just one sample of what I tried:
> ffmpeg.exe -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
> yadif=0:-1:1,hqdn3d,crop=1920:1072:0:4,scale=720:400,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:partitions=all:8x8dct=1:ref=3:rc-lookahead=50:keyint=25:min-keyint=20:bframes=1:weightb=1:level=4.0:b-pyramid=normal:direct=auto:mixed-refs=1:deblock=-1,-1:no-fast-pskip=1: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 Small'-converted.mp4"
>
> and I get:
>
> [subtitles @ 04566740] Unable to parse option value "MCEBuddyMCEBuddy
> 2.xMCEBuddy.ServiceCMDbinx86Debugworking0HD Small.srt" as image size
> Last message repeated 1 times
> [subtitles @ 04566740] Error setting option original_size to value
> MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbinx86Debugworking0HD Small.srt.
> [Parsed_subtitles_4 @ 0282fea0] Error applying options to the filter.
> [AVFilterGraph @ 03e3b540] Error initializing filter 'subtitles' with args
> 'D:MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbinx86Debugworking0HD Small'.srt'
> Error opening filters!
>
>
> What is the right way to use this with subtitles or is it not possible at
> all?
>


More information about the ffmpeg-user mailing list