[FFmpeg-trac] #3334(undetermined:new): Escaping and quoting not working with subtitles video filter
FFmpeg
trac at avcodec.org
Mon Jan 20 17:06:41 CET 2014
#3334: Escaping and quoting not working with subtitles video filter
-------------------------------------+-------------------------------------
Reporter: ramitbhalla | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug: I have a filename and path which includes spaces,
colons and single quotes. When trying to pass the file to the subtitle
filter I followed the rules on this page:
https://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping
Quoting:
All characters enclosed between ” are included literally in the parsed
string. The quote character ' itself cannot be quoted, so you may need to
close the quote and escape it.
It doesn't work.
How to reproduce:
{{{
ffmpeg -i "D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD S
mall'.ts" -vf subtitles="D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small"\'".srt" -vcodec m
peg4 -b:v 1500k -acodec copy test.ts -y
ffmpeg version N-59362-ge079661 Copyright (c) 2000-2013 the FFmpeg
developers
built on Dec 25 2013 17:42:26 with gcc 4.8.0 (GCC)
configuration: --arch=x86 --target-os=mingw32 --cross-
prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/bin
/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264
--enable-avisynth --enable-libxvid --enable-lib
mp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-
libvorbis --enable-libtheora --enable-libspeex --enabl
e-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype
--enable-libopus --disable-w32threads --enable-frei0r
--enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-
libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable
-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc
--enable-libschroedinger --enable-libvpx --enable-
libilbc --enable-iconv --enable-libtwolame --extra-
cflags=-DLIBTWOLAME_STATIC --enable-libmodplug --extra-libs=-lstdc++
--enable-libzvbi --enable-libcaca
--prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32
--enab
le-static --disable-shared --enable-libsoxr --enable-fontconfig --enable-
libass --enable-libutvideo --enable-libbluray -
-extra-cflags= --enable-nonfree --enable-libfdk-aac --enable-runtime-
cpudetect
libavutil 52. 59.100 / 52. 59.100
libavcodec 55. 46.100 / 55. 46.100
libavformat 55. 22.100 / 55. 22.100
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 0.102 / 4. 0.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpegts, from 'D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small'.ts':
Duration: 00:01:52.06, start: 1.400000, bitrate: 13152 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:
9], max. 38810 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
5.1(side), fltp, 384 kb/s
Stream #0:2[0x102]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
stereo, fltp, 192 kb/s
[subtitles @ 048d3420] Unable to parse option value "MCEBuddyMCEBuddy
2.xMCEBuddy.ServiceCMDbinx86Debugworking0HD Small.
srt" as image size
Last message repeated 1 times
[subtitles @ 048d3420] Error setting option original_size to value
MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbinx86Debugwor
king0HD Small.srt.
[Parsed_subtitles_0 @ 048d33a0] Error applying options to the filter.
[AVFilterGraph @ 0243e2a0] Error initializing filter 'subtitles' with args
'D:MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbin
x86Debugworking0HD Small'.srt'
Error opening filters!
}}}
I referred to the advice on ticket #2067 and escaped the colon. It still
doesn't work:
{{{
ffmpeg -i "D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD S
mall'.ts" -vf subtitles="D"\:"\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small"\'".srt" -vcode
c mpeg4 -b:v 1500k -acodec copy test.ts -y
ffmpeg version N-59362-ge079661 Copyright (c) 2000-2013 the FFmpeg
developers
built on Dec 25 2013 17:42:26 with gcc 4.8.0 (GCC)
configuration: --arch=x86 --target-os=mingw32 --cross-
prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/bin
/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264
--enable-avisynth --enable-libxvid --enable-lib
mp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-
libvorbis --enable-libtheora --enable-libspeex --enabl
e-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype
--enable-libopus --disable-w32threads --enable-frei0r
--enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-
libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable
-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc
--enable-libschroedinger --enable-libvpx --enable-
libilbc --enable-iconv --enable-libtwolame --extra-
cflags=-DLIBTWOLAME_STATIC --enable-libmodplug --extra-libs=-lstdc++
--enable-libzvbi --enable-libcaca
--prefix=/home/mcebuddy/Software/ffmpeg/sandbox/mingw-w64-i686/i686-w64-mingw32
--enab
le-static --disable-shared --enable-libsoxr --enable-fontconfig --enable-
libass --enable-libutvideo --enable-libbluray -
-extra-cflags= --enable-nonfree --enable-libfdk-aac --enable-runtime-
cpudetect
libavutil 52. 59.100 / 52. 59.100
libavcodec 55. 46.100 / 55. 46.100
libavformat 55. 22.100 / 55. 22.100
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 0.102 / 4. 0.102
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpegts, from 'D:\MCEBuddy\MCEBuddy
2.x\MCEBuddy.ServiceCMD\bin\x86\Debug\working0\HD Small'.ts':
Duration: 00:01:52.06, start: 1.400000, bitrate: 13152 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:
9], max. 38810 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
5.1(side), fltp, 384 kb/s
Stream #0:2[0x102]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
stereo, fltp, 192 kb/s
[subtitles @ 04973240] Unable to parse option value "MCEBuddyMCEBuddy
2.xMCEBuddy.ServiceCMDbinx86Debugworking0HD Small.
srt" as image size
Last message repeated 1 times
[subtitles @ 04973240] Error setting option original_size to value
MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbinx86Debugwor
king0HD Small.srt.
[Parsed_subtitles_0 @ 049735c0] Error applying options to the filter.
[AVFilterGraph @ 0283e180] Error initializing filter 'subtitles' with args
'D:MCEBuddyMCEBuddy 2.xMCEBuddy.ServiceCMDbin
x86Debugworking0HD Small'.srt'
Error opening filters!
}}}
The subtitle filter parsing is broken.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3334>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list