Quantcast Mencoder: Move the Noise Parameter to the Beginning of Your Script! - Page 3 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #41  
06-02-2004, 01:20 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
I don't think that's too hard to understand, as you can clearly see it on the last screenshots I posted
But it seems hard for you to understand that the FIRST crop should cut ONLY the film area and nothing more.

You are doing : scale / crop1 / filter /crop2 / expand
I say it far better to do scale / crop2 / filters / expand. Period

This way your first picture would have been in fact exactly like the second one :banghead:

(note : may be the second line need differents crop parameters than the ones in crop2, I don't have the time to think about maths, I just dealing with ideas )

Quote:
If you don't add the final crop, you will have noise outside the true film pixel area, causing a loss of final quality, because of additional noise being encoded outside the real movie area.
And if you have nothing outside the real movie area after the FIRST crop, where do you think the noise will go ?

Quote:
I think a screenshot is worth a thousand words, and that's why I posted them.
I think that you should look a little longer your first screenshot and you will probably finish to understand that is the borders where you find that noise wasn't there, the noise wouldn't been there either.

Quote:
I also re-created the problem, by encoding with and without the final crop, and verifying that indeed, it's superior quality with the final crop, and the final aspect ratio is also identical.
What's wrong with that
THE PROBLEM IS NOT IN THE SECOND CROP BUT IN THE FIRST ONE !

Quote:
At least for my last two test encodes, there was ZERO difference in speed with or without the final "crop".
You see ? final crop... final crop... final crop....
You are looking somewhere taht is not where the problem is
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
  #42  
06-02-2004, 01:59 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 Dialhot
But it seems hard for you to understand that the FIRST crop should cut ONLY the film area and nothing more.
Yes it should, but is seems that you DON"T understand, THAT IT DOESN'T WORK, and you will still get noise
OUTSIDE the film pixel area
Quote:

You are doing : scale / crop1 / filter /crop2 / expand
I say it far better to do scale / crop2 / filters / expand. Period
I know that
But as I've said before,
IT DOESN'T REMOVE THE NOISE FROM THE BLACK BARS
Quote:

:banghead:
Do that a little longer, maybe you'll understand my point

-kwag
Reply With Quote
  #43  
06-02-2004, 02:17 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
But as I've said before,
IT DOESN'T REMOVE THE NOISE FROM THE BLACK BARS
Explain me how the noise can be on these bars as THEY DON'T EXIST WHEN YOU PUT THE NOISE
With my way you creates the bars AFTER you had put the noise !

In short : try this line and post the screenshot of the result please :

Code:
vf=yuvcsp,pullup,softskip,scale=720:360::0:9,crop=672:270:24:0,noise=99th,unsharp=l3x3:0.6,hqdn3d=3:6:2,unsharp=l3x3:-0.7:c3x3:-1.5,expand=704:480
You cropped to 360 then filtered, then crop to 270 (and final expand); I crop to 270 directly (before to filter, and finally to expand).

You still had borders after the first crop then you added noise (that for sure goes on these borders also); I remove ALL the borders and put noise so there can't have any noise on the borders.

note : as I said, you will perhaps cut some picture (or screw the A/R) with the crop value I give here because I didn't take the time to redo the calc. I just take the values of the two crop you have in your second screenshot and "mix" them to do that line. But the idea is still the same.

edit: finally I cancel this note. I'm sure of the result. You won't screw anything and will have exactly the same result that you have in your second screenshot

I won't add any words before to see the screenshot (try to take the same frame please). Thanks.
Reply With Quote
  #44  
06-02-2004, 02:17 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi guys,
If you keep on posting like this I'll have to forget this thread or else I'll kill myself laughing
But on the other hand, and now a bit more seriously, this is very interesting arguments used by karl and phil...
Second thought: keep on with it as I may, as usually, learn something here
Cheers
__________________
Rui
Reply With Quote
  #45  
06-02-2004, 02:36 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
But on the other hand, and now a bit more seriously, this is very interesting arguments used by karl and phil...
Be carefull : by telling that you are saying that you don't see how and why Karl is wrong. After he will post the screenshot I will claim for both of you to kiss my feet.
Reply With Quote
  #46  
06-02-2004, 02:39 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Quote:
Originally Posted by Dialhot
But it seems hard for you to understand that the FIRST crop should cut ONLY the film area and nothing more.
Yes it should, but is seems that you DON"T understand, THAT IT DOESN'T WORK, and you will still get noise
OUTSIDE the film pixel area
-kwag
I ask, if "first crop" cut only the film area (no more black borders in the frame), and black borders only came back with expand (last related option), how can noise be present outside the film pixel area?



--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Reply With Quote
  #47  
06-02-2004, 02:43 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
I ask, if "first crop" cut only the film area (no more black borders in the frame), and black borders only came back with expand (last related option), how can noise be present outside the film pixel area?
YYYYYYYYYYYYYEEEEEEEEESSSSSSSSSSSSSSSSS !!

Pro, I love you
Reply With Quote
  #48  
06-02-2004, 02:49 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
YYYYYYYYYYYYYEEEEEEEEESSSSSSSSSSSSSSSSS !!
Pro, I love you
Excuse me for a while, I'm just going to wash my feet.
Reply With Quote
  #49  
06-02-2004, 04:48 PM
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 Phil
But it seems hard for you to understand that the FIRST crop should cut ONLY the film area and nothing more.

You are doing : scale / crop1 / filter /crop2 / expand
I say it far better to do scale / crop2 / filters / expand. Period
Now the subject changed , you quoted a line which compensates the cropping of the black borders wich are still left by that --- and that will be compensated already in the FIRST cropping ...

Code:
vf=yuvcsp,pullup,softskip,scale=720:360::0:9,crop=672:270:24:0,noise=99th,expand=704:480
Your line (where by the way still FIRST SCALING is used .... does mix 2 approaches .. a) the first scale and then crop approach, ... wich is totally ok and does NOT base to our problem with the black bars ... and b) then a cropping which gets rid of the leaved black bars after scaling.

