SMIL -> MPEG
March 6, 2007 7:44 AM   Subscribe

How do I convert a (simple) SMIL file into an mpeg (or anything else I can upload to YouTube)?

Long story short, I have a bunch of jpgs that I want to turn into a movie on a Linux platform. There are many utilities that will do this; I've used ImageMagick in the past fairly successfully. But now, for the first time, I also have sound I want to add. I can even find a few tools (such as ffmpeg) that will take a wav and a some jpgs and convert them into a movie as long as the wav and jpgs are of the same "length" (at least that's the claim--I haven't actually gotten this to work either).
However, I think it should be simpler than this. The tool I'm using to create the jpgs and assign the sounds is creating a SMIL file. It looks something like this:

<smil>
<body>
<seq>
<img src="image01.jpg" dur="100ms" />
<audio src="snd01.ogg" />
<img src="image02.jpg" dur="100ms" />
<img src="image03.jpg" dur="100ms" />
<img src="image04.jpg" dur="100ms" />
<img src="image05.jpg" dur="100ms" />
<img src="image06.jpg" dur="100ms" />
</seq>
</body>
</smil>


(This is from memory and is only an example--probably not well-formed SMIL. The ogg file would start playing at the same time as the frame it follows and keep playing until the audio runs out, while showing frames all the time. At least that's what the creation software seems to do.) It seems like with all the needed information available, including how to sync the audio and video, some utility should be able to convert this SMIL directly into an mpeg. And indeed, there is a set of utilities call smilutils that claims to work with SMIL. smilutils didn't work, so I dove into the guts, added debug statements and traced it through only to find that it accepts video clips, not jpgs. WTF.

I've only been even aware of the existence of SMIL for a couple days. Does anyone more familiar with this stuff know where I should look next to solve my problem? Maybe my best bet is to write my own program that will read the SMIL, convert the the oggs into a single wav file of the right length and then run ffmpeg myself?

Another idea is to use separate video editing software to combine them, but I'm wary of this. For one thing, video editing on Linux? For another, I'd like the toolchain to be as short as possible, so I don't have have discrepancies between what the creation software thinks is going on and what the editing software thinks.
posted by DU to Technology (3 answers total)
 
This might do what you want (they have an example piping smil2raw to ffmpeg down the page).
posted by null terminated at 8:51 AM on March 6, 2007


Response by poster: Right, that's smilutils which I found by googling too. But it only handles video files (and probably only digital video files).
posted by DU at 8:55 AM on March 6, 2007


oops, I didn't see that. I'll see if I can find anything else.
posted by null terminated at 11:30 AM on March 6, 2007


« Older Can This Job Offer Be Saved?   |   Name that Tune? Newer »
This thread is closed to new comments.