I am putting together an adaptive bitrate VOD setup that will be serving about 1500 videos each with 3 different stream levels. To keep from having to generate SMIL playlist files for each video by hand, does anyone know of a good way to go about automating a task like this?

Here is the example:

<video src="video_720p.mp4" height="720" system-bitrate="800000" width="1280" />
<video src="video_360p.mp4" height="360" system-bitrate="400000" width="640" />
<video src="video_160p.mp4" height="160" system-bitrate="250000" width="284" />