tags:

views:

55

answers:

1

Hi, I need to clip a video into smaller videos( of same format) of the same size.I am using Directshow .I have been able to extract frames from the video but I am not sure how to proceed with extracting video from the file .Could someone help me with this ?

A: 

First, I'm not sure about creating smaller clips of the same size. I assume you mean that you want shorter clips of the same dimension. If you are happy to start at the nearest preceding key frame, then you don't want to decompress it and recompress it. So in this case, I would connect the demux filter to a mux and then a file writer. You should be able to use IMediaSeeking (on the mux, or possibly the demux output pins) to select the right segment.

G

Geraint Davies
Yeah ....by same size I meant equal in duration ( For example a 10 second clip divided into 5 clips of 2 seconds each ) ...for writing what Interface do i use? Istream? ...also if i clip them into smaller durations do I have to attach some headers or something ?
Manish
If you feed the demux output to the mux input, the data will be delivered by IMemInputPin (by the demux directly to the mux) and the headers are added by the mux.
Geraint Davies
I saw AVI mux filter and the documentation says it converts the output to .avi format .Is there a way to get the output in .wmv format?[.wmv is the format i am using for videos]
Manish