digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder extra settings makes quality worse? (http://www.digitalfaq.com/archives/encode/9380-mencoder-extra-settings.html)

Fluffbutt 04-28-2004 11:21 PM

Mencoder extra settings makes quality worse?
 
From Pal dvd to Pal vcd (kvcd).

vlelim=-4
vcelim=9
lumi_mask=0.05
dark_mask=0.01

I got from another site that listed mencoder 'must have' setting (didn't say WHY though!).

I tried these, (and worked out what the hell they do!!) - results are not good, very bad blocking over plain surfaces. Although file size drops by 10%, quality goes down by about 25%.

For those that don't know, I gather that the two mask's set up a threshold for whisch to consider areas for quality encoding (as in 'everything below (or above) this is one area"), and the lim's tell mencoder how much to vary the quality for those masked areas.

(corrections welcome)

Leaving these out of the bat file raised the size from 600 to 655, but gave a quality increase of less-than-vcd to above-svcd (almost dvd!!).

I've also tried vrc-eq=avgTex, but didn't see any difference.
Also used :vhq as well, results seem better, less blocking on edges (??)

Anyone else with ideas and setting to try?

incredible 04-29-2004 03:48 AM

As you may have already seen, here's a Thread where we (mostly biul and DigiDoc and Riu) have tested a very lot of the mencoder parameters.
http://www.kvcd.net/forum/viewtopic.php?t=9074

There you can find a lot of answers .... but its loooong :)

yaz 04-29-2004 05:55 AM

Quote:

Originally Posted by incredible
... there you can find a lot of answers ...

ehrmmm ... yep ... & there u can find also the opposite of them. i must say (with the greatest respect of mine !) that thread is a big confusion for a noob. it just hurts.
that's why i've just started a systematic investigation of mencoder options. first results are very interesting but i'm stopped. my present problem is that i couldn't find a reliable mpeg2 stream analyzer. imho, bitrate viewer simply cheats. i've tried 3 diff versions & each(!) gave me different results. diff was more than significant, sometimes about 50% (!?!?!)
what do u guys use or recommend for such a purpose? i just wanna check the bitrate (min/avg/max) & the quantizer distribution.

if i have sg relevant i will pile it up here (or where?)
the bests
y

incredible 04-29-2004 06:39 AM

Youre right, thats why I said ".... its loong" ;-)

Well a resumeé as I see can be found in Vmesquitas MencoderME Templates as they do contain the summary of that thread there, ... as I understood this.

Quote:

bitrate viewer simply cheats
I do quote KIKA (online transl.Tool used)
Quote:

Because a high level means only that a block contained many same values after quantization, and which can mean also result of a perfect interaction of quantization and RLE coding! And that again means that in such a case highly one quantized, the image quality however on the highest possible level was! Since however hardly someone really understands, what has it with the q-level actually on itself, I leave rather the fingers of interpretation attempts.
From this site: http://www.edv-tipp.de/gastbeitraege/kika001_dct.htm

Thats also the reason WHY I dropped Bitrateviewer to see the encoding Quality in mathematical "translation" ... dont know to say it better in english ;-)

CCE outputs at th same avg bitrate almost a double of Q factor heights. But the result checked by eyes is just a bit worse .... so :?

There are several mpeg analyzing tools (I do saw some of them on the www but the good ones do cost a HELL!

:(

yaz 04-29-2004 07:09 AM

@incredible
thx, man !
kika : wufff ... i feel i need a heavy brush-up on my german :-)
options : is there any interest in a systematic investigation here around ? imho, mencoder really do worth a try.
btw, mencoder ... u do still owe me an athlon compile accepting ffdshow avis :-) (just to remind u :-))
the bests
y

Fluffbutt 04-29-2004 08:37 AM

Umm, yaz - i'm using an athlon compile here that accepts ffdshow avis - it's the main base for my movies. Dvd2avi then ff (oh, sorry its ffvfw..) oops :oops:

Incredible - yas, saw that forum. But as far as I read nearly all the discussion is about dvd output (kdvd), not k(s)vcd. I'd imagine the setting must change for such low (compared to dvd) bitrates, after all we're talking a min-ave-max of 550-900-1850, not 3000-5000-8000...

incredible 04-29-2004 11:48 AM

Quote:

Originally Posted by yaz
btw, mencoder ... u do still owe me an athlon compile accepting ffdshow avis :-) (just to remind u :-))
the bests
y

:lol:

And you do owe me a possibility to get d2v sources working with mencoder! :D

Ok, ... I did provide in the very end of that compile thread one of the latest (one week ago) builds .... but one week is much in mencoder developing time I think ;-) ... and Vmesquita talked about a new version which also got some more IVTC bug fixes and addings.

According to FFdshow .... just tweak the codecs.conf file ... even you did tetermine a internal codecs configuration, when starting the .bat mencoder searches for that config file anyway ... I did find that out by just deleting one codec description in the codecs file ... he counts one codec LESS when showing the log! So mencoder does take not whats IN that codecsfile on your disk.
So do use the ffdshow configurations of the config file as mentioned by RDS_Correia in that compile thread!

The bests also to you :wink:

I hope you understand that I wont get away from my ffvfw makeavis as my system is running perfect ... and as we know ... never change a running system as I do not got these Issues riu talked about which do occur when using the ffvfw one instead of the ffdsho one.


BTW... that codec workout (VFAPI or d2v) was mainly intended to see if any windows codec driver could be used for mencoder to decode inputs no matter which one IF its supported by Windows installed codec library/dll's.

It would be really a big SHOT to get d2v directshow codec working in mencoder as by this people using Win98 can directly encode from VOBs as FAT32 doesn't support a "one movie VOB" in its big size.

VFAPI wouldn't be my recomm. in a case of Win98 as VFAPI converter and its internal processing works with RGB!!
But by the way its faster than makeavis!

digitall.doc 04-29-2004 02:11 PM

Quote:

Originally Posted by incredible
VFAPI wouldn't be my recomm. in a case of Win98 as VFAPI converter and its internal processing works with RGB!!
But by the way its faster than makeavis!

