| Printable Version of Topic
Click here to view this topic in its original format |
| Unofficial VirtualDub Support Forums > Newbie Questions > Crop 640 X 480 Movie To 150 X 150? |
| Posted by: spl1tscreen Jun 26 2014, 06:27 PM |
| Hi guys, As the title says, I'm trying to crop a video from the recorded 640 x 480 to a 150 x 150 region of interest. However, when I do this, I get a very distorted video with a repeated diagonal line down the centre; like this: http://i.imgur.com/VLV0VgB.jpg. Now I suspect this is because I go from a rectangular to square view. Indeed, when I crop the video at close to the same ratio (200 x 150) I end up with just one diagonal line going from top left to bottom right. Here are the file details: Video: Frame size, fps (µs per frame): 640x480, 15.000 fps (66666 µs) Length: 31498 frames (34:59.84) Decompressor: Internal Motion JPEG decoder (MJPG) Number of key frames: 31498 Min/avg/max/total key frame size: 26516/27848/29824 (856604K) Min/avg/max/total delta size: (no delta frames) Data rate: 3342 kbps (0.09% overhead) Here is the process I use to crop the video: 1) Video - Filters 2) Add... 3) null transform 4) Cropping... 5) Play about with offsets 6) OK, then save as avi I'm using VirtualDub 1.10.4. |
| Posted by: Abrazo Jun 26 2014, 07:04 PM |
| The problem comes from the non-codec friendly size of your destination file. Instead of using the "null transform" filter, you can better use the "resize" filter. New size : select "Absolute" and introduce the pixels in width (and the height should automatically adapt based on what you select in the next setting). Aspect ratio : select "Same as source" Filter mode : "Lanczos3" Interlaced: not checked Framing options: Select Letterbox and introduce an identical width and height if you like to. Codec-friendly sizing: to really be sure that you will not get a diagonal as a result, select "Multiples of 8 (or 16)" at preference. (You will see that the size will change from 150x150 to 144x144. Via the "resize" filter you can also apply "Cropping" if you like to. (via Video > Filters... > click once on the resize filter, and click the "Cropping"-button. |
| Posted by: raffriff42 Jun 26 2014, 09:30 PM |
| If you are not resizing, but only cropping, set size = "relative, 100%", but otherwise follow Abrazo's advice. You can keep your null filter and add a Resize filter below it, or do your cropping within the Resize filter. |
| Posted by: spl1tscreen Jun 29 2014, 09:15 PM |
| Thank you both for your replies. This is exactly what I needed. |