Cross platform multimedia formats?

While not related to the book, it’s the reason I’m reading the book. :slight_smile:

My task is to store and play thousands of 30 second audio and video snippets in a format that is easy to wrangle in Windows, iOS and Mac.

SQLite3 seems to handle the storage part. If you had to store and replay a thousand blobs of audio or video, which formats would you say are the friendliest for all three platforms?

I’d test to make sure that sqllite can feed you the audio / video data back to you fast enough. Also, having one big file with everything might make maintenance and updates difficult - change one piece of audio and you have to redeploy the whole database.

You might want to use a sqllitedb as the index (since it’ll just be relative paths, it’ll be small) and to cache metadata. Have the records there to point to actual file assets in the file system (and break them up so you don’t have more than a couple hundred or a thousand in each directory). I’d measure that too to see if large directory contents affect file opening speed.

As far as the actual audio or video format, I have no idea on what’s optimal cross-platform, especially in terms of ultimate use - I’m just a file system monkey :slight_smile:

Thanks, Mark.

The database of audio and video snippets will likely not need updated. Each snippet will be loaded completely and then played so getting it quickly is less of an issue. Having every asset in a single database is our aim to make it easy for end users to share the collections they create.

My real design issue is what format for audio and for video will play back well on Windows, Mac and iOS.

I’d like to second Mark’s sentiment about stashing big binary data in the database. Loose files are much easier to package, distribute, debug, and work with at the API level on all these platforms. To share with other users, just zip them up - zipping and unzipping will be supported on all those platforms. This is how Android and iOS both distribute applications, as a zip archive of required files.

Re: specific file formats, if you aren’t concerned with Android, then iOS will be your limiting platform. So just produce one of the formats specified here under “Video Technologies” and you should be good to go:

Thanks, phillips! That is precisely what I needed to know.