Now Karl and I did many test and a diseaster came out! (Thats why Karl stuck on the alternative using a second crop!) Means the final active movie image was totally put wrong on the whole screen.
I tried and tried and found it! Theres still a 0 at y which has to be 45!! Thats all ... but you told that it was written down fast by you, so no problem!

And thats the right one:
Code:
vf=yuvcsp,pullup,softskip,scale=720:360::0:9,crop=672:270:24:45,noise=99th,expand=704:480
Reply With Quote
  #50  
06-02-2004, 04:53 PM
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 Prodater64
I ask, if "first crop" cut only the film area (no more black borders in the frame), and black borders only came back with expand (last related option), how can noise be present outside the film pixel area?
Do watch my explanation that if correct values are taken at sclaing (as mencalc does) the SAME result comes out BEFORE expanding.
Quality is the same, AR is the same, PAR is the same, SPEED is the same.

EDIT!!: I do see now what you mean with "first crop" .. as you dont mean crop "has to be first" right??


And I do think in here the thread is TOTALL mixed up
As we first where talking about the first crop or first scale issue ... which waas explained above that theres no difference, ... and then it changed to the "second" crop command to get rid of borders left.



I do see it right now -- call it a conclusion:

- No problem if first scaled (explane the page before)
- BUT the needed cropping to the active pixel area can be done already in the first cropping - like Phil showed - but the using -1,-1 to "center" the cropping ... which avaids a bug in mencoder (if its a bug)

Reply With Quote
  #51  
06-02-2004, 04:59 PM
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 kwag
Quote:
Originally Posted by incredible
But ... I do now have other things in "ToDo" wich are more importend to solve than cosmetics related to a commandline which wouldnt give a final difference
But there IS a final quality difference
By saying that in the post you quoted I meant .... I will integrate a cropping of the "useless original" balck borders ... shuuure!
But I wont change the scale/crop to crop/scale as its the same in the way mencalc does as the result is totally the same.

