Log in

View Full Version : Video to image file help


seker16
7th March 2008, 22:46
Hi folks,

Hope I'm posting this in the right place...

I'm doing a final year project in college and for part of it I need to crop a video and output it to individual image files. I've been looking at mplayer and have it working to output to image files but I'm having trouble getting the cropping to work. I need to crop about 1/3rd off the bottom of 1 file and top of another. Video is 320x240. Anybody got any advice on this? Or is there a program that'd be a better choice to do this (speed is an issue)?

I'd normally put in the time to (re)search this but I'm a bit tight for time so I'm hoping some kind soul will take pity on me and help :)


:thanks::thanks::thanks::thanks:

Unhandled
8th March 2008, 08:46
Hi there. From the Mplayer documentation (http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html):

crop[=w:h:x:y]
Crops the given part of the image and discards the rest. Useful to remove black bands from widescreen movies.

<w>,<h>
Cropped width and height, defaults to original width and height.

<x>,<y>
Position of the cropped picture, defaults to center.

So since your video height is 240, take 240 * 2/3 = 160. This should work for you if you add it to your command:
Crop out bottom third. Add: " -vf crop=:160::0"
Crop out top third. Add: " -vf crop=:160::80"

Hope that helps.