Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Player.Controls.step(-1) not work ?

3 views
Skip to first unread message

NetDNA

unread,
Jul 11, 2006, 8:46:58 AM7/11/06
to
Player.Controls.step(-1) not work ?

why this method do not work ?
i want to play a single frame by step function.

howerver Player.Controls.step(1) works ,how does it work ?

The file played is a local mpg file .

msn messenger: net__ at msn dot com


Neil Smith [MVP Digital Media]

unread,
Jul 11, 2006, 1:29:27 PM7/11/06
to
On Tue, 11 Jul 2006 20:46:58 +0800, "NetDNA" <ne...@msn.com> wrote:

>Player.Controls.step(-1) not work ?
>
>why this method do not work ?
>i want to play a single frame by step function.
>
>howerver Player.Controls.step(1) works ,how does it work ?
>
>The file played is a local mpg file .

Some files don't support seeking in that way (they have to be indexed
files, and MPEG can't be indexed for WMP). I'm prepared to bet it
works fine with a WMV or ASF file - am I right ?

This page details the method isAvailable("action") which you need to
use to test if you can take the specified navigation with a chosen
(and loaded) media file :
http://windowssdk.msdn.microsoft.com/en-us/library/ms739494.aspx

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2006
http://mvp.support.microsoft.com/mvpfaqs

Alessandro Angeli [MVP::DS/MF]

unread,
Jul 11, 2006, 1:31:47 PM7/11/06
to
NetDNA wrote:

> Player.Controls.step(-1) not work ?
>
> why this method do not work ?
> i want to play a single frame by step function.
>
> howerver Player.Controls.step(1) works ,how does it work
> ?
> The file played is a local mpg file .

That's the expected behavior. With temporally compressed
files (e.g. MPEG) it's easy to step forwards (the format is
designed for forward playback) but very hard to step
backwards. The stock MPEG parsers included in Windows and
any other third-party ones I know of do not support backward
frame stepping, so WMP can not step backwards when using
those parsers.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// a dot angeli at psynet dot net


AUGE_OHR

unread,
Jul 11, 2006, 7:06:25 PM7/11/06
to
hi,

> Player.Controls.step(-1) not work ?

try :

nPosi = oPlayer.Controls.CurrentPosition
IF nPosi <= 0.0
oPlayer.Controls.CurrentPosition = 0.0
ELSE
oPlayer.Controls.CurrentPosition = nPosi-(0.04) // PAL 25f/s
ENDIF

greetings by OHR
Jimmy


NetDNA

unread,
Jul 11, 2006, 9:05:18 PM7/11/06
to
Tank you with All my heart !

I'll support this group forever

"NetDNA" <ne...@msn.com> wrote in message
news:OHioXgOp...@TK2MSFTNGP03.phx.gbl...

Robert

unread,
Jul 11, 2006, 10:58:41 PM7/11/06
to

"Alessandro Angeli [MVP::DS/MF]" <nob...@nowhere.in.the.net> wrote in
message news:eAei%23JRpG...@TK2MSFTNGP03.phx.gbl...

> NetDNA wrote:
>
>> Player.Controls.step(-1) not work ?
>>
>> why this method do not work ?
>> i want to play a single frame by step function.
>>
>> howerver Player.Controls.step(1) works ,how does it work
>> ?
>> The file played is a local mpg file .
>
> That's the expected behavior. With temporally compressed files (e.g. MPEG)
> it's easy to step forwards (the format is designed for forward playback)
> but very hard to step backwards. The stock MPEG parsers included in
> Windows and any other third-party ones I know of do not support backward
> frame stepping, so WMP can not step backwards when using those parsers.

I have been doing some DirectShow stuff lately, and in the forums of
DirectShow.Net on sourceforge
there are several messages claiming Elecard.Com codecs do support the
correct time stamps to
allow seeking in Mpeg's.

HTH


Alessandro Angeli [MVP::DS/MF]

unread,
Jul 12, 2006, 8:21:39 AM7/12/06
to
Robert wrote:

> I have been doing some DirectShow stuff lately, and in
> the forums of DirectShow.Net on sourceforge
> there are several messages claiming Elecard.Com codecs do
> support the correct time stamps to
> allow seeking in Mpeg's.

The Elecard MPEG parser is probably the best one, but all
MPEG parsers support seeking, however time-based seeking on
a VBR file is not reliable if you want it to also be
frame-precise, because timestamps in an MPEG stream may not
be consecutive.

Alessandro Angeli [MVP::DS/MF]

unread,
Jul 12, 2006, 8:22:55 AM7/12/06
to
AUGE_OHR wrote:

> nPosi = oPlayer.Controls.CurrentPosition
> IF nPosi <= 0.0
> oPlayer.Controls.CurrentPosition = 0.0
> ELSE
> oPlayer.Controls.CurrentPosition = nPosi-(0.04) // PAL
> 25f/s ENDIF

Setting the currentPosition means seeking in the file and,
as discussed, it is not a reliable method.

Robert

unread,
Jul 13, 2006, 1:26:50 AM7/13/06
to
> The Elecard MPEG parser is probably the best one, but all MPEG parsers
> support seeking, however time-based seeking on a VBR file is not reliable
> if you want it to also be frame-precise, because timestamps in an MPEG
> stream may not be consecutive.


My project is viewing security camera videos. The clients have a variety of
different cameras.

Since VBR's are quite cpu intensive to make, I would assume that most
cameras would not have
the expensive firmware for this type of encoding.

The general requirements are marking segments, viewing them multiple times,
and capturing still images.
Frame accurate seeking is highly desired.

Is this feasible? Currently I am playing the videos and capturing the still
images, the seeking part is next..

0 new messages