digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder: Buffer underflows (http://www.digitalfaq.com/archives/encode/9690-mencoder-buffer-underflows.html)

Boulder 05-17-2004 05:14 AM

Buffer underflows
 
I've been getting some buffer underflows with my DVD encode tests, avg bitrate 2000-3000kbps. Is there any simple way to get rid of them or do I just have to use CCE for those encodes :lol: ?

incredible 05-17-2004 05:52 AM

Which build of mencoder you are using??
Are you encoding 1pass or 2pass?
As when choosing avg's of i.E. 2000-3000kbps I never had Buffer underruns again! And my Player plays it back with no Probs.
Did you check that on your DVD player?

Problem is you cant set in Mencoder vrc_minrate=xxx, as then the bitrate is broken. Thats a known mencoder issue, .. but as said above I never had Probs without vminrate setted.

Try to add some noise (first tick is the one suggested by Kwag).
But Phil is "a bit" right as he said IF you do encode a 2.35:1 source that noise will also be added to the leaved black border from 2.35:1 to 1.77:1(1.85:1) but that will also happen when using fitcd without determining the effective "movie area" before ;-)

But I did say "a bit right" above as the noise in that amount only gives the encoder information that even at black scenes there does something happen, so the min bitrate at these scenes will be rised and the "noise" will almost be quantized out! .... I did several 2.35 source tests and didnt recognise partial noise on black borders .... but Phil's thought gots its logic, and I should add a "Source 2.35:1 ?" button so other cropping values in such a case would be used so that almost no black borders even at 2.35:1 input will be left. ;-)

So try setting a bit noise where beside that the movie gots a tiny bit more natural look.
Id did came off of "plaining" sources that much when I do enjoy big media sizes like you also do have in this example IF encoding using i.E. using an avg bitrate of 2000-3000kbit.

:)

The only factor which would count for me to still use CCE is IF I want to affect DC precision to 9 or 10 ... ;-)

Boulder 05-17-2004 06:07 AM

I used your latest CVS build (P4 optimized), 2-pass. The first pass doesn't show any underflows, they occur in the second pass.

I solved Phil's problem by cropping, resizing and filtering in the AVS script and then expanding to 704x576 in MEncoder. I've not experimented with the internal filters so I wanted to be rather safe than sorry :lol:

I think the next thing I'll try is raising the max bitrate, maybe that would help.

incredible 05-17-2004 06:16 AM

Quote:

Originally Posted by Boulder
I solved Phil's problem by cropping, resizing and filtering in the AVS script and then expanding to 704x576 in MEncoder. I've not experimented with the internal filters so I wanted to be rather safe than sorry :lol:

I think the next thing I'll try is raising the max bitrate, maybe that would help.

If you want to see "some " filters:
http://www.kvcd.net/forum/viewtopic....10637&start=16

Why do you do your whole postprocessing in avisynth but then expanding in Mencoder?? In that case do the "whole" pprocessing in avisynth and choose "no resize" or ged rid of all image manipulation parameters/commands in your mencoder line.

btw. You did use a Keyinterval of 24! And as you do a high avg bitrate encoding I assume you encode to dvd-r?
Well as I assume you know what u are doing, your SA-Player supports a gop length of 24 in DVD mode?

Boulder 05-17-2004 06:27 AM

Quote:

Originally Posted by incredible

If you want to see "some " filters:
http://www.kvcd.net/forum/viewtopic....10637&start=16

Why do you do your whole postprocessing in avisynth but then expanding in Mencoder?? In that case do the "whole" pprocessing in avisynth and choose "no resize" or ged rid of all image manipulation parameters/commands in your mencoder line.

That's because I wanted to make sure that the min bitrate is around 300kbps so my Pioneer doesn't get hiccups. I also didn't want the noise to be put on the borders and I was unsure which Blockbuster line would be sufficient. As the "noise=3th" has been tested thoroughly, I wanted to use it.

Quote:

btw. You did use a Keyinterval of 24! And as you do a high avg bitrate encoding I assume you encode to dvd-r?
Well as I assume you know what u are doing, your SA-Player supports a gop length of 24 in DVD mode?
Yes, the player has no problems with 24-frame GOPs in DVDs, at least none that I know of8)

kwag 05-17-2004 11:30 AM

Quote:

Originally Posted by Boulder
Yes, the player has no problems with 24-frame GOPs in DVDs, at least none that I know of8)

Hi Boulder,

I stopped using longer GOPs with mencoder, because I get a "smearing" (trailing objects) when using 24.
This seems to be a peculiarity of mencoder.
Using 15 (PAL) or 18 (NTSC) doesn't show these artifacts, and compression is still very high, when using the notch matrix.
So I suggest standard GOPs with mencoder :)

-kwag

Boulder 05-18-2004 04:02 AM

Well, in that case Mencoder's of no use to me as the main reason was the speed of CCE and ability to use 24-frame GOPs combined :cry:

I personally dislike TMPGEnc for DVD encodes since it takes ages to predict and encode. With jonny's QCCE I can encode 2-3 1h TV captures on one day which is not possible with TMPGEnc.

incredible 05-18-2004 05:43 AM

Quote:

was the speed of CCE and ability to use 24-frame GOPs combined
:?: Could you explain me then how you get a framecount of 24 within a GOP setted in CCE? :wink:
CCE allows only a max framecount of 15 (even in NTSC) within a GOP.
Or ... did I miss something recently??? 8O A Trick or a new release of CCE :wink:

