Turning them into JPG is a horrible idea. Directly convert them to LMDB yourself, look at the existing scripts to see how to do that. A few days ago I posted a python script that shows how to do something similar:
https://groups.google.com/forum/#!msg/caffe-users/2xpmLJYmt5k/ApiOQ7NnAwAJOr directly put it into HDF5 files. That would be much easier.
On a different matter: I don't think caffe is very well suited for sequence learning, don't people usually use recurrent models for that? Vanilla caffe does not really support recurrent connections (apart from loops) afaik, but there are forks for RNNs.
Jan