PDA

View Full Version : Cropping an AVI without re-encoding


craigcharlie
8th January 2007, 18:01
Hi,

I'm kinda clueless when it comes to encoding; I've been using autogk for a while now, but I just know the basics.

My problem is this. I have an avi that I encoded from a .ts file. However, because the ts file was recorded from an hd 1080i file, there's 8 useless pixels at the bottom of the avi that show up as a gray bar.

What I'm wondering is, does anyone know a simple way to break apart the avi, remove the bottom 8 pixels, and then recombine?

I think this might be my only option - I've tried the following:

-changing the height of the avi in the vdub hex editor, as per http://forum.doom9.org/showthread.php?p=921585, which didn't work

-using vdub to do a recompression with a cropping filter... however the filesize seemed to increase astronomically.

Can anyone help me? I could just reencode with autogk and set cropping, but that takes 12 hours on my computer, and it would be great if there was a work around.

best,
Charlie

mod
8th January 2007, 18:06
You have to reencode.
-using vdub to do a recompression with a cropping filter... however the filesize seemed to increase astronomically.
It seems that you left "uncompressed" the video compression mode in VDub. Select a video codec between the ones installed in your system, choose your settings and wait :)

craigcharlie
8th January 2007, 18:16
Thanks for reply.

hmmm i think i did full processing mode with divx selected. i think that was the only way i could enable a null filter with cropping. however, when it does that i'm seeing a projected filesize of a terabyte or something :)

mod
8th January 2007, 19:09
i think i did full processing mode with divx selected. i think that was the only way i could enable a null filter with cropping
Generally speaking, filtering isn't allowed with direct stream mode, while leaving output video uncompressed or reencoding it allow filtering.

craigcharlie
8th January 2007, 20:18
cheers, thanks again for your help.

since reencoding will probably result in even lower quality - i.e. because I'm reencoding something that's already been encoded by divx - I'll probably just have to go through the whole process again in autogk.

thanks again!

foxyshadis
8th January 2007, 20:46
If it's avi, and all you need is to crop the bottom/rightmost pixels, there's no need to re-encode. You can just hex edit away the last 8 pixels.

http://forum.doom9.org/showthread.php?p=921213#post921213

mod
8th January 2007, 21:30
Hey, nice one. I had missed that. Thanks :)

craigcharlie
9th January 2007, 11:43
I actually had a link to that post in my original post…. As I mentioned there, it didn’t work. Have you ever seen a case where it didn’t work foxy?

foxyshadis
10th January 2007, 01:49
Oh, it might be based on the mpeg header as well. That information is a lot more opaque, but I'm sure there's a way. I'll look tonight.

craigcharlie
10th January 2007, 18:14
Cheers, thanks for that foxy!

Btw, when I edit it, I can play the resulting file... but some of the color channels in the image seem to be shifted, so I get a green bar on the top and a lot of greenish text.