You need a video decoder program to play a video file. Apple provides built-in, low-power, hardware-accelerated decoders for some formats (AAC, H.264, etc.), but not for any other formats.
If you have video files in Apple supported built-in format, it will be played by an API call. But if your video file is in unsupported format, you have to implement video decode yourself for the format. This is very hard and painful work. Even there's a library (FFMPEG) which does this, it's not easy to embed it into an app, and even the result is not very pleasant. Because it is not well documented, and also it requires specific license model which doesn't fit well with closed-source programs. Also it consumes more battery, and seems to be far slower than Apple's optimized decoders.
Instead you can try command-line FFMPEG tool. That's far easier to use, and scriptable using shell script. You told thousand of video files. That sounds small. You can convert it. Try scripting it.
Update
There's a framework called VLCKit
which may provide simpler media playback feature of extra formats if you don't mind GPLv2 license.