Solved

TMediaPlayer (or TActiveMovie) not capable to use rate property?

Posted on 2003-10-27
5
208 Views
Last Modified: 2010-04-05
Hi,

i am into this problem since over a week now.

Situation: I have 4 video windows (MediaPlayer ActiveX version 6.4) created
at run time within MDI childs.
Every Player has its own files which are reloaded by a getfile procedure i wrote.
I have some cutom made controls like play, stop, pause etc.

Problem: I want to implement a fast forward and a fast rewind button, which
rewinds or forwards the videos.

The MediaPlayer 6.4 ActiveX has a method called "rate". This can be between
1 to 10 to play faster (2=double speed, 4=quad speed etc).
The method can also be from -1 to -10 to reverse playback the video. But this
doesnt work - it does nothing it seems.
I am using avi-format files without marker positions.

The illogical thing is, it plays very fast with positive rate values, but not
reverse with negative values.

So someone know how to solve this problem, or knows of a workaround (not
writing my own procedure which repositions the "currentposition" every 100ms) ?

thanks for your time.
I will also spend a lot of more points if you need them to show me a proper
solution.

regards,
Sascha
0
Comment
Question by:sahmann
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
err .. try out DSPack - www.progdigy.com
0
 

Author Comment

by:sahmann
Comment Utility
Thx Lee_Nover,

just downloaded the DSPack.

Is it right that this one is using DirectShow/DirectDraw to display
a videofile (and automaticall chooses right Filtergraph) ?

But then, how will i be able to set a rate property, or to code
a fast forward, fast reverse (reverse playback) procedure?

0
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
yes it uses DirectShow ... MediaPlayer AX also uses it .. practicaly any media app uses DirectShow
check the forum .. all your questions have already been answered :)
0
 

Author Comment

by:sahmann
Comment Utility
Dear Lee:

Thanks again for your help.
My problem mainly concerns the reverse-play procedure.

Since all Delphi components such as TActiveMovie, TMediaPlay AX, DSPack are
based on the DirectShow Lib, witch does not provide an appropriate way for
reverse-playback, all these VCLs are somehow useless for me.

As described, I am using avi-files to record the video data. The file format
has to be avi due to compatibility issues and in order to apply any standard
compression filter.

The problem is: Reverse-playback can only be done by pausing the
media-player instance (or in my case all four players) and setting up a
timer to change the current file-position many times a second (e.g.: to
achieve a frame rate of 10fps the timer has to re-set the position 10 times
a second - in my case this would be even 40 times a second since I am
working with 4 players).

The normal play-method implemented within DirectShow can only play forwards
and also does not "seek" the file for every frame to be played.

The work-around - as described above - does work somehow. It is just too
resource-consuming to use it for all four players. Also, for instance: To
achieve a frame rate of 20fps I would have to re-set the position twice as
often, witch would certainly not be possible.


Please tell me if there is a way to just have a file being played backwards
instead of forwards and also if double/quad-speed reverse playing can be
done the same way.

I searched the whole site for many hours, but I could not find any question
addressing this topic.
0
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 130 total points
Comment Utility
using dspack 1 seems to work:
http://www.progdigy.com/boards/index.php?act=ST&f=1&t=21&hl=&s=549afecb992ccf4139c1e7a7a8baef9d

playing backwards is kinda hard coz you need to 'undo' the previous frame
that means you have to decode it normally all the way up to your frame from the last keyframe
then for each frame nackwards do an undo ..
this is actually doable .. the harder part is the sound and synchronization
sorry I can't be of more help
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now