Quantcast Mimicking Motion Adaptiveness Blur with Mencoder. - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
06-03-2004, 08:43 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
@All,

This is still experimental, but here's the first version, which I've been playing for the last couple of hours, and it seems to be doing it's job
The functions used are shape adaptive blur

Here's your filter line, suitable for DVD encodings:

hqdn3d,sab=0.5:0.5:1,noise=3th

Note:
That's line goes AFTER your scaling and cropping commands, and BEFORE the final expand command.

When I finish optimizing the values, I'll post it on the optimal script section, just like the MA script posts.
In the mean time, have fun, and post your comments here

Questions
RTFM
http://www.mplayerhq.hu/DOCS/man/en/manpage.html#GENERAL%20ENCODING%20OPTIONS%20(MENCO DER%20ONLY)


-kwag
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
  #2  
06-04-2004, 06:13 AM
maurus maurus is offline
Free Member
 
Join Date: Oct 2003
Location: Madrid
Posts: 387
Thanks: 0
Thanked 0 Times in 0 Posts
We remove also the current two unsharp filters?

-Maurus
Reply With Quote
  #3  
06-04-2004, 06:27 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You do noise on Chroma also ? Won't this be noticiable ?
Eye is far more sensitive to noise in chroma than in luma.
Reply With Quote
  #4  
06-04-2004, 09:27 AM
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
@Maurus,

It's already been taken care of, by the shape adaptive blur and the smart blur.
It basically does the same as unsharp, but more efficiently, because shape adaptive blur is not static, but dynamic (adaptive).

@Phil,
Yes, but the noise level is so low that it can barely be seen by the eye. But the noise on the luma+chroma channels gave me a more flat Q curve, that when applying luma noise only.
Do a small sample, and check it with Bitrate Viewer. You should see a more flat qreen line.

-kwag
Reply With Quote
  #5  
06-04-2004, 12:21 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
Do a small sample, and check it with Bitrate Viewer. You should see a more flat qreen line.
Does that mean also a higher Q on dark parts where these parts "before" ading the chroma-noise ended up in lower Q. As this would be risky on underwater parts.

If not that would mean the average of the Q is rised a minimal bit (just IMHO!).

So a flat Q curve is not the factor on which we should end up, more Q dynamic means less bitrate chaotic-dynamics as the encoder gots room to breath in its quantisation which "would" calm the Bitrate dynamic a little IMHO
Reply With Quote
  #6  
06-04-2004, 01:10 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
@Inc,

Yes indeed, the bitrate is more balanced and distributed.

@All,

I've been doing some serious reading and parameter optimizing, and here's my latest stuff (not final yet!, and probably never will ).

Following are two samples, one 704x480 at an average bitrate of 698Kbps, and another sample, also 704x480 but target average bitrate of ~6,000Kbps, which in reality came out to 1,437Kbps, because quality factor was fulfilled by the encoder, and no need to go higher in bitrate. Both are from the same "Red Planet" test clip, for consistency. Average bitrate measured with Vdub, because average given by Bitrate Viewer is always incorrect (gives lower values).

672Kbps (Real 698Kbps) average bitrate graph:


Sample here:
http://s2.yousendit.com/d.aspx?id=BF...A956C60D831C05



1,340Kbps (Real 1,437Kbps) average bitrate graph:


Sample here:
http://s2.yousendit.com/d.aspx?id=47...C50CDBB2CA6261

And here are the settings used for the samples:

Code:
hqdn3d=2:2:2,sab=1:1:8,smartblur=.5:.5:20,noise=3th:3th
And the common encoding parameters:
Code:
lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=9800:aspect=1.3333:keyint=18:vrc_buf_size=1835:preme=2:precmp=2:autoaspect=1:vrc_eq=tex:scplx_mask=0.01:vqmin=2:mbqmin=1:lmin=0.01
Both samples were encoded using a set MAX bitrate limit of 9,800Kbps.
The small sample had set 700Kbps as vbitrate and the large sample had 6,000Kbps set as vbitrate.
For obvious reasons, filtering, the peak bitrates can't reach higher values, because the material is being blured on motion areas, in a similar way like the MA script. Actually the blur is on objects, so it's not on the complete picture, which is really what we want.
But the results I got with these values, could be the bitrate normalization that we are all looking for