Inc,
is it already done?. Is there a way to tweak codecs.conf or config.conf to work with .avs files directly within mencoder, using the same VFAPI we use within TMPGEnc or DVD2AVI?.
It would be great, for those of us that learned with avisynth (I asked in other thread about mencoder filtering, but it seams we don't manage still well with those filters...)

incredible 04-29-2004 02:46 PM

I think theres no way to get avs "directly" working with mencoder.exe (IMHO but that could change) ... as I think mencoder needs FourCC descriptions in the inputted container. And that provides for example makeavis or VFAPI reader/converter generated avis , as it ends up in an recognisable "avi container" for mencoders eyes.

I think even DVD2AVI does a diff. way than directly frameserving via VFAPI as this would mean IF d2v would be frameserved via VFAPI ... only RGB streams would be the result when importing that d2v in avisynth :?:

Fluffbutt 04-29-2004 10:18 PM

Umm, am I doing something 'wrong' with the process I'm using?

dvd2avi d2v - avisynth with filters - ffvfw fake avi - mencoder - mpg
mux with headac3'd mp2 from ac3 from dvd2avi - vcdeasy to cdr.

I get the impression from digitall.doc ("..It would be great, for those of us that learned with avisynth..") that avisynth filters don't work this way (they sem to, DCT really slows mencoder down to about 2 fps (from 8 :lol: )

yaz 04-30-2004 06:42 AM

hmmm ... maybe i'm just dead-brained but there seem to be some confusion here.
mencoder can't eat anything but 'containers' which are identified exclusively by their fourcc. the proper decoder is read from the codecs.conf according to this. so, there's no way of feeding scripts like avs or d2v directly.
the solution is a 'wrapper' prog (like makeavis, vfapi, ...) they simply mount a fake header onto the script with a unique fourcc. it's not framserving but wrapping.
but ... d2v can be fed directly into some prog (e.g. vdubmod, tsunami, mpc,...). they all have their own parser/interpreter for handling such scripts & some of them can serve (vdm, tsunami, ... ) however, it's just 'by-passing' of decoding to raw avi.
so ... inc., my dear, there's no way of direct feed for d2v. sorry, pal ! the more i think the more i'm convinced that i simply fed m2v instead of d2v & i was very proud of ... nothing :-(
but, as prodator pointed out, there's not much sense of forcing it as d2v can be served via avisynth. on my athlon xp it does not make much difference as regards speed. encoding from vobs runs about 44-45fps & from a vob-d2v-avs-avis chain it's about 42-43 (no filtering, of course).
@digi.doc : the way of hacking codecs.conf is in the 'how to compile ...' thread (we haven't found a better place to hide it more :-))

the bests
y

@inc. the newest menc from vmesquita is not optimized for athlon so ... it's your turn again :-)

Prodater64 04-30-2004 07:35 AM

But why quenc can?

incredible 04-30-2004 08:02 AM

@ yaz

Ill check the new CVS tonight ...

@ Prodater

I think Nic (just assuming) did implementate a core where an internal AVS to AVIcontainer generation will be proceeded --- thats what he calls there in the thread "... The medium of dance ... " maybe based on a source of makeavis or that "AVS2AVI.exe"

@ Digi.Doc

... so as you read above ... we should check that avs2avi as it maybe will a bit faster than the makeavis? --- as every fps will count on very slow/old machines/CPUs of some members

digitall.doc 04-30-2004 11:01 AM

Quote:

Originally Posted by Fluffbutt
I get the impression from digitall.doc ("..It would be great, for those of us that learned with avisynth..") that avisynth filters don't work this way (they sem to, DCT really slows mencoder down to about 2 fps (from 8 :lol: )

Hi Fluffbutt,
your way is OK, above all if it works well for you. As Inc stated, the important thing is find a way that things work, and don't touch it (well, you'll have to change mencodeme and mencoder.exe versions).
I don't really know what did you understand from my post. The thing is that I learned (little) filtering videos with avisynth filters. And, apart from MA script and Static Script v4, we all keep some scripts we used on an special situation, or for some sources (captures, interlaced,...). And if we need to change a thing, we (more or less) know what filter to apply or tweak... I learned (little) this with avisynth. Mencoder has several filters in, that I'm not used to and don't know how to tweak. That's why it would be great if I could keep avisynth in mencoder, without losing speed...
This is what I wanted to say, but more explained know.

Quote:

Originally Posted by yaz
the solution is a 'wrapper' prog (like makeavis, vfapi, ...) they simply mount a fake header onto the script with a unique fourcc. it's not framserving but wrapping.

yaz, understood now.
But are wrapers supposed to slow down the proccess a lot?. Because I tested just a resize with and without avisynth, and seemed to me that was faster with avisynth... but when tried with a hole script, it really slowed down a lot (slower than TMPGEnc).
Quote:

@digi.doc : the way of hacking codecs.conf is in the 'how to compile ...' thread (we haven't found a better place to hide it more :) )
:lol: :lol:

Quote:

Originally Posted by Prodater64
But why quenc can?

Well, you can read Inc explanation... anyway I'd like to have it also implemented in mencoder or mencodeme...

Quote:

Originally Posted by incredible
@ Digi.Doc

... so as you read above ... we should check that avs2avi as it maybe will a bit faster than the makeavis? --- as every fps will count on very slow/old machines/CPUs of some members

Where am I to begin looking for AVS2AVI? :wink:

incredible 04-30-2004 11:37 AM

Quote:

Originally Posted by digitall.doc
Quote:

Originally Posted by incredible
@ Digi.Doc
... so as you read above ... we should check that avs2avi as it maybe will a bit faster than the makeavis? --- as every fps will count on very slow/old machines/CPUs of some members

Where am I to begin looking for AVS2AVI? :wink:

The download:
http://www.divx-digest.com/software/avs2avi.html

As I thought ... a commandline app. ... easy to integrate in GUIs
:wink:

BUT! We should see which Fourcc and therefore which decoder has to be used in mencoders codecs.conf as till now I didn't use it .. so Ill look into it this evening. :wink:

vmesquita 04-30-2004 12:03 PM

If I remember correctly, AVS2AVI is not like MakeAVIS, it's more like a command-line AVI encoder. :wink:

digitall.doc 04-30-2004 12:42 PM

Quote:

Originally Posted by vmesquita
If I remember correctly, AVS2AVI is not like MakeAVIS, it's more like a command-line AVI encoder. :wink:

Does it mean it will encode first an avi from avs, and then feed it to mencoder?. If the answer is "yes", that's not good :(

vmesquita 04-30-2004 01:12 PM

Quote:

Originally Posted by digitall.doc
Does it mean it will encode first an avi from avs, and then feed it to mencoder?. If the answer is "yes", that's not good :(

Not really. It's an AVI encoder, you can use to encode to DivX or even to encode to mpeg1/2 using FFVFW, but only that. Imagine it as a "command-line very stripped down virtualdub" :wink:

incredible 04-30-2004 01:19 PM

Yep! It is ... sorry :( :)

digitall.doc 04-30-2004 02:04 PM

Quote:

Originally Posted by vmesquita
Not really. It's an AVI encoder, you can use to encode to DivX or even to encode to mpeg1/2 using FFVFW, but only that. Imagine it as a "command-line very stripped down virtualdub" :wink:

Not useful for our purpose :(

rds_correia 04-30-2004 02:36 PM

Hya,
So, from what's been said here there isn't anything we can do to have MEncoder to read avs or d2v files, right :?:
Darn :!:
That is very sad. So the only way, such as in FFvfw or QuEnc, is waiting that the MPlayer team develops an external tool for this purpose.
Sad again. Because they aren't going to make tools for win32 only.
This whole project is based on the portability of the product.
In such sense either we accept that the speed achieved with makeAVIS is the maximum possible for reading avs files or we come up
with a new AVS :arrow: AVI wrapper faster than makeAVIS.
If so we really should open different threads for MEncoder internal filters and other for Avisynth :arrow: makeAVIS :arrow: MEncoder threads.
Or else just consider droping avisynth which to me is not an option given the enormous amount of possibilities it gives us.
Not to mention that by droping Avisynth we'd loose MA for instance :cry:
Care to comment my last paragraph, please.
Cheers

Prodater64 04-30-2004 02:51 PM

Quote:

Originally Posted by incredible
@ Prodater

I think Nic (just assuming) did implementate a core where an internal AVS to AVIcontainer generation will be proceeded --- thats what he calls there in the thread "... The medium of dance ... " maybe based on a source of makeavis or that "AVS2AVI.exe"

Does nobody here can make the same?
It is so hard to compile a wraper?

Prodater64 04-30-2004 08:57 PM

Here a trick for all of us what so like Avisynth. (Spanish Forum).
If anybody needs translation, just tell me it.

digitall.doc 05-01-2004 04:29 AM

Quote:

Originally Posted by Prodater64
Here a trick for all of us what so like Avisynth. (Spanish Forum).

Prodater,
if I understood well your way, this is a way to automate the proccess of loading an avs in makeavis and load the output avi in mencodeme, isn't it?.
It's nice. And if we add the audio encoding/trascoding as Inc posted, better. I hope we'll find the way to make this within mencoder, to speed it up (your way makes it easier, but doesn't affect the speed, isn't it?).

Prodater64 05-01-2004 05:13 AM

Quote:

Originally Posted by digitall.doc
Quote:

Originally Posted by Prodater64
... up (your way makes it easier, but doesn't affect the speed, isn't it?).


Yes, it is.
I have same hope than you, but meanwhile... :)

Fluffbutt 05-01-2004 09:42 AM

Would this work? But I dunno the 4cc (xxxx) code.. I suppose it won't work without it, huh...

videocodec d2v
info "d2v directshow"
status untested
fourcc xxxx
driver dshow
dll "d2vsource.ax"
out YV12

d2vsource.ax driver http://sourceforge.net/projects/guliverkli

Also Media Player Classic!!

rds_correia 05-01-2004 10:28 AM

Hi Fluff,
I've been trying also with much similar config:
Code:

videocodec d2vsource
  info "D2V Sources"
  status untested
  fourcc D2VS
  driver vfw
  dll "c:\video\mplayer\codecs\d2vsource.ax"
  out YV12

But there's no way I can get it to work.
See if you have more luck than I do.
Cheers

incredible 05-01-2004 12:06 PM

I already tried that d2vsource.ax driver settings in codecs.conf

but it doesnt work as d2v is not a container incl. a FourCC digit.

Fluffbutt 05-01-2004 12:44 PM

What about changing the registry to add a 4cc?

eg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\d evenum\{33D9A760-90C8-11D0-BD43-00A0C911CE86}\avis]
"FriendlyName"="ffvfw MPEG-4 Codec"
"CLSID"="{D76E2820-1563-11CF-AC98-00AA004C0FA9}"
"FilterData"=hex:02,00,00,00,00,00,20,00,02,00,00, 00,00,00,00,00,30,70,69,33,\
00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00 ,00,00,00,30,74,79,33,00,\
00,00,00,60,00,00,00,70,00,00,00,31,70,69,33,08,00 ,00,00,00,00,00,00,01,00,\
00,00,00,00,00,00,00,00,00,00,30,74,79,33,00,00,00 ,00,60,00,00,00,80,00,00,\
00,76,69,64,73,00,00,10,00,80,00,00,aa,00,38,9b,71 ,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,61,76,69,73,00,00,10,00,80 ,00,00,aa,00,38,9b,71
"FccHandler"="avis"
"ClassManagerFlags"=dword:00000000

Is the FFVfw code - can we change that to allow D2VS to be seen?

<edit> actually it'd take more than that - the "CLSID"="{D76E2820-1563-11CF-AC98-00AA004C0FA9}
would have to be created too, and the filter data changed to match the format of the files the d2v pointed too - if you had a d2v from mpeg (vob) it'd be one filter, a d2v from mpeg4 (xvid) would be another filter.

I suspect it won't work this way - I'll play with my registry over the next few days and report.. <edit>

Nope - there's no real way to select the {xxx code (and there's about 1200 already in use (most for bloody adverts/trojans/adware), and i have no idea what to make of the filter data.

I'm giving up on this track - but not on importing avs or d2v...

incredible 05-02-2004 05:26 PM

I just recognised at configure options for compiling mencoder this:

--disable-dshow _____=disable Win32/DirectShow support [autodetect]

Means, I should try to set "--enable-dshow" before compiling as the d2vsource.ax is a directshow driver.

Ill try that these days. :)

digitall.doc 05-02-2004 05:37 PM

Just a silly question, I'm sure that with an obvious answer... :roll:
What's the advantage of loading d2v in mencoder, compared to loading directly vob files or avi files?.
Because I just use DVD2AVI to feed the video to avisynth, I don't process at all the video in DVD2AVI.

... I know, it's cristal clear to everybody, but I don't see it now :oops:

But, as I see advances (at least ideas) in d2v way, I'm sure we'll manage to feed avs files to mencoder soon ( :?: ), in a faster way than makeAVIS one.
:wink:

incredible 05-02-2004 05:47 PM

@ Digi Doc

Win98 (Fat32) doesn`t support full size VOB files like 6GB ones, ... you see? ;-)
I got Win2000 (NTFS) but some users do have still Win98.

Fluffbutt 05-02-2004 09:08 PM

@ Digi Doc

Plus also, the less paths you use between source and output, the faster things will be.

I only use avisynth to frameserve the vobs to mencoder (I think I've got 'deen' , but only as a slight cleaner upper)

vob-d2v-avs-avi-mencoder, if I could go vob-d2v-mencoder it'd be faster.

I'm in xp, but not using ntfs, so I've also got the 4G limit.

Prodater64 05-02-2004 11:41 PM

Quote:

Originally Posted by Fluffbutt
I'm in xp, but not using ntfs, so I've also got the 4G limit.

Maybe you can make a NTFS partition (with partition magic or any other).

Fluffbutt 05-03-2004 03:12 AM

Probably. I seem to recall that ntfs read/write from fat32 need specail drivers that run in 16 bit mode - not very fast or safe.

Nah, I'm happy frame serving - I don't miss >4G files.. they're a bugger to defrag anyway LOL :lol:

incredible 05-03-2004 03:21 AM

Quote:

Originally Posted by Fluffbutt
I don't miss >4G files.. they're a bugger to defrag anyway LOL :lol:

:?:

In regular you got a second partition where you store your VOB rips only for that time they are needed - afterwards they will be deleted.

And as Mencoder or any other encoder wont be recognisable slower in case of some fragments of source HD, that doesnt make it worth to keep everything in Fat31 ... so just format one Partition to NTFS.

I remember the days when RAM was that expensive and therefore we build an FWB sledgehammer RAID on a MAC :arrow: cause there in the case to use Photoshop and a allocation to the HD as Virtual RAM .... there a mega clean Raid/Drive made sense ;-)

digitall.doc 05-03-2004 07:48 AM

Quote:

Originally Posted by incredible
@ Digi Doc

Win98 (Fat32) doesn`t support full size VOB files like 6GB ones, ... you see? ;-)
I got Win2000 (NTFS) but some users do have still Win98.

