Log in

View Full Version : Help: Re-encoding Divx/Xvid AVI


Plamen234
16th May 2006, 19:37
Help: Re-encoding Divx/Xvid AVI
Can you help me with these issues, please?

1. Is it absolutely necessary to re-encode the avi (the video part) when croping? I suppose, yes.
2. Is there a way to delete exact range of predicted frames that are not next to key frames? I suppose, no.
So when I need to do 1+2, I have to re-encode the avi. I think to use this script.
#Example AVS
avisource("movie.avi")
crop(8,8,-8,-8)
trim(97,2189) ++ trim(3578,0)

3. And when re-encoding with virtualdub, I suppose I have to do it with "Fast-Recompress", right?
4. The final video will be a 2-pass xvid. And the new bitrate I indend to calculate will be based on the value of (bits/(pixels*frames) of the original avi file. So the resulting video part will not be artificially enlarged/cut.

Can anyone help me if I'll do sth wrong? Or is there a better way to do the "crop & trim" job of a divx/xvid avi?

p.s.: How can be evaluated (or predicted) the quality loss?

foxyshadis
16th May 2006, 20:20
Are you just doing this for your viewing pleasure? In that case, you could just keep the avi and avs as they are, and load the avs whenever you want to play it. I mean, if you really want to avoid re-encoding. Crop+trim takes practically no cpu power for playback.

Although it is possible to set a "cropping box" on a mpeg4 bitstream, which takes care of the crop, I don't know of any tools that actually do that other than encoders (for non-mod16 video). Also you can re-encode a single gop around the segment you want to cut out, but that needs a lot of fiddly manual labor.

If you are going to re-encode, you may want to use directshowsource, which will at least add automatic post-processing to the input for a better encode.

Plamen234
16th May 2006, 20:44
I'd like to keep only some parts from the big movie and get rid of the rest (saving disk space).
I've never used DirectShowSource - but I'll read the avisynth documentation about it.

Thanks for helping me.

Plamen234
19th May 2006, 17:02
Another question, about DirectShowSource.
Is it better (for the quality) to decode the source with its original decoder? For example, if the source is divx - to use the latest divx decoder. Or xvid would do the same (and faster).

p.s. full post processing, right?

foxyshadis
19th May 2006, 17:58
Doesn't really matter, divx5 and xvid decoder are pretty similar, and it's the deblocking that's most important (first 4 pp steps). Deringning (last 2) isn't so important, sometimes it looks good and sometimes it washes away a lot of detail, so be careful with that.

Plamen234
19th May 2006, 20:13
ok.
Thank you for your attention.