-kwag
Reply With Quote
  #7  
06-04-2004, 01: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
@Kwag: Are these parameters for DVDs sources, AVIs sources or both?


--------------------------
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
  #8  
06-04-2004, 02:05 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
Kwag, why did you set Vqmin=2???
Ok, the manual says dont go under but as we figured out a vqmin=2 would result in blocks on dark underwater scenes for instance as the quantizer wont go under the q=2 limit (vqmin) on these scenes and mencoder on these scenes at q=2 produces blocks!

Try one at vqmin=1 (for shure) and lmin=0.1 (play with lmin) and tell me your results


EDIT:
Yep as I did assume, i saw the 670kbit one and it gots a lot of blocks especially in dark areas thats cause of an average Q of 5!!

The high avg sample still gots blocks on dark scenes as you set vqmin=2 and cause of the "flat" q curve.

The high one you could encode only using vqscale=2 that would be the same
Reply With Quote
  #9  
06-04-2004, 02:33 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 Prodater64
@Kwag: Are these parameters for DVDs sources, AVIs sources or both?
From the first post: "Here's your filter line, suitable for DVD encoding"

-kwag
Reply With Quote
  #10  
06-04-2004, 02:52 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 incredible
Kwag, why did you set Vqmin=2???
It happens when a finger hits the incorrect key
Thanks for pointing it out. It should be 1, not 2.
All other parameters are correct. I just verified them.

-kwag
Reply With Quote
  #11  
06-04-2004, 03:14 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
Much better
This is from another encode (The first 3 minutes of "Space Cowboys" )

Reply With Quote
  #12  
06-04-2004, 04:33 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
----
A link is valid for 7 days or 25 downloads, whichever occurs first.
Once the link expires, the file is automatically deleted and cannot
be recovered
----

That is what I just downloaded from the link above. Now we have the answer to "how much time a link can be DLed".
Reply With Quote
  #13  
06-04-2004, 04:45 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
It would be great if everyone that downloads it, automatically puts it on the E-Mule "Incomming" folder. That way, we automatically start sharing sample files
W can use the site 'yousendit.com" as initial distribution, and then all (most?) people that download it, share it

-kwag
Reply With Quote
  #14  
06-04-2004, 04:56 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
It would be great if ytou can check in you waiting queue and set me as a friend. You sent me only 138KB before dropping me of your DL queue
Reply With Quote
  #15  
06-04-2004, 06:03 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
It would be great if everyone that downloads it, automatically puts it on the E-Mule "Incomming" folder. That way, we automatically start sharing sample files
W can use the site 'yousendit.com" as initial distribution, and then all (most?) people that download it, share it

-kwag
I like that idea. I'm downloading just now.


--------------------------
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
  #16  
06-04-2004, 10:46 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag
This is great! I was wondering if you could post your complete command line, please? Your 2 pass *.bat with this new MA routine...

BTW How much do the 2 methods of encoding (With MA/No MA) differ in time? In other words: Is the line with the MA mimicking much slower?
__________________
AudioSlave
Reply With Quote
  #17  
06-05-2004, 12:40 AM
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 audioslave
@kwag
This is great! I was wondering if you could post your complete command line, please? Your 2 pass *.bat with this new MA routine...
Hi audioslave,

Just put the filter line I posted above, between the crop, scale and expand.
My resizing values won't make sense to you, because they are different for every movie. Use PackShot or MencodeME to get your initial configuration file, and then edit the file with the parameters I posted above. All samples were 2-pass.
Quote:

