[FFmpeg-user] ffmpeg pipe svg image sequence error
Michael Lucarz
michael.lucarz at gmail.com
Tue Nov 7 00:27:55 EET 2017
With ffmpeg 3.4, you can now render svg image sequences. With the following
it works:
ffmpeg -i images/image-%02d.svg video.mp4
However, piping via
cat images/*.svg | ffmpeg -f image2pipe -c:v svg -i - video.mp4
results in the following error
ffmpeg version N-88409-ga8305b0ea3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.37)
configuration: --prefix=./bin --enable-gpl --enable-nonfree
--enable-librsvg --enable-libass --enable-libfdk-aac
--enable-libfreetype --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
--enable-libopus --enable-libxvid
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 1.100 / 58. 1.100
libavformat 58. 0.102 / 58. 0.102
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.100 / 3. 0.100
libpostproc 55. 0.100 / 55. 0.100
[image2pipe @ 0x7fe0d1800000] Could not find codec parameters for
stream 0 (Video: svg (librsvg), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: svg, none, 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to 'video.mp4':
Output file #0 does not contain any stream
Digging into img2dec.c I can see it's probing for <?xml on the first line
and <svg on the following line:
static int svg_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
const uint8_t *end = p->buf + p->buf_size;
if (memcmp(p->buf, "<?xml", 5))
return 0;
while (b < end) {
b += ff_subtitles_next_line(b);
if (b >= end - 4)
return 0;
if (!memcmp(b, "<svg", 4))
return AVPROBE_SCORE_EXTENSION + 1;
}
return 0;
}
All of the svg files in the folder have the appropriate headers
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="640">
What am I missing?
Lastly, I'm using a compiled version of ffmpeg since installing via brew
install ffmpeg --with-librsvg didn't seem to work. It installed fine,
however it would give the following error
Decoder (codec svg) not found for input stream #0:0
I should note, I've tried setting analyzeduration and probesize options as
well as setting dimensions for input and output with no success.
Any help would be greatly appreciated!
Mike
More information about the ffmpeg-user
mailing list