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

Reverse AVI using DirectShow

9 views
Skip to first unread message

harish.kasi...@gmail.com

unread,
Sep 15, 2005, 2:54:35 PM9/15/05
to
Hello everyone,

My goal is reverse an AVI file so that I can play backwards. After
reading the archives the following is the solution I came up with.

1) Extract the all the images in bitmap format from the AVI file.
2) Use the PushSource Filter sample from the SDK to create a new AVI
file. I guess I will also have to generate proper time-stamps.

I would like to know if this is correct or is there a better way to
deal with it.

Thanks in advance.
Regards,
Harish

Thore Karlsen [MVP DX]

unread,
Sep 15, 2005, 3:30:43 PM9/15/05
to

That should work fine. You could extract one frame at a time by playing
the graph backwards, stepping back one frame at a time.

--
New to newsgroups? Read: http://dev.6581.com/newsgroups.html

Thore Karlsen [MVP DX]

unread,
Sep 15, 2005, 3:31:45 PM9/15/05
to
On Thu, 15 Sep 2005 14:30:43 -0500, Thore Karlsen [MVP DX]
<s...@6581.com> wrote:

>>My goal is reverse an AVI file so that I can play backwards. After
>>reading the archives the following is the solution I came up with.
>>
>>1) Extract the all the images in bitmap format from the AVI file.
>>2) Use the PushSource Filter sample from the SDK to create a new AVI
>>file. I guess I will also have to generate proper time-stamps.
>>
>>I would like to know if this is correct or is there a better way to
>>deal with it.

>That should work fine. You could extract one frame at a time by playing
>the graph backwards, stepping back one frame at a time.

.. and by stepping back I mean seeking, of course. Have the graph
paused, and seek back to the previous frame. Extract it, tell the
PushSource derived filter about the new frame, and repeat.

Iain

unread,
Sep 15, 2005, 5:57:41 PM9/15/05
to

If you have the disk space, I'd be inclined to extract all the bitmaps into
a directory, numbered 0 to n and then read them back in in reverse order.

I'm thinking that, if your AVI is compressed, you may have issues with
frame seeking.

Iain
--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk

Thore Karlsen [MVP DX]

unread,
Sep 15, 2005, 6:02:33 PM9/15/05
to
On Thu, 15 Sep 2005 22:57:41 +0100, Iain <Ia...@idclTAKEAWAY.co.uk>
wrote:

>>>>My goal is reverse an AVI file so that I can play backwards. After
>>>>reading the archives the following is the solution I came up with.
>>>>
>>>>1) Extract the all the images in bitmap format from the AVI file.
>>>>2) Use the PushSource Filter sample from the SDK to create a new AVI
>>>>file. I guess I will also have to generate proper time-stamps.
>>>>
>>>>I would like to know if this is correct or is there a better way to
>>>>deal with it.

>>>That should work fine. You could extract one frame at a time by playing
>>>the graph backwards, stepping back one frame at a time.

>> .. and by stepping back I mean seeking, of course. Have the graph
>> paused, and seek back to the previous frame. Extract it, tell the
>> PushSource derived filter about the new frame, and repeat.

>If you have the disk space, I'd be inclined to extract all the bitmaps into
>a directory, numbered 0 to n and then read them back in in reverse order.
>
>I'm thinking that, if your AVI is compressed, you may have issues with
>frame seeking.

Yes, if the video is compressed using temporal compression, it would be
a tradeoff of disk space vs. speed. Raw video frames are awfully large,
which is why I would be inclined to do one frame at a time.

Iain

unread,
Sep 16, 2005, 4:54:16 AM9/16/05
to
On Thu, 15 Sep 2005 17:02:33 -0500, Thore Karlsen [MVP DX] wrote:

> Yes, if the video is compressed using temporal compression, it would be
> a tradeoff of disk space vs. speed. Raw video frames are awfully large,
> which is why I would be inclined to do one frame at a time.

Clearly, I am a fan of brute force and ignorance! You have to cow these
Damned Computers somehow...

Thore Karlsen [MVP DX]

unread,
Sep 16, 2005, 8:37:26 AM9/16/05
to
On Fri, 16 Sep 2005 09:54:16 +0100, Iain <Ia...@idclTAKEAWAY.co.uk>
wrote:

>> Yes, if the video is compressed using temporal compression, it would be
>> a tradeoff of disk space vs. speed. Raw video frames are awfully large,
>> which is why I would be inclined to do one frame at a time.

>Clearly, I am a fan of brute force and ignorance! You have to cow these
>Damned Computers somehow...

In my case I have a lot more free CPU cycles than I have free space on
my hard drive. :)

harish.kasi...@gmail.com

unread,
Sep 16, 2005, 11:31:57 AM9/16/05
to
Thanks for the replies. It has given me the confidence to go ahead.

Let me check if AVI file has a temporal compression. I will update once
I have some concrete results.

Thanks,
Harish

harish.kasi...@gmail.com

unread,
Sep 29, 2005, 1:55:30 PM9/29/05
to
Thanks for all the inputs. Just to confirm for others, the method
described above works fine. I was able to create a Reverse AVI file.

Point to note is that the AVI file did not have any temporal
compression.

0 new messages