Quantcast FFmpeg vs FFvfw vs Mencoder ? - Page 20 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #381  
04-01-2004, 04:37 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by digitall.doc
Don't know if the vratetol value=1835 was intended to be equal vrc_buf_size, but is a value to begin testing with (and, of course, also 0)
Answer from Amenophis:
http://forum.doom9.org/showthread.ph...846#post467846

Quote:
No, there's no reason for taking exactly the same value for vratetol. Nevertheless a value between 1500 and 2000 seems to be ok. When using 5000 or even 8000, Scenarist didn't like my files anymore, but the 1835 seems to work, so i thought 'never touch a running system'.
EDIT: The vratetol option must be >= 4


Bilu
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
  #382  
04-01-2004, 11:01 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
bilu,
did you test with vratetol?. Is there any change in the output, related to file size, bitrate and Q values?.

Yesterday I was thinking (not too much, it's bad for health ) that all mencoder parameters are like a grayscale, but we use them just black or white. I'll explain: we use vqblur=0, vbitrate=vrc_maxrate, vqcomp=1 (or vrc_eq=tex), p_mask=1,... I've seen people using vqblur=0.3, vbitrate<vrc_maxrate,...
It's not I'm not satisfied with our results, just opposite. It's just I don't really know the effect of not going to the extreme, but just close (like vqblur=0.1 instead 0). Did you test it?. I insist, that I like our actual results, it just a thinking I had.
Reply With Quote
  #383  
04-02-2004, 04:43 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
@digitall.doc

New mode to be tuned , let's call it "Wise CBR"

It basically works like this: from tests done before we know that scplx_mask=0.3 gets avg bitrates almost allways under 3000 Kbps,
so we set vrc_minrate near 3000 Kbps to create a "protective area".
This way lower motion scenes will be better preserved.

We already know how well scplx_mask lowers the bitrate preserving detail

The main reason for setting vrc_minrate 100 Kbps lower than vbitrate is to let it have room to compensate the bitrate peaks, but if it was more than 100 Kbps difference the avg bitrate would get lower.

Then we increase lmin from 2 to 2.5 to decrease a bit on the high bitrate peaks. Lower peaks mean better avg bitrate and on higher action the increased quantizing isn't noticeable. Most high bitrate peaks are high action.

But we won't deny their existence by using vrc_minrate=vrc_maxrate like in normal CBR, that's the "wise" part
Just lower the peaks a little so they don't make so much damage on the avg bitrate.

I've just encoded chapter 15 of the Gladiator (first fight in the Coliseum) and it looks very good!

Avg 3114/5.54
Peak 3967/7.20
Duration 7m18s

I'd like you to test this since you're aiming at 3000 kbps to fit 2 movies into one DVD-R.

Quote:
BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835reme =2recmp=2
:ildct=1:ilme=1:vstrict=-1:autoaspect=1:vqcomp=1:scplx_mask=0.3:vqblur=0
:vbitrate=3000:vrc_minrate=2900:vrc_maxrate=9800:v qmin=1:mbqmin=1:lmin=2.5
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,29,34,
37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40 ,48,27,29,34,37,38,40,48,
58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 :inter_matrix=16,18,20,22,
24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28 ,30,32,34,22,24,26,30,32,
32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36 ,38,40,28,30,32,34,36,38,
42,42,30,32,34,36,38,40,42,44

Bilu
Reply With Quote
  #384  
04-02-2004, 05:34 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
Hey bilu,

Give me a link to the latest MEncoder Windows binaries.
Let's make it a sticky

-kwag
Reply With Quote
  #385  
04-03-2004, 07:29 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag

Here's the current situation:

I reported a bug with B-frames when changing between interlaced and progressive.

http://sourceforge.net/mailarchive/m...msg_id=7642853

Which seems to be fixed now but I haven't tried it.

http://sourceforge.net/mailarchive/m...msg_id=7689779

Meanwhile, there are problems in compiling Mencoder under MinGW.
Guess I'll have to do it in Cygwin, I've heard it's fine.

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

Could you do it yourself? You have Cygwin installed and all that

EDIT: My last one was http://clientes.netvisao.pt/bilu/bru...r20040310a.zip

You can use the man2htm2 tool to generate an HTML man page, but you'll have to open mplayer.1 in a text editor and replace .IPs with .IP first.
This way the settings values will show up in the HTML.


Bilu
Reply With Quote
  #386  
04-03-2004, 07:37 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
WOW

Quote:
BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835reme =2recmp=2
:ildct=1:ilme=1:vstrict=-1:autoaspect=1:vqcomp=1:scplx_mask=0.3
:vbitrate=300:vrc_minrate=300:vrc_maxrate=9800:vqb lur=0:vqmin=1:mbqmin=1:lmin=1
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,29,34,37,38,
22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,27 ,29,34,37,38,40,48,58,29,34,37,
38,40,48,58,69,34,37,38,40,48,58,69,79:inter_matri x=16,18,20,22,24,26,28,30,18,20,
22,24,26,28,30,32,20,22,24,26,28,30,32,34,22,24,26 ,30,32,32,34,36,24,26,28,32,34,
34,36,38,26,28,30,32,34,36,38,40,28,30,32,34,36,38 ,42,42,30,32,34,36,38,40,42,44
Can you spell "lower bitrates without blocks even on anime or underwater scenes"?

Very good quality, please have a try.
If you find it blurred just lower scplx_mask, but to me it looks very good. lmin=1 made all the difference, probably I can even try high scplx_mask values.


Bilu
Reply With Quote
  #387  
04-03-2004, 10:31 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
Well bilu, what can I say, you're the best when you start thinking in a way to do things better.

I already answered you some things in the other thread. I said there that didn't think it was the way to use lmin bigger than vqmin (from man_page and from previous tests). It helped me a lot to use vqmin=2:lmin=1 (or 1.5), but of course Q never gets under 2 this way, but keeps close and raise when needed. I see you changed to vqmin=lmin=1. I think taht makes more sense.

I tried several times your vbitrate=vrc_minrate=300 way, but I'll have to redo tests. I remember I dropped it but don't remmeber why, I think it was that I got blocks, where didn't appear with vbitrate=vrc_maxrate=9800.

Anyway, you try this way to get a lower average bitrate, but I think, what for?. To lower file size?. Why don't we then use vrc_minrate=300:vrc_maxrate=98000:vbitrate=3000 (or 5000, or whatever needed)?.
And I found a way to adjust finalsize, playing with scplx_mask value (between 0.199 and 0.299).

I'll also try with minquantizers at 1, but I just did 1 test and filesize grew too much. Maybe with minquantizers at 1 we can use higher scplx_mask values, but at 2 I didn't like the blur effect of scplx greater than 0.3

Did you try vratetol?, I'm going to test now.
Reply With Quote
  #388  
04-03-2004, 10:56 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
YOur "No blocks on underwaterscenes" do maybe come from VQmin=1 ... do you remeber when Digi.Doc gave me the caution that its not recommended.

This morning I encoded anamorph 704x576 the Movie "K19" where several underwaterscenes do happen. As I also use Vqmin=1 therefore NO blocks etc.

If you do a comparison in Bitrateviewer between Vqmin=2 and VQmin=1 you can see that this min=1 setting does give a real advantage on low bitratescenes drops as the Q curve also drops down to apprx. 1.5 which means less quantisation on dark scenes but beside this the endfilesize doesn't grow up.
That makes compressing more efficient as you see.

(Right now Im working on a new Matrix especially (as Notch) for TV purposes and which does Cut frequencies extremely on parts you wont notice on Tv but less frequent parts wont be quantized much = even less possibility of blocks on these mentioned dark scenes.)
Reply With Quote
  #389  
04-03-2004, 07:08 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 incredible
(Right now Im working on a new Matrix especially (as Notch) for TV purposes and which does Cut frequencies extremely on parts you wont notice on Tv but less frequent parts wont be quantized much = even less possibility of blocks on these mentioned dark scenes.)
And digitall.doc calls me an expert

Bilu
Reply With Quote
  #390  
04-03-2004, 07:16 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 digitall.doc
I tried several times your vbitrate=vrc_minrate=300 way, but I'll have to redo tests. I remember I dropped it but don't remmeber why, I think it was that I got blocks, where didn't appear with vbitrate=vrc_maxrate=9800.
I may be wrong here since the ratecontrol gets more agressive as the stream gets larger, and I've only tested small samples.

Better play it safe and set vbitrate to whatever you expect.
And then maybe naq will help you achieve filesize predictability too.
Although it raises bitrate like hell

vratetol is really just filesize tolerance, think of it as a more agressive ratecontrol when using smaller values, but still more effective on large streams, never less than 30 minutes.

About scplx_mask settings, I can go up to 0.4 even on anime, 0.5 is too much.


Bilu
Reply With Quote
  #391  
04-03-2004, 07:28 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
Hi Bilu,

Download this, and tell me if it works.
I compiled it with Mingw, and it's from the latest CVS sources: http://www.kvcd.net/mencoder.exe
It's only the executable file, so save yours, and then copy this one in place.

Let me know if it works
-kwag
Reply With Quote
  #392  
04-03-2004, 07:43 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
It crashes the same way, and it was very small.
You need to use --enable-static to compile with libavcodec built in.

I had tried just this morning. Can you do it with Cygwin instead of MinGW?


Bilu
Reply With Quote
  #393  
04-03-2004, 07:46 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 bilu
It crashes the same way, and it was very small.
It's small because it's a compressed executable
Quote:
You need to use --enable-static to compile with libavcodec built in.
It's in there.
Quote:

I had tried just this morning. Can you do it with Cygwin instead of MinGW?


Bilu
I'll try to see why it crashes. I think it's related to some file/path missing issue.

-kwag
Reply With Quote
  #394  
04-03-2004, 07:57 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
My last settings:
Quote:
BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835reme =2
recmp=2:ildct=1:ilme=1:vstrict=-1:autoaspect=1:vrc_minrate=300
:vrc_maxrate=9800:vqblur=0:vqmin=1:mbqmin=1:lmin=1
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,
29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39 ,38,40,48,27,29,34,
37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40 ,48,58,69,79
:inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24, 26,28,30,32,20,22,24,
26,28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32 ,34,34,36,38,26,28,30,
32,34,36,38,40,28,30,32,34,36,38,42,42,30,32,34,36 ,38,40,42,44
:vbitrate=3000:vqcomp=1:scplx_mask=0.4
The bold settings may vary.
scplx_mask=0.4 is fine by me if using lmin=1, but you may need to lower it to fit your taste.
vbitrate and vqcomp=1 need to be tested on streams with 30 minutes at least, and I have only a PIII-500

I got the feeling that the default vqcomp=0.5 or even vqcomp=0 may be needed to fit a certain filesize. vratetol is just filesize tolerance, not that relevant.


Bilu
Reply With Quote
  #395  
04-03-2004, 10:31 PM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Changed again

Underwater scenes and clean anime are really good for testing parameters. You can test both low and high frequencies.

I've been fighting with the lmin and scplx_mask parameters.
Without scplx_mask I could go as far as lmin=5 with anime with better quality than the one provided by scplx_mask=0.25:lmin=2 .
But in underwater scenes lmin=5 completely screws up.

Best generic values I found so far:
vqmin=2:mbqmin=2:lmin=2.2:scplx_mask=0.15

If you want to test lmin better (you may need to lower it to fit your taste) do it without using scplx_mask.


Bilu
Reply With Quote
  #396  
04-04-2004, 05:45 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
To let you have an idea about how lmin=5 and no scplx_mask is good for anime (clean anime with little gradients):

lmin=2.2:scplx_mask=0.15
37547 KB
avg 3669/5.06
peak 9758/8.60

lmin=5
30662 KB
avg 2989/4.99
peak 9517/6.01

Quality is quite good with lmin=5 except the gradient parts (if they exist) that look agressively quantized. The overall stream looks cleaner, not blocky. And looks much better than using scplx_mask settings as we've tried before.

Again, lmin=5 should be used just for anime.


Bilu
Reply With Quote
  #397  
04-04-2004, 07:38 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Last settings, mostly tested with underwater scenes but also with anime:

Quote:
BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835reme =2recmp=2:ildct=1
:ilme=1:vstrict=-1:autoaspect=1:vrc_minrate=300:vrc_maxrate=9800:vq blur=0
:intra_matrix=8,9,12,22,26,27,29,34,9,10,14,26,27, 29,34,37,12,14,18,27,29,34,
37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40 ,48,27,29,34,37,38,40,48,
58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79 :inter_matrix=16,18,20,22,
24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,26,28 ,30,32,34,22,24,26,30,32,
32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,34,36 ,38,40,28,30,32,34,36,38,
42,42,30,32,34,36,38,40,42,44
:vbitrate=3000:vqcomp=1:vqmin=1:mbqmin=1:lmin=2.49 :scplx_mask=0.24
lmin=2.49 was the highest value the underwater scene could handle decently. Using vqmin=1:mbqmin=1 it even got better without growing in filesize.

EDIT: There's residual ringing sometimes, even on monitor it's almost unnoticeable most of the time. I don't think it's noticeable on TV at all, it's pretty acceptable IMHO. If you want to increase quality decrease scplx_mask. IMHO you don't need to mess with the lmin=2.49 value.

Bilu
Reply With Quote
  #398  
04-04-2004, 07:52 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Guess what: tested the new settings on the same anime where I tested lmin=5 before. Got the same filesize and better gradients

30386KB
avg 2963/4.66
peak 8780/6.34

So I guess that if this isn't final, it's very close


Bilu
Reply With Quote
  #399  
04-04-2004, 08:06 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
Bilu, could you try this matrix on your encoding and do a comparison of Filesize/Quality.

Its a very simple linear one, but the result would be interesting (cause Im in a hurry and out of home now).

intra_matrix=8,13,18,23,28,33,38,43,13,18,23,28,33 ,38,43,48,18,23,28,33,38,43,48,53,
23,28,33,38,43,48,53,58,28,33,38,43,48,53,58,63,33 ,38,43,48,53,58,63,68,
38,43,48,53,58,63,68,73,43,48,53,58,63,68,73,79

inter_matrix=16,18,20,22,24,26,28,30,18,20,22,24,2 6,28,30,32,20,22,24,26,28,30,32,34,
22,24,26,28,30,32,34,36,24,26,28,30,32,34,36,38,26 ,28,30,32,34,36,38,40,
28,30,32,34,36,38,40,42,30,32,34,36,38,40,42,44
Reply With Quote
  #400  
04-04-2004, 08:26 AM
bilu bilu is offline
Free Member
 
Join Date: Jan 2004
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Going to lunch now, will try your matrix as soon as possible

Bilu
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG: Ffvfw VIDEO CODEC kwag Video Encoding and Conversion 364 08-12-2005 07:49 AM
FFMPEG: Curious about H.263 in ffvfw poerschr Video Encoding and Conversion 14 02-25-2004 07:54 PM
FFMPEG: Observation about ffvfw poerschr Video Encoding and Conversion 28 02-24-2004 05:50 PM
FFMPEG: Do ffvfw and mencoder/ffmpeg give the same results? Razorblade2000 Video Encoding and Conversion 4 02-06-2004 04:23 PM
FFMPEG: XMPEG 5.03 and ffvfw kwag Video Encoding and Conversion 2 02-05-2004 10:57 AM




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