digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG vs FFVFW vs Mencoder ? (http://www.digitalfaq.com/archives/encode/8159-ffmpeg-vs-ffvfw.html)

vmesquita 04-10-2004 08:00 AM

Thanks! I was able to fix all the issues you reported:

1-I was compiling without win32 DLL support plus I haven't updated the internal codecs. conf to have the reference to understand MakeAVIs. I also fixed the external codecs.conf location because the way it was, mencoder would never find it unless you were running from cygwin enviroment.

2-My cygwin install defaults to build with shared libs, I have to force using static libs. I just did it.

3-Removing all libs besides cygwin1.dll (which can't be removed) gave me a 5 Mb executable. Maybe I am compiling with more stuff enabled... :?

A neat thing: I stripped mencoder.exe (removing debug symbols) and packed it using UPX, giving me a much smaller executable (2.2 Mb) and smaller ZIP file.

The new AtlhonXP build is here: http://www.jltoca.uaivip.com.br/file...2004-fixed.zip

The new Runtime detection build is here: http://www.jltoca.uaivip.com.br/file...2004-fixed.zip

I was trying to build using libdvdread, but I can't manage to compile it. This would enable to use mencoder straight from a encrypted DVD.

My configure:
Code:

$ ./configure --enable-largefiles --enable-static --confdir=mplayer/  -enable-win32 --enable-runtime-cpudetection

rds_correia 04-10-2004 08:44 AM

Great Job :!:
Can you open a thread on how-to compile MPlayer/MEncoder4win32 under Cygwin?
That way you could give us explicit instructions on how to compile it step by step.
Meaning:
- What to download in terms of Mplayer project
- What to download for Cygwin Environment (just the basics)
- What to download for directx support/win32 codecs
- Where to put all the files
- What Configure/Make/Make install commands
That would be awsome.
Cheers

vmesquita 04-10-2004 08:50 AM

Great idea, rds_correa, I'll do that as soon as I can.
I don't know if you know this, but you can encode in mencoder straight from the DVD, no need for ripping first:

mencoderXP -include dvd1.ini dvd://2 -dvd-device f: -o teste.m2v

Just replace f: with your dvd drive and 2 with the corresponding VTS number in the disc. :wink:

I just don't know if encrypted discs will work, I don't have any right now to test. :D

digitall.doc 04-10-2004 11:11 AM

thanx for the compilation, vinicius :wink:
I still didn't have time to test rds. Too busy now.
I'll test this two last compilation and see how they work.
I think, again, it would be better we all used the same compilation.
My preferences: any compilation capable of loading vobs in my system ( :? ), and maybe it would be advisable taht it was a recent ffmpeg compilation inside (in order to use the latest advances in ffmpeg, wehter good or not, as we'd better follow the developments)

vmesquita 04-10-2004 11:14 AM

My compilation can do VOBs (and can grab straight from DVD if you are a lazy) :D. And I used the latest ffmpeg, straight from CVS, using the cvs command. All developments in FFMEPG till yesterday night are in this compile! 8)

digitall.doc 04-10-2004 02:59 PM

I'm willing to test it 8)
:arrow: just need some time at home :roll:

bilu 04-10-2004 05:05 PM

WOW :lol:

Just came back from Easter holidays, what a nice and big weekend it was (and still is :wink: ).

Some answers:

@rds_correia: the only filtering I'm doing is vf=yuvcsp to limit the encoding to the CCIR-601 color range, same as using Avisynth's Limiter().

@vmesquita: I agree with you 100% about 1-pass encodes and avg bitrate. The "time machine" IS the 2-pass encoding! :lol:

About lmin, 2.49 is the highest acceptable value for video or anime with gradients IMHO. Clean anime without gradients can go up to lmin=5 :!:

Setting a high vbitrate and using lmin as the average quantizer can really be the way to go for 1-pass encodes. The high vbitrate setting would "glue" the quantizing to lmin :)

@incredible: vqmin=1:mbqmin=1:lmin=2:lmax=4:vrc_maxrate=9800 seems to be what you're looking for, but for such low bitrates and dark scenes I'd aim for lmin=1 ;)

