open video file help

Jun 2, 2011 at 3:53am
Hi,

So far much of the programming i have been doing just involves output into the console. Now i want to write a program that when placed in a folder comprised of either all video or all picture files, will open a random video/picture. In a program such as VLC. How would i go about doing this, im confused on how to open a video file through c++ so far the only files i have dealt with have been txt files?

thanks
Jun 2, 2011 at 4:27am
Take a look at this: http://www.cplusplus.com/forum/general/16507/#msg83104
It's not as short as it could possibly be, but I think it gives a good idea of how complex it is to do video playback. libVLC lets you write a player in fewer lines, but it has some serious design issues in its API.
Jun 2, 2011 at 7:40pm
thanks for the link,

I'm not interested in making my own video player. I just want a way for the program i write to open the video file using an existing player on my computer i.e. windows media player or VLC. Can this done using c++?
Jun 3, 2011 at 4:49am
A quick way would be to use system...
Jun 5, 2011 at 8:27pm
Mathhead200, could you please explain what you mean, i havent used system too much.
Jun 6, 2011 at 12:44am
A quick way would be to use system...


Quick, but not a very good way.

using an existing player on my computer i.e. windows media player or VLC. Can this done using c++?


For WMP check with Microsoft's doc. I think I remember seeing something like this?


I'm not interested in making my own video player. I just want a way for the program i write to open the video file


Making your own player wouldn't be too much of a head ache. If all you want to do is just play the video than you wouldn't really have to add any(?) functionality for the user.

EDIT: Actually I've looked at something like this from time to time, and the best thing I could find was Bink(Rad game tools) although for most purposes that won't do unless your looking for money to throw away. Never really looked into libVLC though...
Last edited on Jun 6, 2011 at 12:48am
Topic archived. No new replies allowed.