Results 1 to 5 of 5

Thread: Can VB play clips of randomly chosen avi files?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Can VB play clips of randomly chosen avi files?

    Can a media player written in VB be modified to do this: randomly choose an avi file from a directory or subdirectory, choose a random starting point within that file and then play a clip of a random length (within user defined parameters) then without prompting repeat this sequence?

    I would like just such a media player but there doesn't appear to be one already out there so my only other option is to write one myself. I know nothing about VB and last programmed in BASIC in the 90s. Before I invest time and effort in learning VB I need to know if it can actualy do this at all.

    Thank you.

  2. #2
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: Can VB play clips of randomly chosen avi files?

    Checklist time:
    randomly choose an avi file from a directory or subdirectory
    This is always possible, just place all playable files in an array and use the Random() object to pick one path from this array.

    choose a random starting point within that file and then play a clip of a random length (within user defined parameters)
    Also, the Random class, but of course the player you will be using must support seeking and reading out the length of the avi file

    then without prompting repeat this sequence?
    If the player can be controlled freely, then it is possible.

    Everything is possible, but the main issue is of course what "Media Player Control" or plug-in you will be using. To this I have no answer unfortunately.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2011
    Posts
    2

    Re: Can VB play clips of randomly chosen avi files?

    I asked this question on a non specialist board and some techy type directed me here:

    http://www.devasp.net/net/articles/display/304.html

    It was suggested that I use this media player as a base for my program. I haven't typed it in yet or tried it but do you think this could be adapted?

  4. #4
    Fanatic Member
    Join Date
    Jul 2009
    Posts
    629

    Re: Can VB play clips of randomly chosen avi files?

    Well, as long Windows Media Player is installed, it will work. It is a COM-component, thus if the dll of this "outside of the package" is not available, the program will crash. You can use the Windows Media Player control undoubtedly, but don't forget it uses Windows Media Player and that your program is dependant of this Control.

  5. #5
    Frenzied Member
    Join Date
    Jan 2010
    Location
    Connecticut
    Posts
    1,687

    Re: Can VB play clips of randomly chosen avi files?

    Look into mciSendString.
    VB6 Library

    If I helped you then please help me and rate my post!
    If you solved your problem, then please mark the post resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width