Quantcast Mencoder: Mencoding Divxs/DVDs Using 2 Pass VBR - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
04-10-2004, 07:22 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
@bilu,
Tried mvo=1, but as the manpage suggest, make no difference with mbd=0. So I tried mbd=2:mv0=1 and got a bad result. I am now going to try "lmin=1:scplx_mask=0.4" with my best settings so far to see if it improves.

@digitall.doc
I followed the mencoder thread for a while in the begging but later I stopped reading and participating, because I was having too many issues with mencoder, looked very instable to me in the past. Not anymore.
I am using a DVD source to do the tests (the Lawmmover Man trailer, great movie BTW), to make sure any artifacts are not coming from the source.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #22  
04-10-2004, 07:31 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vmesquita
@bilu,
Tried mvo=1, but as the manpage suggest, make no difference with mbd=0.
Hey vmesquita,

Take a look at the source code of the encoder. It's more interesting than anything the MAN pages will ever tell

-kwag
Reply With Quote
  #23  
04-10-2004, 07:37 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag
Great idea, I'll do that later, it should be very interesting.

@bilu
"lmin=1:scplx_mask=0.4" created a output with slighly more artifacts. I'll try lmin=1:scplx_mask=0.249 just to be complete. I think I am very near to my optimal settings!

<edit>I made a mistake, I'll re-do the test.
Reply With Quote
  #24  
04-10-2004, 08:40 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Looks like the best ssettings (at least with the trailer I am testing) is really ":scplx_mask=0.3:lmin=1:"
Now a very interesting data: I encoded the same trailer, using CCE in 2-Pass VBR. CCE encode was not bad, but much inferior to mencoder. Much more DCTs and mosquitos. With this latest settings, artifacts are near gone in mencoder encode. Also CCE has problems with fades, which mencoder doesn't, this is very visible. I'll post some screenshots later.

Also I found out what was making prediction go crazy: looks like specifying vrc_minrate causes that (not max_rate). I'll test with other stuff to see if vbitrate is working fine when vrc_minrate is not used or this was just coincidence.

Thanks bilu and digitall.doc for all the tips and previous tests I'll update the first post with my final settings (for now).
Reply With Quote
  #25  
04-10-2004, 08:55 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vmesquita
Also I found out what was making prediction go crazy: looks like specifying vrc_minrate causes that (not max_rate). I'll test with other stuff to see if vbitrate is working fine when vrc_minrate is not used or this was just coincidence.
Not coincidence, just made that same test over the same stream I used for the screenshots. Used my settings but removed vrc_minrate, it got to an average of 2868 kbps.

I'll make my tests all over again

Bilu
Reply With Quote
  #26  
04-10-2004, 09:00 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by bilu
Used my settings but removed vrc_minrate, it got to an average of 2868 kbps.
But what was your target? 3000? I am currectly encoding a bigger AVI (20 minutes, my test trailer was only 2 minutes long) to see what happens.

<edit> I checked the last thread you posted later (the one with BV screenshots), and seems that you are aiming for 3000. It's not bad for 1 pass. Also you have to take on account that sometimes it's impossible to rise bitrate, because mencoder is already using the lower quantisizer possible. This AVI I am testing now I saw this happening (opened in BV and confirmed the hypotesis). So I rised the target resolution from 352x480 to 480x480 and now, with 70% of first pass completed, average is 999!

<edit2> Bitrate in first pass: 971.55 Bitrate in Second Pass: 1000.143! Amazing!
<edit3>Just for fun, I did the whole "Lawnmover man" movie from DVD to a 352x480 KSVCD. I asked for 873 kbits, got 871 in the first pass and 873 in the second pass, with an average quantisizer of 2.34. And the bitrate has been respected, max in BV was 2873 (I asked for 2500), but we all know BV is not that accurate. To achive that, there has been quantization peaks of 13.08!!!
Reply With Quote
  #27  
04-11-2004, 05:55 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
@VMesquita

Re-did a lot of testing.

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


Bilu
Reply With Quote
  #28  
04-12-2004, 11:07 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by vmesquita
@bilu,
Tried mvo=1, but as the manpage suggest, make no difference with mbd=0.
Hey vmesquita,

Take a look at the source code of the encoder. It's more interesting than anything the MAN pages will ever tell

-kwag
Well, if you take some conclusions looking at the source code, make us know, since I'm surprised with results I get from time to time, opposite (in a way) to what I expected...

BTW, already tested your compilation (run time version for me, P4), and is FAST: about 27 fps in each pass, just double of real-time in two-passes!!
Reply With Quote
  #29  
04-12-2004, 01:43 PM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc
And it can get even faster, if you could recompile it to support SSE and SSE2 (but not 3dNow!). I'll make a recompiling guide (or maybe I should do multiple compilations), just give me some time.
Reply With Quote
  #30  
04-12-2004, 04:32 PM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vmesquita
I'll make a recompiling guide (or maybe I should do multiple compilations), just give me some time.
Very helpful (mainly the last) for those of us that are... how could I say,
Reply With Quote
  #31  