According to captures ... as I did promise to DigiDoc ... the next days (if not even I get my resol. claculation engine ready meanwhile) Ill integrate resizing templates which do support the common capture source size inputs:
PAL: 768x576,704x576,352x576,352x288
NTSC: 640x480,352x480,325x240

I already did tests on YUY2 mjpeg input (PicVideo) and for shure mencoder does read them like a charme :D
captures using YV12 Xvid can also be encoded but I strongly advice to Noobs NOT to use that codec if doing capturing:
http://www.kvcd.net/forum/viewtopic.php?t=9380
(not adressed to you but to capture noobs)


My conclusion ... Mecoder (already in 1pass) does - even if a GOP of still 15/18 is used - give a better output than CCE.
And IF you still want to go beyond the std. GOP count ... in case of mencoder that would be only a special Matrix setting ... means less filtering in the non-intra 8x8 dct block.

Boulder 05-18-2004 06:22 AM

Quote:

Originally Posted by incredible
Quote:

was the speed of CCE and ability to use 24-frame GOPs combined
:?: Could you explain me then how you get a framecount of 24 within a GOP setted in CCE? :wink:
CCE allows only a max framecount of 15 (even in NTSC) within a GOP.
Or ... did I miss something recently??? 8O A Trick or a new release of CCE :wink:

What I meant was that the speed of encoding with Mencoder is similar to CCE and the 24-frame GOP from Mencoder (if it worked ok) would be splendid :wink:

I'll have to experiment with Mencoder a bit more before I do any final conclusions. I'll leave that special matrix to Kwag :lol:

Dialhot 05-18-2004 06:54 AM

Just to tell that I did a KDVD tonight (2pass needs 10 hours on my PC - encoding at 7/9 fps).

This morning the 2pass was near 30% and I saw 4 underflow messages on the screen. I don't know if there were some during 1st pass and I can't tell how many there will have before the jobs ends.

My question is : do you think I can securely burn the final video ?

FYI : PAL DVD, Res 704*576, Denoise to 2nd tick, Blockbuster to 1st one, no other option use, AVG=2000, max=4500, min=0.

incredible 05-18-2004 07:50 AM

I the past using Packshot I had only 2 encodings where "still" an underflow error occured, .... but playback was NO Problem on (my) SAP.

kwag 05-18-2004 09:34 AM

Quote:

Originally Posted by Boulder
What I meant was that the speed of encoding with Mencoder is similar to CCE and the 24-frame GOP from Mencoder (if it worked ok) would be splendid :wink:

The quality of mencoder is still superior, even with a GOP of 18 :)

-kwag

Boulder 05-18-2004 09:39 AM

I'm currently testing encoding with MEncoder again (with the same movie), this time with min quantizer=2 to avoid buffer underflows and lmin=1. Now it seems that the encode will end up undersized even though I raised the max bitrate from 5000 to 8000 :x

Guess I'll have to lower the lmin value to 0.5 and see what happens..

incredible 05-18-2004 09:42 AM

The higher you set qmin ... the more quantisized will your movie be in average!
And higher quantization on black parts means even LESS bitrate, so just try maybe vqmin=1:lmin=0.1 (just a test as you work using vey high avg bitrates ... which IMHO you dont even need in mencoder ;-) )

Boulder 05-18-2004 09:52 AM

That's the problem..quant 1 is generally considered A Bad Thing To Do since the quality increase is pretty much negligible compared to quant 2. The filesize just gets a lot bigger.

This also worries me a bit when using vminq=1 (from the docs) : "ratecontrol will be confused resulting in lower quality".

I'll try running the encode with the values you suggested and see what comes out.

digitall.doc 05-18-2004 11:27 AM

Quote:

Originally Posted by Boulder
That's the problem..quant 1 is generally considered A Bad Thing To Do since the quality increase is pretty much negligible compared to quant 2. The filesize just gets a lot bigger.

This also worries me a bit when using vminq=1 (from the docs) : "ratecontrol will be confused resulting in lower quality".

I'll try running the encode with the values you suggested and see what comes out.

I wouldn't worry too much about what man_page says on vqmin=1: we're using this setting in lots of encodings, without a problem. I think it may be a problem in constant quantizer encoding (vqscale=1), but in our encodings, you will see in BitrateViewer tha quantizers don't keep constant in 1 but vary usually around 1.5-2, even higher.

About buffer underflows... I also don't like to see those warnings. But later I don't have a single problem when muxing/authoring/viewing.
Where I did have problems was when minrate too low, in SKVCD. But not with underflows. Anyway, it would be nice to know why it happens, and how to solve them...

Dialhot 05-18-2004 11:47 AM

I'm sorry to interfer with your discussion : just want to say that my first 2pass KDVD is finished and for what I can see it's really nice. A lot better than what I did with CCE without any script used (only Denoiser set to 2 in pack-shot and blockbuster to 1).

I'm much more enthousiast that I was with ffvfw since week ago.

Boulder 05-18-2004 12:15 PM

Phil, no problem :wink:

By the way, Bitrate Viewer shows really funny figures..Q is sometimes negative :lol:

Koekies 05-18-2004 01:48 PM

@kwag is the number of frames in a gop "keyint"? Because I keep getting artifacts :? So should I change that to 18?

-Koekies

Dialhot 05-18-2004 01:50 PM

I think I read Inc tellign that in a post today : yes GOP length = Keyint. And you should reduce it to 18.


All times are GMT -5. The time now is 05:33 PM  —  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.