@all: Cygwin's build is indeed a bit faster (well, VMesquita's build is faster, I didn't compare two compiles of the same code :) ) in PAL (15 fps on my PIII-500 with my last settings, versus 14 fps with my build).

With NTSC things get worse for both builds: -vf softpulldown slows them to 7 fps :x

About 2-pass encodings: I believe vqmin=1:mbqmin=1:lmin=1:vrc_maxrate=9800 would make a terrific first pass ;)

It's good to be back :P


Bilu

digitall.doc 04-10-2004 05:19 PM

bilu,
and it's good to see you back :wink:

bilu 04-10-2004 05:28 PM

Quote:

Originally Posted by vmesquita
@digitall.doc and incredible
I agree 100% with digitall.doc. Simply there's no way that a encoder can do the best bitrate distribution and still keep an specified average, because it doesn't know what lies ahead. Let's take and extreme example. Imagine the following: you have a movie that starts very calm. A good example is "Missing" (featuring Tommy Lee Jones). After an hour, it becomes full of action. How can the encoder "know" that the last hour has more action and save bitrate? There's no way this can work, you see? Yes, it may not look bad, but the bitrate distribution will not be optimal, never... Unless you have a time machine, like someone once said in a thread. :D

This is the main reason why I abandoned vrc_eq=avgTex and use only vrc_eq=tex. On bitrate peaks it overquantized.


Bilu

bilu 04-10-2004 05:33 PM

Quote:

Originally Posted by vmesquita
Let's get back to testing. Since most of you are trying to find the best mencoder parameters, I decide to improve this AVI input thing, because mencoder is much faster without avisynth. I just wanted to let you know that I am working a good filtering for MPEG4 matherial, using internal filters.

It has an in-built KernelDeint, that may be good.
But Mencoder's IVTC filters suck, tried them when I started this thread.


Bilu

bilu 04-10-2004 06:40 PM

Quote:

Originally Posted by bilu
@all: Cygwin's build is indeed a bit faster (well, VMesquita's build is faster, I didn't compare two compiles of the same code :) ) in PAL (15 fps on my PIII-500 with my last settings, versus 14 fps with my build).

With NTSC things get worse for both builds: -vf softpulldown slows them to 7 fps :x

Just reported to the mailing list:

http://thread.gmane.org/gmane.comp.v...yer.user/27991

Bilu

rds_correia 04-10-2004 06:44 PM

Quote:

Originally Posted by bilu
@rds_correia: the only filtering I'm doing is vf=yuvcsp to limit the encoding to the CCIR-601 color range, same as using Avisynth's Limiter().

Good thinking :)
Quote:

Originally Posted by bilu
Setting a high vbitrate and using lmin as the average quantizer can really be the way to go for 1-pass encodes. The high vbitrate setting would "glue" the quantizing to lmin :)

So you would do something like :vbitrate=7000:lmin=2.50: ?
Cheers

bilu 04-10-2004 06:48 PM

Quote:

Originally Posted by rds_correia
Quote:

Originally Posted by bilu
Setting a high vbitrate and using lmin as the average quantizer can really be the way to go for 1-pass encodes. The high vbitrate setting would "glue" the quantizing to lmin :)

So you would do something like :vbitrate=7000:lmin=2.50: ?

On my tests I found 2.50 too much :?
But 2.49 had a different behaviour :lol:

I'd do vbitrate=9800:vrc_maxrate=9800:lmin=2.49:vqmin=1:m bqmin=1


Bilu

digitall.doc 04-10-2004 06:57 PM

Quote:

Originally Posted by bilu
Setting a high vbitrate and using lmin as the average quantizer can really be the way to go for 1-pass encodes. The high vbitrate setting would "glue" the quantizing to lmin :)