So now its only up on to already set the first cropper to a state that in the first cropping ALREADY the useless black original borders will be deleted so that the forthcoming filters will only perform on the active movie pixels.

Thats why in the next version of Mencalc (and packshot) there will be 2 chackboxes available (x 2.35:1 and x 1.85:1) and a Y-Axis active movie area input field where manually the active pic area can be set... means individual black borders sizes can be deleted.
Reply With Quote
  #52  
06-02-2004, 05:07 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Hi guys!
I've been away for a few days (I've finally got a new job!) and come back to find this thread... My head is spinning . But it's good with new ideas even if we don't always agree with one another, right ?
__________________
AudioSlave
Reply With Quote
  #53  
06-02-2004, 05:17 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
YOU still dont understand that a first scale using right scaling vaules and a crop afterwards results in the same final IMAGE!
Where do you read I not agree with that ? Since I understood that Kwag was referencing a line from mencoder, I admit that there was a misunderstood. So what is your point in restarting from the begining of the thread ?

Quote:
And that was your first point of view that this (mine, Kwags) is a wrong approach - and thats not true!
Again I'll already admit that. As you said that WAS my first point of view.

Quote:
BUT!!! Now the subject changed, you quoted a line which compensates the cropping of the black borders wich are still left by that --- and that will be compensated already in the FIRST cropping ...
Yeap.
And here Kwag started to say that I'm wrong and this method will result in noise in the borders. And THAT IS ABSOLUTLY WRONG !

Quote:
Your line (where by the way still FIRST SCALING is used
... that prooves that I admited yet that your way is acceptable and then I restarted my argumentation from there.

Was I suppposed to split the threads just because I did the "big mistake" to start from a bad point of view ?

Quote:
and b) then a cropping which gets rid of the leaved black bars after scaling.
I'm not sure if you are doing this resume for you or me but I already knew all what you are saying

Quote:
and a diseaster came out! Means the final image was totally put wrong on the whole screen.
I tried and tried and found it! A mencoder bug! Where even if scaled before .. the x y (the two last params of crop) do STILL refer on the ORIG moviesize
For sure I didn't expect that. So you are saying that I was COMPLETLY right from the begining without even knowing it ?

Quote:
And thats the solution: Putting -1 and -1 as last params at crop
In fact, since I know that, I always use -1, -1 and that is why I did not fail/fall on this bug myself.

Because I wanted to say that while you were testing, I wasn't doing scuba diving ! I did tests on my own of course

Quote:
And thats the right one:
Code:
vf=yuvcsp,pullup,softskip,scale=720:360::0:9,crop=672:270:24:45,noise=99th,expand=704:480
I think you wanted to say : "crop 672:270:-1:-1"
Reply With Quote
  #54  
06-02-2004, 05:25 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@Dialhot
Would you be so kind to post your *.bat file? Please...? I want to try it but it was awhile since I used MEncoder with command lines, and I don't remember how... .
__________________
AudioSlave
Reply With Quote
  #55  
06-02-2004, 05:28 PM
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 Dialhot
Quote:
Originally Posted by incredible
YOU still dont understand that a first scale using right scaling vaules and a crop afterwards results in the same final IMAGE!
Where do you read I not agree with that ? Since I understood that Kwag was referencing a line from mencoder, I admit that there was a misunderstood. So what is your point in restarting from the begining of the thread ?
I do apologize and I already changed my answer above .. as I still "did read" that you first want to crop but you where already talking about crop1 and crop2 after scaling
To many ping pong postings today.

Quote:
For sure I didn't expect that. So you are saying that I was COMPLETLY right from the begining without even knowing it ?
Come down my friend! The line you posted above where you suggested to mix crop 1 and two is the one I totally agree with
At the beginning of this thread there where also nice discussions on another subject, remember?? :P

