Reputation: 1
I've look around in the documentation but can't find a good way to do this.
I capture video from my webcam and connect it to a ISampleGrabber filter to take screenshots. Which works fine but I would like to be able to scale the resolution on the video.
Thanks for any guidance!
Upvotes: 0
Views: 1840
Reputation: 563
You can do the re-sizing job by manipulating the bitmaps you captured from directshow and then push them to new video file. However I generally do not recommend that .
FFmpeg already have this function integrated.
ffmpeg -i input.avi -s [width]x[height] output.avi
Upvotes: 0
Reputation: 69662
Resizing in software is a relatively expensive operation, for which you also don't have an out of the box working component in DirectShow. You are typically more interested in setting proper capture resolution in first place, so that you don't need to resize.
To resize video on runtime, you need either third party filter, or a custom filter, or instead copy a video from DriectShow pipeline and resize it there e.g. using StretchBlt
API.
Upvotes: 1