04-14-2004, 05:33 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all,
I've been testing a lot lately with mencoder 2pass to encode KDVD.
With barebones command and setting, I get about 26 fps in each pass, that means I finish 2 pass in less time it lasted with 1 pass and my last settings (I was getting 12 fps as much). And really accurate final file size.
So, it's fast and accurate... but that's not all, of course. I've been doing my tests with StarWars II (1 h 16 min 40 sec), so to fit this film twice (2 films per media) with 2 audio tracks (1 ac3 5.1 and 1 ac3 2.0) and a subtitle file, I calculated an average bitrate about 1500. So I did my tests with vbitrate=1500. I know this may be an extreme case, but wanted to see the output.
With barebones command and setting, no filter, it was fast as reported. And when seen in PC doesn't look bad, very homogeneus. But it's not good at all, I see lots of microblocks (don't know if this is the correct term, but they're not macroblocks, and affect the whole image).
I tried adding mbd=2:mv0=1 and quantizers raised a bit, and I think I saw more gibbs effects (I think they are, I don't really know how a gibb looks like). Encoding slowed from 26 to 20 fps. And kept seeing microblocks.
I tried instead with trell=1:cbp=1, and quantizers lowered a bit, bitrate raised a bit (respected average bitrate), and little slow down in speed ( from 26 to 24). But still microblocks (I cannot say if little less).
Tried then with scplx_mask and tcplx_mask, but I think even worse.
I tried with trell=1:cbp=1:mbd=2:mv0=1, that slowed down a lot the speed (to about 16 fps) and didn't improve the microblock problem.
... so I'm afraid I took the best out of mencoder 2pass for KDVD and vbitrate=1500. Maybe it's an extreme case, and maybe this won't be noticeable later when seen on TV. But I would like to improve the output: do you know how?.
I got better results with 1pass, but of course with higher average bitrate and file sizes, that wouldn't fit what I'm asking know to mencoder 2pass.
Any ideas how can we improve this?

Don't take me wrong: I'm really very satisfied with mencoder 2pass, and I think that's the way. I just did a difficult test, and want to know it is there a way to make it look better.
Reply With Quote
  #32  
04-15-2004, 07:14 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
oK vmesquita please make some things clear for me about 2-pass encoding with mencoder.

Here are my problems. When I encode a movie with vpass=2, mencoder will immediately close, without starting to encode.
When I set it to vpass=1, mencoder will create a .m2v file, together with a growing dvx2pass.log file.
When I abort that encode, set mencoder back to vpass=2, the encoder will start, but will only encode until that amount of percentage I already encoded with vpass=1 (I figure it crashes when it has read the divx2pass.log until the end).

Now please tell me how can I automate that process? where's the trick? I don't want to do a manual first pass and a manual second pass...
__________________
j3llyG0053
Reply With Quote
  #33  
04-15-2004, 07:23 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
There's no way to run mencoder only once and make it do 2 passes. You have to call it twice. But you can automate the process easily by using my GUI ( that you already know, there's a new release out ) or creating a batch file.
Reply With Quote
  #34  
04-15-2004, 07:26 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Alright, now I understand. phew...

But why is mencoder creating an m2v file in first pass? isn't it supposed to write just a log for the second pass?
__________________
j3llyG0053
Reply With Quote
  #35  
04-15-2004, 07:33 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
I just figured out: use -o NUL in the first time. This way it won't create the 1-pass file, just the logfile. I don't know if it's faster.

EDIT: A quick tes: looks like -o NUL is slower Well, maybe was just this time.
Reply With Quote
  #36  
04-15-2004, 08:46 AM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you VM...
This is getting fun now. I LOVE the quality this two-pass beast spits out. Ever thought about 3-pass?
__________________
j3llyG0053
Reply With Quote
  #37  
04-15-2004, 09:00 AM
vmesquita vmesquita is offline
Invalid Email / Banned / Spammer
 
Join Date: May 2003
Posts: 3,726
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Jellygoose
Thank you VM...
This is getting fun now. I LOVE the quality this two-pass beast spits out. Ever thought about 3-pass?
This would be fun... Unfortunatelly, mencoder doesn't update the logfile in second pass so no 3-Pass is possible.
Reply With Quote
  #38  
04-15-2004, 09:13 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
3-pass info:

http://www.mplayerhq.hu/DOCS/HTML/en...eat-divx4.html


Bilu
Reply With Quote
  #39  
04-15-2004, 09:22 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by vmesquita
I asked for 873 kbits, got 871 in the first pass and 873 in the second pass, with an average quantisizer of 2.34.
Be aware, that Bitrateviewer and its outputted Qunatizer doesn't stand for resulted "viewable" image quality! So only do compare the encoding using your eyes!

As already said, I did see that on tests this week using CCE 2.50. CCE2.6x, TmpgEnc and mencoder.
If you choose "linear qunatizer scale" in CCE 2.50 a "wonderful" q curve of 1 constantly! comes out where the bitrates also are ok. BUT it did look even worse than the same parameters and low VBR avg bitrate used in TmpgEnc but non linear Quantizer (tmpgEnc default) which resulted in a average Q of 3.5 !!! with peaks up to 6!!
So the output from Bitrateviewers Q curve does say something different ... maybe how the quality of the stream how it will be descrambled by the decoding and therefore the usage of the matrix posted in the m2v! Means perfect descrambling BUT does NOTHING say about the quantisation DURING the encoding ..... maybe thats the reason?!
Reply With Quote
  #40  
04-15-2004, 09:54 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all.
Sorry me for being so impatient. I posted my tests with two passes in this same thread, previous page. And posted there some results and some problems I found.
Just wanted to know if is there any way to improve the results I got.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Mencoder: Question about MEncoder 1 pass black prince Video Encoding and Conversion 32 06-05-2004 08:06 AM
Mencoder: Mencoder two-pass encoding questions Prodater64 Video Encoding and Conversion 13 05-05-2004 03:33 PM
Mencoder: Changing/Setting field order in mencoder tuco1979 Video Encoding and Conversion 1 04-17-2004 09:06 AM
FFMPEG: Mencoder 2-pass japie Video Encoding and Conversion 9 11-04-2003 09:20 AM
Encoding single-pass KVCD vs. two-pass logan555 Video Encoding and Conversion 1 12-04-2002 09:18 AM

Thread Tools



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