1

On my site I have ffmpeg set up to convert a list of image paths from a text file into a slideshow like so --

My text looks something like this (actual file names are not sequential) -

ffconcat version 1.0
file 'IMG.PNG'
file 'IMG2.JPG'
file 'IMG3.PNG/'

And the paths from that file I send it to my ffmpeg command --

ffmpeg -safe 0 -f concat -i paths.txt \
-c:v libx264 -vsync vfr -pix_fmt yuv420p \
-movflags +faststart -y output.mp4 2>&1

It works fine, but now I am trying to do the same with the mlt/melt framework. Right now I have a simple command working with placeholder images --

melt \
placeholder.png length=200 \
inside.png length=200 \
placeholder.png length=200 \
-consumer avformat:"output.mp4"

Any ideas on how to send from a text file?

730wavy
  • 944
  • 1
  • 19
  • 57

2 Answers2

2

The pixbuf producer in MLT lets you supply a CSV file: https://www.mltframework.org/plugins/ProducerPixbuf/

Search for "csv". That page's formatting makes it difficult. Another way to read the same thing is at the command line: melt -query producer=pixbuf

Please be aware that this means each file is separated by a comma and not a new line. Also, each file name should be followed by a semi-colon and the number of frames for which to show the image. Use it like melt pixbuf:my.csv ...

Dan Dennedy
  • 446
  • 4
  • 6
  • Now, it seems that newline (not comma) must be used. E.g. `my.csv` would contains `a.jpg;75\nb.jpg;75\n` (\n means newline) – aggu Jun 01 '20 at 17:36
0

Instead of text files, you can use .melt files by using -serialise <name of file>.melt. (https://stackoverflow.com/a/54756797/11081477)

PotatoParser
  • 1,008
  • 7
  • 19