[FFmpeg-devel] [PATCH] lavf: add a concat demuxer.

Nicolas George nicolas.george at normalesup.org
Fri Nov 23 16:17:13 CET 2012


Le duodi 2 frimaire, an CCXXI, Clément Bœsch a écrit :
> The only remark I have is that I'd love to have a "repeat" mode per file
> in this demuxer, so it might be interesting to define a specs for the
> "playlist format"

My idea for the script format beyond what is already implemented is a
sequence of lines with the format "keyword [arguments]", where all keywords
apply to the last introduced file (with the file keyword), or globally if
they come at the beginning. Very basic, but should work.

A repeat option should fit nicely in that scheme.

>		     (which will also solve the probing problem you mention
> in the doc).

The probing problem can be solved with a fixed string on the first line,
maybe "ffconcat version 1", which fits in the general syntax, and probe with
a simple memcmp.

But the probing problem is not limited to recognizing the file: it is also a
security concern, as Reimar reminds us frequently: a file format that can be
used to get ffmpeg to open any file on the system can cause a whole lot of
problems.

My idea for that issue is to have a "safe_filenames" option: if it is
enabled, it will accept only files with a safe filename (no special char, no
leading dot, no absolute path, subdirectories to consider). The option would
be enabled, at least if the file is probable.

Regards,

-- 
  Nicolas George


More information about the ffmpeg-devel mailing list