There are two things you can do:
- Multi-thread your write process, using some sort of job pool.
- Switch to libjpeg-turbo. Have a look at http://stackoverflow.com/questions/10465209/how-to-compile-opencv-with-libjpeg-turbo
Both these steps should give you a big boost, assuming your hard disk can keep up.