Well, this is what I've been proposing, I think, based on your previous advises. But I've got a doubt: still don't know clearly if with this approach (vbitrate=vrc_maxrate and lmin showing quantizers the way) lmin will work as an average quantizer (when lmin>vqmin), or as a guide to make quantizers tend to vqmin (when lmin <= vqmin).
In my tests, with vqmin=1:lmin=1 or vqmin=2:lmin=1.5, lmin acts lowering quantizers and making them go closer to vqmin, but maybe (don't remember well, I've to see again) with less oscillations.
But with your approach with vqmin=1:lmin=2.49, I see quantizers oscillating, but far from 1, and I don't remember that average was 2.49 (maybe because you didn't use high vbitrate).
I can't say what's the best way. Maybe high vbitrate and lmin about 2 (to have quantizers between 1 and 3?).

bilu 04-10-2004 07:06 PM

Quote:

Originally Posted by digitall.doc
But I've got a doubt: still don't know clearly if with this approach (vbitrate=vrc_maxrate and lmin showing quantizers the way) lmin will work as an average quantizer (when lmin>vqmin), or as a guide to make quantizers tend to vqmin (when lmin <= vqmin).

Both the ways you specified :lol:
If lmin < vqmin, quantizer will glue itself to vqmin "trying to reach" lmin.
If lmin > vqmin, quantizers will tend to lmin and not to vqmin, BUT they will use lower quantizer if the motion estimation tells them to. That's why lmin=2.49:vqmin=1 is slightly better than lmin=2.49:vqmin=2 (tested on a underwater dark scene).
Quote:

Maybe high vbitrate and lmin about 2 (to have quantizers between 1 and 3?).
That's what I've suggested to Incredible, yes :)

Bilu

digitall.doc 04-10-2004 07:15 PM

Quote:

Originally Posted by bilu
If lmin > vqmin, quantizers will tend to lmin and not to vqmin, BUT they will use lower quantizer if the motion estimation tells them to.

But, from the results that you posted, with vqmin=1 and lmin=2.49, average Q was about 5.6, so lmin didn't work like an average quantizer...
Was it because you used a low vbitrate value?. Do you think that with a bigger sample and high vbitrate, lmin will really be the avg Q?.

bilu 04-10-2004 07:26 PM

Quote:

Was it because you used a low vbitrate value?. Do you think that with a bigger sample and high vbitrate, lmin will really be the avg Q?.
My shots were from Neo Genesis Evangelion with vbitrate=3000 and it allways got results more than 4000 kpbs, so that's probably it.

With my The Abyss encodes it got around 2 and 3, bitrate was allways lower than 3000 and vqmin=1. So I would expect it to work like that, yes.


Bilu

incredible 04-11-2004 03:22 AM

Quote:

Originally Posted by vmesquita
@digitall.doc and incredible
I agree 100% with digitall.doc. Simply there's no way that a encoder can do the best bitrate distribution and still keep an specified average, because it doesn't know what lies ahead. Let's take and extreme example. Imagine the following: you have a movie that starts very calm. A good example is "Missing" (featuring Tommy Lee Jones). After an hour, it becomes full of action. How can the encoder "know" that the last hour has more action and save bitrate? There's no way this can work, you see? Yes, it may not look bad, but the bitrate distribution will not be optimal, never... Unless you have a time machine, like someone once said in a thread. :D

I know that veery well VMesquita ;-)
BUT maybe then its luck as 94% of all my encodes using my script do almost match the given Vbitrate 8O
And as I said to digi Doc .... I don't know how this can happen! Cause this would mean prediction would be nonsens but the movie won't be linear in its treatment, .... so thats why Im that wondering about "my" Vbitrate = almost avg encoded bitrate.
(but for shure I still do a prediction ;-) )

And as said above this Vbitrate factor in my case is just used the "other way" to affect the quantizer during encoding as I saw that just another way like lmin etc. and changing them also does affect other - not wnated - Quantization bahaviours.

bilu 04-11-2004 05:54 AM

Guys, have a look.

Extensive tests without vrc_minrate
http://www.kvcd.net/forum/viewtopic.php?t=10229


Bilu

rds_correia 04-11-2004 06:36 AM

:D GREAT Easter Season findings :D
Hya
Now I just wonder.
Is this the way it was meant to be?
Or is it just temporary until they fix ratecontrol?
Sahre your thoughts with us bilu :)
Cheers


All times are GMT -5. The time now is 09:40 PM  —  vBulletin © Jelsoft Enterprises Ltd

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