[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2003-10-27
5
Medium Priority
?
220 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
ID: 9632900
err .. try out DSPack - www.progdigy.com
0
 

Author Comment

by:sahmann
ID: 9633590
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
ID: 9633634
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
ID: 9634140
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 390 total points
ID: 9634315
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

830 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