digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   MenCalc or MEncodeMe crop/resize (http://www.digitalfaq.com/archives/encode/9855-mencalc-mencodeme-crop.html)

maurus 05-25-2004 03:44 AM

MenCalc or MEncodeMe crop/resize
 
I go with MEncodeMe for KSVCD PAL (480x576) and I want use overscan=2.

I set 432x544 in MEncodeMe CROP values.

If I edit temp.conf of MEncodeMe, I see this settings:

Code:

vf=scale=480:576:0:0:60,crop=432:544:-1:-1,expand=480:576:-1:-1:1
With MenCalc for overscan factor=2:

Code:

vf=scale=480,576::0:9,crop=432:544:24:16,expand=480,576:24:16
I must edit temp.conf every time in MEncodeMe for replace the correct values?

Thanks.

-Maurus

incredible 05-25-2004 05:51 AM

As I did explain you here:
http://www.kvcd.net/forum/viewtopic....177&highlight=
(so opening another thread like this one is not necessary as it "splits" the subjects ;-) ).

Code:

vf=scale=480:576:0:0:60,crop=432:544:-1:-1,expand=480:576:-1:-1:1
That "would" result in a wrong cropping!
As like in Avisynths crop() ... you have to determine "where" to crop these 432x544 out of the orig 480x576! And thats not -1,-1
(but ... Im not shure!! if a "-1" does tell mencoder to crop "centered"!! If yes, that would be very nice! .... so do me a favor as Im at work on a MAC now ... and run a short encoding comparing the following - also quoted by you - line:

Code:

vf=scale=480,576::0:9,crop=432:544:24:16,expand=480,576:24:16

maurus 05-25-2004 10:42 AM

Sorry, for open similar two thrads... :oops:

In crop crop=432:544:-1:-1, the last two values are for Center.

The line:

Code:

vf=scale=480:576:0:0:60,crop=432:544:-1:-1,expand=480:576:-1:-1:1
is created for MEncodeMe.

The line:

Code:

vf=scale=480,576::0:9,crop=432:544:24:16,expand=480,576:24:16
is from MenCalc with overscan factor=2.

For your explanation, I think than this last line is more correct for overscan=2 and add black borders as I want.

Thanks for all.

-Maurus

incredible 05-25-2004 11:03 AM

Quote:

Originally Posted by maurus
In crop crop=432:544:-1:-1, the last two values are for Center.

Nice Info!

:D

....

(Speaking to myself: "And where the hell is that mentioned in the manual!" :evil: :lol: )

Prodater64 05-25-2004 11:28 AM

Quote:

Originally Posted by incredible
(Speaking to myself: "And where the hell is that mentioned in the manual!" :evil: :lol: )

I don't want to bother your yourself conversation but...
Quote:

VIDEO FILTERS
Video filter are plugins that allow you to modify the video stream and its properties. The syntax is:
-vf <filter1[=parameters],filter2,...>
Setup a chain of video filters.
-vop <...,filter3[=parameters],filter2,filter1> (OBSOLETE)
Setup a chain of video filters, to be applied in reverse order. Deprecated in favor of -vf.
The parameters are optional and if omitted, some of them are set to default values. Use '-1' to keep the default value. Parameters w:h means width x height in pixels, x:y means x;y position counted from the upper left corner of the bigger image.
and default values for crop are:
Quote:

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 orig- inal width and height.
x,y
Position of the cropped picture, defaults to center.

from http://www.mplayerhq.hu/DOCS/man/en/manpage.html

Peder 05-26-2004 08:22 AM

One question though:
Shouldn't the order be crop,scale,expand ?

The mplayer documentation mention that some filters, like deinterlacing,
should take place "after cropping and before scaling" (section 7.12.2.3).

And I think encoding should be faster if you crop unnessecery parts before
scaling.

- Peder

Prodater64 05-26-2004 09:35 AM

Quote:

Originally Posted by Peder
One question though:
Shouldn't the order be crop,scale,expand ?

The mplayer documentation mention that some filters, like deinterlacing,
should take place "after cropping and before scaling" (section 7.12.2.3).

And I think encoding should be faster if you crop unnessecery parts before
scaling.

- Peder

I think it is like avs scripts. You aply some filters before resizing and some others after it. IMHO you always must to use Addborders (like expand) in last place, after any other filter. This is in this way because you don't need aply filters to black borders.



--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Dialhot 05-26-2004 10:24 AM

Quote:

Originally Posted by Prodater64
This is in this way because you don't need aply filters to black bands.

Except that it seems to have a kind of "intelligence" within mencoder. For instance Kwag already tested that adding noise does'nt affect the black borders created by "expand".

Peder 05-26-2004 10:56 AM

Quote:

Kwag already tested that adding noise does'nt affect the black borders created by expand
Nope, the borders are added after encoding. I'm not even sure the
borders are a part of the mpg; they're probably just a flag telling the
player "add some black here".
And noise should be applied before cropping/scaling.

But I still think the correct order is to crop before scale.
My hunch is that the scaling is done while encoding (or right before) and in
the scale/crop case you'd encode information that you later on crop away.

That should be even more noticeable if the source isn't 16/9 but say
1.85:1. If you scale first (and my guess about encoding is right) then
you're encoding the black bars as well.

- Peder

incredible 05-26-2004 02:54 PM

Hi Peder,

a) black borders are "part" of the encoding!
If you deal with an anamorph source THEN the height on a 4:3 output will be squeezed by h/1.333 and then the player adds black borders ... so what you mean is a classical "letterboxing". But the Blackborders in the m2v/m1v where done while encoding and not put after.

b) Noise adding before scaling is the worst you can do as individual scaling processes will totally affect the size of the noises grain!

c) When the image gets into an encoder and if its in the encoder prefered colorspace, then that WHOLE image will be processed before, means cropping/scaling etc. will be done on the image data before it goes into the DCT process.

No matter if you first crop, first scale or first filter, ... at the end you get a treated image which goes into the DCT engine ...

I did many tests and had no probs when first scaling and then cropping (btw. thats also the way explained in the reference link in my application, so theres no problem if cropping before or after scaling.

According to filters, you can still set them after after Cropping/scaling or scaling/cropping. Same in avisynth.

@ All

New version is out 1.01.00 I rewrote the routine where now also all non PAR 1:1 avis are supported, means still 16:9 Avis via DVD2AVI/AVISynth/Makeavis processes, and for shure common capture resolutions in NTSC and PAL.

http://home.arcor.de/packshot/mencalc1.01.0.exe

kwag 05-26-2004 04:03 PM

Quote:

Originally Posted by incredible

@ All

New version is out 1.01.00 I rewrote the routine where now also all non PAR 1:1 avis are supported, means still 16:9 Avis via DVD2AVI/AVISynth/Makeavis processes, and for shure common capture resolutions in NTSC and PAL.

http://home.arcor.de/packshot/mencalc1.01.0.exe

Looking good Inc. ;)

-kwag

incredible 05-26-2004 04:17 PM

Thanks!

Iv ben searchin around the web for a icon Builder .... the one I got is going to "die" in 30days and its a crap!
Do you know a good one?? :( :)

Fluffbutt 05-27-2004 03:44 AM

Try Icon Sushi - it's freeware, and very good.

I'll edit this with the url when I find it.

http://towofu.s5.xrea.com/soft/e-index.html

incredible 05-27-2004 04:18 AM

NICE!!! Thanks a lot! :)


All times are GMT -5. The time now is 04:31 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.