If you don't need a "real" solution and are okay with something hacky,
it would be pretty easy to write a bash or awk script that generates a
number of copies (hard linked) of each image equal to the number of
seconds it is to be displayed, naming them incrementally.  Then the
script could just run ffmpeg with an fps of 1 to generate the slide
show.  So for your example:

frame0001.jpg -> image1.jpg
frame0002.jpg -> image1.jpg
...
frame0037.jpg -> image1.jpg
frame0038.jpg -> image2.jpg
...

and so on.  Then a simple ffmpeg call is all you would need.

-Max

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20150807/1931a720/attachment.pgp>