[FFmpeg-user] recent change to libavfilter hinders the movie filter to work on Windows
Stefano Sabatini
stefasab at gmail.com
Tue Nov 1 19:00:04 CET 2011
On date Tuesday 2011-11-01 10:45:57 +0100, PixelPartner encoded:
> Working with the following version under Windows 7 64
>
> ffmpeg N-34031-ge403a97
> libavutil 51. 22. 0 / 51. 22. 0
> libavcodec 53. 23. 0 / 53. 23. 0
> libavformat 53. 17. 0 / 53. 17. 0
> libavdevice 53. 4. 0 / 53. 4. 0
> libavfilter 2. 45. 0 / 2. 45. 0
> libswscale 2. 1. 0 / 2. 1. 0
> libpostproc 51. 2. 0 / 51. 2. 0
>
> There was recently a change that cripples the libavfilter movie= to accept Windows-Style file names.
> All of the following causes failure:
AFAIK there is no regression, there was no change in the way the movie
command is parsed.
> movie=C:\folder\file.ext
> movie=C:\\folder\\file.ext
> movie='C:\folder\file.ext'
> movie=C:/folder/file.ext
>
> If I remove C: it works, but I assume it works only with files on the "current" drive.
>
> It seems to me that someone added paramter parsing \\ -> \ and : for values also to the movie filter option list.
> Does this make any sense ?
A filename of this kind:
movie=C:\folder\file.ext
is de-escaped three times before to be used as a filename.
So you need to perform three level of escaping when providing such a
filename to libavfilter via commandline.
1. first escaping, de-escaping is performed by the movie filter
itself, will convert \X -> X, and will preserve strings between single
quotes.
movie=C:\folder\file.ext
->
movie='C:\folder\file.ext'
2. second escaping, de-escaping is performed when reading the movie
file description:
movie='C:\folder\file.ext'
->
movie=\'C:\\folder\\file.ext\'
3. third escaping, de-escaping is performed by your shell, in the case
of a bash shell:
movie=\'C:\\folder\\file.ext\'
->
"movie=\'C:\\\\folder\\\\file.ext\'"
I understand that all this is confusing and should be documented
better, but I see no other way to deal with strings which contain
characters which are special to the parsing function used
(libavutil/parseutils.h:av_get_token()).
Please tell if the attached patch is helpful to you.
--
ffmpeg-user random tip #6
Please follow netiquette rules while posting to ffmpeg-user:
http://linux.sgms-centre.com/misc/netiquette.php
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavfi-movie-extend-documentation-regarding-filename-.patch
Type: text/x-diff
Size: 1718 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111101/50fe9211/attachment.bin>
More information about the ffmpeg-user
mailing list