BTW How much do the 2 methods of encoding (With MA/No MA) differ in time?
It's much slower with the adaptive filters, just as it is with the MA script.
Quote:
In other words: Is the line with the MA mimicking much slower?
Yes it is. By about half

-kwag
Reply With Quote
  #18  
06-05-2004, 02:57 AM
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
Yes it is. By about half
If you want an other option that will divide the speed again by 2, use -mbd=2

I'm curious about the result on the bitrate but I don't have the time to test it (btw if someone can share a source sample he use for its test, I can't find any that gives me enought underflowbuffer to do some research on how tp avoid them).
Reply With Quote
  #19  
06-06-2004, 06:17 AM
Koekies Koekies is offline
Free Member
 
Join Date: May 2004
Location: Amsterdam
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
I just encoded a movie with the mencoder pre alpha build and your filter the quality is great the bitrate is just way to low :S and the noise=3th didn't seem to work. And I made a couple of mistakes it turned into a 720x480 movie and I don't know why can anybody tell me what I've done wrong.
Thanks in advance

batfile
Code:
Mencoder.exe -include temp.conf -lavcopts vbitrate=796:vpass=1 "C:\CI3\VIDEO_TS\VTS_01_1.VOB" -o "C:\CI3\VIDEO_TS\VTS_01_1.m2v"
Mencoder.exe -include temp.conf -lavcopts vbitrate=796:vpass=2 "C:\CI3\VIDEO_TS\VTS_01_1.VOB" -o "C:\CI3\VIDEO_TS\VTS_01_1.m2v"
pulldown.exe "C:\CI3\VIDEO_TS\VTS_01_1.m2v" "C:\CI3\VIDEO_TS\film.m2v" -framerate 23.976 -prog_seq p prog_frames -drop_frame true
conf file
Code:
vf=kerndeint=15:0:1yuvcsp,pullup,softskip,scale=720:480::0:9,crop=672:378:24:16,hqdn3d=2:2:2,sab=1:1:8,smartblur=.5:.5:20,noise=3th:3th,expand=704:480 
of=rawvideo=1 
ovc=lavc=1 
nosound=1 
sws=9 

lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=2200:aspect=1.3333:keyint=18:vrc_buf_size=1835:preme=2:precmp=2:autoaspect=1:vrc_eq=tex:scplx_mask=0.01:vqmin=1:mbqmin=1:lmin=0.01: 
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
Oke nevermind the bitrate that was my mistake but can anybody tell me why its 720x480?
Reply With Quote
  #20  
06-06-2004, 06:35 AM
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 Koekies
...
conf file
Code:
vf=kerndeint=15:0:1yuvcsp,pullup,softskip,scale=720:480::0:9,crop=672:378:24:16,hqdn3d=2:2:2,sab=1:1:8,smartblur=.5:.5:20,noise=3th:3th,expand=704:480 
of=rawvideo=1 
ovc=lavc=1 
nosound=1 
sws=9 

lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=2200:aspect=1.3333:keyint=18:vrc_buf_size=1835:preme=2:precmp=2:autoaspect=1:vrc_eq=tex:scplx_mask=0.01:vqmin=1:mbqmin=1:lmin=0.01: 
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
Oke nevermind the bitrate that was my mistake but can anybody tell me why its 720x480?
Hi:
Maybe
Quote:
vf=kerndeint=15:0:1,yuvcsp,...

--------------------------
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
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
blur between scene changes is really noticeable? bigggt Video Encoding and Conversion 5 02-08-2004 06:09 PM
Avisynth: More Blur On Action Scenes! Jellygoose Avisynth Scripting 3 10-25-2003 12:08 PM
Avisynth: I can see the blur on scene changes! audi2honda Avisynth Scripting 11 07-08-2003 09:46 PM
KDVD has Motion blur? grc Video Encoding and Conversion 8 06-05-2003 08:06 AM
TMPGEnc: Motion Search Precision - Highest Qual or Motion Est Search MoovyGuy Video Encoding and Conversion 1 08-28-2002 11:00 PM




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