Script for using ffmpeg to crop, pan and scale WMV to MOV

By | September 21, 2009

I’m responsible for coordinating weekly new-functionality demos for my company’s R&D organization.  Each week, a developer or product manager presents a half-hour demo of some new functionality to a local audience in one of our offices, using a big 1920×1080 digital TV as the local display, with a GoToMeeting session set up so that people in other offices can watch the demos.  We record the GoToMeeting session, and then after the demo we publish it internally for people who weren’t able to watch it live or who want to watch it again.

A 30-minute 1920×1080 WMV is very large, like around 50MB.  We want it to be smaller before we publish it.  One way to make it smaller is to simply scale it down, but when the entire 1920×1080 canvas is shrunk down to a reasonable size, text which was perfectly legible before becomes unreadable.  Since the text is usually a crucial part of the demo, that’s unacceptable.

Usually, the presenter isn’t using the whole screen at any given time.  Rather, he’ll be focused on the content in one particular window for an extended period of time, and that window often takes up only around half of the screen.  Therefore, cropping the WMV to the active area is a possible way to the video file smaller without sacrificing legibility.  There’s just one problem — what happens when the presenter jumps around from window to window during the demo?

There are various expensive commercial video editors which will let you crop different segments of the video differently and then glom them all together into one video at the end.  However, I don’t like using commercial software when I can do it for free (this is probably about half on principle and half out of stubbornness).  Therefore, I set out to figure out how to do this with free tools.  The result is a script called wmv-to-panned-mov.pl.

This script uses the excellent free tool ffmpeg to slice and dice the input video with the appropriate cropping and produces a much smaller MOV file (i.e., QuickTime video) as its output.  You feed the script a CSV file indicating the start times, end times, and cropping areas of the various slices, and it does the rest.  There’s more information in the comment at the top of the script about how to use it.

Please comment here to let me know if you find this useful.  If the time I spent writing this script saves you some time or money, please consider sending a little something to my tip jar (but if you don’t, that’s OK too).

Print Friendly, PDF & Email
Share

4 thoughts on “Script for using ffmpeg to crop, pan and scale WMV to MOV

  1. bestautumnn

    Avdshare Video Converter is an all-in-one MOV cropper and video cropper, which can crop MOV, MP4, AVI, MKV, VOB, DV, FLV, RMVB, AVCHD, MPEG, M2TS etc.

    Reply
  2. Dany

    What about crop video I prefer use VidCrop.It’s really cool soft.Try)

    Reply

Leave a Reply

Your email address will not be published.