Quote:
In fact, since I know that, I always use -1, -1 and that is why I did not fail/fall on this bug myself.
I edited my post above! As there was the "y" value just set wrong by 0 that was all!
A "x y" determination would be essential!! As if not we ONLY could crop centered in the Yaxis and some DVDs/Captures got a NON centered active Movie area


You agree?
Reply With Quote
  #56  
06-02-2004, 05:29 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audioslave
@Dialhot
Would you be so kind to post your *.bat file? Please...? I want to try it but it was awhile since I used MEncoder with command lines, and I don't remember how... .
I just took a process.bat from mencoder where I performed all the suggestion I gave here (I'm not just doing theory, I do aplly it myself )

Code:
"mencoder.exe" -of rawvideo -sws 10 -nosound -vf yuvcsp,pp=hb:100:100/vb,crop=564:304:-1:-1,hqdn3d=10:12:8,noise=3th,scale=528:336::0:9,expand=544:480 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_eq=tex:vmax_b_frames=2:preme=2:precmp=2:vstrict=-1:scplx_mask=0.3:vqblur=0:mbqmin=1:vqmin=1:lmin=0.3:vpass=1:vrc_buf_size=1835:vbitrate=1800:vrc_maxrate=3000:aspect=1.3333:autoaspect=1:keyint=15:
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 -ofps 23.976 "D:\Mes KVCD\movie.avi" -o "D:\Mes KVCD\movie.m2v"

"mencoder.exe" -of rawvideo -sws 10 -nosound -vf yuvcsp,pp=hb:100:100/vb,crop=564:304:-1:-1,hqdn3d=10:12:8,noise=3th,scale=528:336::0:9,expand=544:480 -ovc lavc -lavcopts vcodec=mpeg2video:vrc_eq=tex:vmax_b_frames=2:preme=2:precmp=2:vstrict=-1:scplx_mask=0.3:vqblur=0:mbqmin=1:vqmin=1:lmin=0.3:vpass=2:vrc_buf_size=1835:vbitrate=1800:vrc_maxrate=3000:aspect=1.3333:autoaspect=1:keyint=15:
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 -ofps 23.976 "D:\Mes KVCD\movie.avi" -o "D:\Mes KVCD\movie.m2v"
Reply With Quote
  #57  
06-02-2004, 05:34 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
I'm not just doing theory, I do aplly it myself
That was not what I meant . I just want to try your *.bat, that's all. Thanks!

BTW I can use this file with the latest CVS builds posted by incredible, right?

EDIT: This is a 2 pass *bat, or am I wrong?
__________________
AudioSlave
Reply With Quote
  #58  
06-02-2004, 05:35 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
You agree?
That is really rare but I admit that sometimes I have 70/74 pixels insteed of 72/72. And I have to say also that Moviestacker didn't quope with that correcly
Reply With Quote
  #59  
06-02-2004, 05:35 PM
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
Phil ... you did put the noise BEFORE scaling = Risky -- a scaling of the noise??!
Reply With Quote
  #60  
06-02-2004, 05:36 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audioslave
BTW I can use this file with the latest CVS builds posted by incredible, right?
I don't know, this release does not work on my PC .

Quote:
Originally Posted by incredible
Phil ... you did put the noise BEFORE scaling = Risky -- a scaling of the noise??!
You are absolutly right . I was on the edge to start tonight encoding : I will change that immediatly
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Anti-Noise Script? Shibblet Avisynth Scripting 2 12-19-2004 06:46 PM
Mencoder: Pseudo MIN bitrate with noise? kwag Video Encoding and Conversion 40 05-15-2004 09:54 AM
Mencoder: Optimal Script with mencoder filters vmesquita Video Encoding and Conversion 38 04-14-2004 09:55 AM
Avisynth: Additional Noise Reduction for Optimal Script Jellygoose Avisynth Scripting 4 10-21-2003 06:43 PM
Avisynth: noise reduction, lot of mosquito noise? yauman Avisynth Scripting 8 02-02-2003 02:41 PM




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