VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. OK, I'm finally trying to do something that actually involves showing the video in my app. I can add the WMP control and get it to play my .avs ok, but I can't find any way to step through it one frame at a time. Is there a way to do this using the WMP control or can someone suggest a different control that will do what I want?
    Thanks
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  2. Member
    Join Date
    Feb 2007
    Location
    United Kingdom
    Search Comp PM
    I don't think it's possible with the media player control.
    As far as I can see there is no mention of frames etc. in any of the properties (either at design or runtime) the only reference you get is .duration and .position and they are seconds from start.

    I theory you could get the frame rate and then modify .position by the duration of one frame but I'm not convinced that would be accurate enough. Might be worth a try though

    It might be worth having a look on MSDN or freevbcode.com

    M
    Quote Quote  
  3. Thanks. I've been following links all day at MSDN without success. I found a reference to a .currentPositionTimecode property that is supposed to allow frame specific navigation, but it's not supported in my version of wmp.ocx and I can't find what version is supposed to support it.

    I took a quick look at freevbcod.com and there are a couple apps that look promising, but Ill have to download and research to know for sure.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  4. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    I did this a long time ago but... Try this which works for forward stepping

    frmmain.WindowsMediaPlayer1.Controls.Step (1)

    For anyone else who looks later I'll state the obvious:

    In my example:
    frmMain is the name of my form which holds the player control
    WindowsMediaPlayer1 is the name of my player control

    Although "Step" does not show up in the "Controls" options it is available.

    Also of course you would probably want to issue a pause or stop before stepping
    frmmain.WindowsMediaPlayer1.Controls.pause 'or stop

    btw)
    If you are using vb6, in VB under "View" click on "Object Browser" and then find the "WindowMediaPlayer" and snoop around. Also look at anything that looks like "IWMPControls" or anything that starts with IWMP" these are classes that contain more options that may be available to the programmer of the wmp control. For example under the Class "IWMPControls2" you will find the "Step" option and this is what it states:

    Sub step(lStep As Long)
    Member of WMPLibCtl.IWMPControls2
    Advances the video one frame
    Lots of little gems like that available in the "Object Browser" and you can use it to view any other objects available to your project.
    There's not much to do but then I can't do much anyway.
    Quote Quote  
  5. Thanks, I'll give that a try tomorrow.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  6. That works for stepping forward, but (-1) doesn't step backward, and according to here, http://msdn.microsoft.com/en-us/library/bb262214(VS.85).aspx , it should. So it's closer to allowing me to do what i want, but doesn't allow me to correct any mistakes...
    But I do appreciate the help, thanks.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  7. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    In my experience it only works for forward frame movement. I recall that someone had said that the (-1) worked for them but I had not tried it because I didn't need it in my app since I was doing frame by frame capture. I tested the frame back (-1) for you on my system and it didn't work for me either. Too bad MS changed the plugin frame reporting functions after v6.4 of the player.

    btw) I'm using v10 of the player which one are you using? It's strange that the back (-1) is broken according to that MS link, it should work. It's possible this only works with the v11 of the wmp.dll.
    There's not much to do but then I can't do much anyway.
    Quote Quote  
  8. I've got v10 also. I appreciate the help, but I'm starting to lose interest in this project anyway.

    The idea was to step through a video to visually identify unique and repeat frames and build a movable grid to identify patterns. I've got several OTA captured HD TS files at 59.94 fps that I want to convert for DVD. They're identified as Interlaced, but the frames are all progressive. For the most part it's a simple 3:2 pattern, but the pattern shifts every so often because of signal drops. If I can identify the missing frames and insert repeats to solidify the pattern, then I can apply the proper selectevery() filter to return it to the original 23.976 without having to trim it into bunches of little bitty segments. What I've got works, but it's a pain to walk through 10000s of frames to build the grid which becomes too big to fit on the screen, so you can't see the breaks in the pattern anyway.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  9. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    I know what you mean about losing interest. I have lots of partially completed projects in which I lost interest when I found something else to occupy my time and moved on.

    I had wmp11 on my system but ran into a problem a while back. I thought it was caused by wmp11 so I rolled back to v10. It turned out that the problem was totally unrelated but just haven't bothered to re-install it. I might just for the heck of it one of these days. There must be some kind of conflict though because I noticed that the "Controls.fastReverse" and "Controls.fastForward" don't work either. I had to fudge those. I Googled the problem and it's happened to others but no one's posted anything useful so far.

    It's not something I need right now but I hate loose ends.
    There's not much to do but then I can't do much anyway.
    Quote Quote  
  10. For WMP versions using DirectShow as the underlying framework, the ability to seek (of which stepping forward/backward is an example) depends upon the file reader filter for the specific video format. It has to expose the IMediaSeeking interface. Typically, variable rate video formats cannot seek - MPEG is a good example. It is because the frame start positions cannot be calculated unlike with formats where each frame is the same size (byte-wise).

    Also, programming DirectShow things is a lesson in patience and the unexpected. The number of hurdles I have had to overcome/circumvent is not small. Often the cause is very obscure and not easily found in MSDN or easily resolved.
    John Miller
    Quote Quote  
  11. Programming anything in VB6 can be a lesson in patience and the unexpected, but I now only do it for fun, not profit, so I get bored easy. I don't think seeking is the issue since I'm feeding my video through DGIndex and AviSynth. I did try several different types of videos, including DV-AVI (type1 and type2) and uncompressed, and it wouldn't go backward for any of them.
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  12. Renegade gll99's Avatar
    Join Date
    May 2002
    Location
    Canadian Tundra
    Search Comp PM
    I too putter in vb purely for pleasure. I started with mainframe languages at work then dabbled with Assembly on my first pc and so on.

    The videos I tested were captured and compressed with ffdshow mpeg4 on my pc. I know they can frame back and forth because in vb I made a quick test app using the OLE container which lets you insert objects like media clips, pdf, excel sheets etc.... That imbedded player (mplay32.exe) has frame back and forward buttons as well as the fastforward and fastreverse options and they work well. The issue has to be with the wmp.dll plugin itself or some conflict in the way it's being accessed in vb.
    There's not much to do but then I can't do much anyway.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!