ogg supports any kind of linear bitstream, actually... technically, you could stream game packets through ogg for multiplayer, and it could work, though it'd be stupid to do so, for obvious reasons.
well... i don't know about the "ogg video must contain video audio and sub streams" thing... also, a/v sync might be something of a (dare i say) bitch if you're actually having seperate files for audio and video, much less subtitles, since some things you can assume with streams contained within a single file can't be assumed for seperate files. with the seperate files thing to work in sync, you'd need some kind of timing index to say which byte in each file corresponds to a given hard point in time, in which case you must stop any each stream as it gets to any given index until all streams have caught up -- ogg does a bit of this for you, iirc.
i think what might be cleaner is something like:
Code: Select all
sequence1 = {
file=s1.ogg
audio=stream1
video=stream0
subtitles=stream2
}
or, if we give each stream a meaningful title:
Code: Select all
sequence1 = {
file=s1.ogg
audio="en"
video="main"
subtitles="de"
}
seperate files are probably doable, and i'm not a dev, but based on what i've seen, the amount of code it'd take to deal with certain kinds of syncing, perhaps changing wzsub so it's indexable, and a few other things might make it simply easier to force modders making high res versions to include duplicates of the subtitle and audio streams found in the originals (if done right, this adds up to *maybe* 2.5 mB of data for language-specific audio streams and subtitles for each of the longer videos, such as the intro). beyond that, the prospect of having several audio streams (one for each supported language) isn't so bad if you consider speex: speex goes well with ogg (made by the same people), should have an api that's very similar to vorbis, and is designed specifically for voice compression -- i doubt if it'd have any use if there were only one language supported for a movie, but it would probably make a huge difference if you had 5 or 6 language streams encoded in speex to go along with a single combined sound-effects/ambient-audio/music vorbis stream, because speex can encode voices with the same quality as ogg, but at much lower bit rates (a test i did just now required vorbis to encode voice with an average bitrate of 50 Kbps [anywhere from 40 Kbps to 65 Kbps at any point] to match the audible quality of the original wav file, while speex was able to match the original quality at exactly 27 Kbps, though the average user probably wouldn't notice any grave imperfections if the speex sample was encoded at 18 Kbps).
on a side note, i think it'd be good to set some standards for the way each stream is documented: specifically, any language-specific stuff should have the iso code, or perhaps the native name for the language in a specific place in the stream headers, so that the user doesn't have to specify their language on a per-video basis, but can do it all in one place. for example, if i wanted to use german text throughout the game, but wanted english audio, i might have the following in my user config:
and instead of having a monolithic file containing metadata for each sequence in the game (not to say that dev was suggesting so), those could be contained within level-specific stuff, or perhaps within the ogg itself, allowing for easy and flexible mod overrides (someone could use a "high-res alpha campaign videos" mod with a "high-res gamma campaign videos" mod without requiring any hand-tweaking on the user's part, and it'd automatically use the low-res beta campaign videos.