Video Player in VB6

Hi coders,

I am working on the project of creating a video player for cable operators which will run movies, ads, flash strip, flash logos etc. I already have created one but due to timer usage its a bit slow and media player stretching is not working good. Can anyone share his valuable feedback what to do? which player is best? which free ocx should I use to create xp style buttons, bars, grids with drag and drop facility for adding movies, ads etc...


Free? I am not sure if you will be able to find any freebie OCX with good features and optimized speed for what you are looking for.

As for timers, are you using the VB6 timer control? There was a control named MB-Timer which was very high-resolution and much optimized than VB6 native one, and was free too. You can also use native API methods for setting timers if you are facing speed issues.

Thanks bro, well I have already developed couple of these players. The max resource hungry is the process of getting end of a playing flash for which I have to use timer interval of 50ms so that I can detect ending frame and play next flash. Any work around for this?


Only possible workaround is if you can edit the flash file (I presume *.SWF). You can issue an FSCommand on the last frame and intercept it within your VB program through FSCommand event.

Another possibility is if you know the frame-rate of the flash file beforehand, (or if all the files use a fixed particular frame-rate), you can get the total number of frames in the flash at the beginning of play, divide it by frame-rate to get duration in seconds, and set just one timer exactly for that duration. It is error-prone, but should work in most cases.

hmmm.. first possibility is out of question as .swf file is not editable, we need .fla file to edit flash. Also cable operators receive hundreds of flash files which they can't edit.

Second possibility can be worked. Actually I am currently getting total frames at the start of flash play and with a timer match it with last 5 frames and play next flash. But for this solution timer needs to be super fast which then slows down the app a bit.

I will check if I can get frame-rate then i will be easier i think. I will revert after checking. Currently I am working on screen capture to show a full screen in a little box for preview :)

I understand that hundreds of flash files completely rule out the first possibility, but do note that swf are editable and can even be easily converted back to .fla source in most cases.

Most flash files use 12, 15 or 25 fps. Opening a SWF in IrfanView, I can see the frame-rate by going to File->Properties.

Also, the 18th byte of a swf file usually contains the framerate in hexadecimal. See Chapter 2 of SWF specification.

wow, thanks buddy. Will definitely check. appreciate your help!

thanks dude i will check soon.. thanks for sharing

Hello Guys, another question: How can I record the movie or song that is being played in VB6 media player. Someone needs 4:3 screen recording of the player with audio. A quick response will be appreciated. Thanks