:oops: I was afraid it was evident to everybody...

Quote:

Originally Posted by Fluffbutt
@ Digi Doc

Plus also, the less paths you use between source and output, the faster things will be.

I only use avisynth to frameserve the vobs to mencoder (I think I've got 'deen' , but only as a slight cleaner upper)

vob-d2v-avs-avi-mencoder, if I could go vob-d2v-mencoder it'd be faster.

I'm in xp, but not using ntfs, so I've also got the 4G limit.

Fluff, you've got an even shorter possibility to feed splitted-vobs to mencoder. You can pipe vobs in mencoder.
If you don't know how, make me know and we can explain.
This way there won't be paths, just vob -> mencoder (through piping)

Fluffbutt 05-03-2004 08:56 AM

@ Digi Doc

Ya, I tried the copy /b vob + vob + vob > mencoder (obviously with the right file names.. :lol:)

but it thrashed the hard drive for minutes reading the vob files. In the end I gave up.

incredible 05-03-2004 10:02 AM

@ Fluffbut

As you said you are working under FAT32 .... a merging of the VOBs would overflow the specs of max FAT32 filesize!

DigitallDoc meant the way how mencoder does automatically recognises the following VOBs if just pointig to the first VOB using a special Command in Mencoder.

:idea: :?: From mencoder manpage.html :

cat D:\PathToVobs\*.VOB | mencoder <options> -

So try to put all your VOB beginning from VTS_XX_1.VOB (not 0!! Thats the Vob contain. the menues) into a folder and point to that via mencoder:

(VTS_01_0.VOB) not!
VTS_01_1.VOB
VTS_01_2.VOB
VTS_01_3.VOB
VTS_01_4.VOB
VTS_01_5.VOB

In here _01_ is the track incl. the movie

Seems that the "cat" tells mencoder that there is a "catalogue" of vobs to be encoded as one resulting file (m2v) ?

So this post here is JUST IMHO!

Peder 05-03-2004 10:06 AM

@ Fluffbut
Look at
http://zebra.fh-weingarten.de/~maxi/.../msg00374.html
and http://article.gmane.org/gmane.comp....yer.user/28318


All times are GMT -5. The time now is 10:22 AM  —  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.