Re: Modify frame rate of avi and asf file using Windows Media Obje
- From: ak268 <ak268@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Aug 2008 00:37:01 -0700
Thank you for your helpful response.
I'd just like to pick your brains on a related topic if i may.....
I have been deliberating about the realtive merits of using
WindowsMediaPlayer and DirectShow for the playback of media files. I use DS
for capture from a capture device but chose to use WMP for its relative ease
in comparison to DS. However, I am discovering that the asynchronous nature
of the method calls in WMP is calling out for increased complexity in the
design of my system. This can be managed, but what i am suffering from is a
lack of a reliable event handling/callback mechanism. For example, if i set
the currrent pos i find that the associated callback gets called, indicating
that the pos has been changed, but there is no such indication about when the
media has actually repainted at that position. This seems to be rather a
limiting state of affairs. (Problem is that i need to playback multiple avi
and asf files and seek to various positions whilst ensuring they all remain
synchronised). I knocked up a quick app in DS and found that the latency in
seeking is similar to WMP (as you exaplained) and that there are MEdiaEvents
that can be used, but iam not sure if it is possible to get notifications
when the frame is actually painted, which is what i require.
Is there any solution to this or is it in the nature of playing media files?
"Alessandro Angeli" wrote:
From: "ak268".
I would like to change the rate at which frames are
displayed during playback without modifying the file
itself. For example, I'd like to be able to play a video
file and only see one frame a second.
Is this possible?
Assuming you are using WindowsMediaPlayer to play the files,
setting Player.settings.rate = 1.0 /
parseFloat(Player.currentMedia.getItemInfo("FrameRate"))
should give you 1 fps.
Otherwise, you can pause, activate your own timer and call
Player.controls.step(1) every second.
Also, on the subject of avi and asf playback, i have avi
files i need to playback but it is not possible to set
the rate to a negative value for avi files.
Generically speaking, it is not possible to play in reverse
any temporally-compressed video stream without knowing too
many details about its compression algorithm, regardless of
the container format. WMP can somewhat play in reverse WMV
files because it knows those details about the video stream,
but it has no way of knowing with AVI files.
I tried
setting the currentPosition value to mimic a rewind
facility but it takes too long to seek to the new
currentPostion and repaint the image.
Seeking is a costly operation that requires fast decoding of
a bunch of frames every time so, for each frame you go back,
you may be decoding dozens or hundreds of frames.
Do you know of any
other way to 'rewind' an avi file?
It is not possible with the stock AVI reader.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
- Follow-Ups:
- Re: Modify frame rate of avi and asf file using Windows Media Obje
- From: Alessandro Angeli
- Re: Modify frame rate of avi and asf file using Windows Media Obje
- References:
- Prev by Date: Re: How to reduce startup latency while playing .wmv file - from J
- Next by Date: VBA script to send a filename (drive/path) and launch to play WMP
- Previous by thread: Re: Modify frame rate of avi and asf file using Windows Media Obje
- Next by thread: Re: Modify frame rate of avi and asf file using Windows Media Obje
- Index(es):
Relevant Pages
|