digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mimicking Motion Adaptiveness blur with Mencoder. (http://www.digitalfaq.com/archives/encode/10063-mimicking-motion-adaptiveness.html)

kwag 06-06-2004 09:02 PM

First post of this thread updated with new parameters.

-kwag

Koekies 06-07-2004 03:44 AM

@bigggt it's human to make mistakes :P I've also had that error a couple of times before :P

Koekies 06-07-2004 03:48 AM

Re: Mimicking Motion Adaptiveness blur with Mencoder.
 
Quote:

Originally Posted by kwag
@All,
.......
Here's your filter line, suitable for DVD encodings:

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

......

Edit:
Changed smart blur to work only on flat areas.


-kwag

So remove the smartblur command you orignally used and change the sab values?

Fluffbutt 06-07-2004 09:46 AM

Quote:

Originally Posted by bigggt
OK i get and did what you said but i still don't get how to run the bat file,i can't just double click it :roll:

What happens when you double click it?

If it opens a dos window and closes it real quick, it means there's an error in the bat file (usually a file name incorrect, or a directory name incorrect, or the bat file is not in the right directory itself).

If nothing hapens at all, try right clicking, and selecting "open" in the menu that pops up.

If it's the first problem, post your bat file here for us to read, and also make sure yourself that it's in the same folder as mencoder, AND the paths in the bat file that refer to your movie input and output are correct.

Dialhot 06-07-2004 10:06 AM

Better way :
Go so "Start" menu of windows. Select "Run..."
There type "cmd".

A DOS windows will popup.

Type "cd path_where_your_bat_is"
Then type the name of the bat.

This way you will have to error message that stays on the screen if there is any problem.

Koekies 06-07-2004 01:03 PM

@Fluffbutt he allready found out what was wrong :P

bigggt 06-07-2004 06:01 PM

thanx guys i did get it going but thanx for all your hints :D

kwag 06-07-2004 09:36 PM

Here's my latest test sample, with the latest settings. Only difference is that I lowered the noise from 3th to 2th. Seems that lower resolutions require lower noise to maintain the same noise floor (min bitrate).
At 352x480, 3th is a little heavy, so I suggest 2th for 352x and 480x, and anything higher, 3th.
This is my first KSVCD test encode with mencoder (same clip, Red Planet), trying 352x480 resolution.
There are no buffer errors at mux time. Clip was "pulled down" for SVCD burning compatibility.
Audio is 44.1Khz.

Sample here:
http://www.kvcd.net/red-planet-ksvcd-352x480.mpg
Average bitrate of 918Kbps, and MAX bitrate set to 2,500Kbps.
Peak is ~2,214Kbps.
Settings used:
vf=yuvcsp,pullup,softskip,crop=720:360:0:58,scale= 336:272,hqdn3d,sab=.5:.5:1,noise=2th,expand=352:48 0

lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=2500:aspect=4/3:keyint=18:vrc_buf_size=917:preme=2:precmp=2:auto aspect=1:vrc_eq=tex:scplx_mask=0.01:vqmin=1:mbqmin =1:lmin=0.01:[Matrix Follows Here....]

-kwag

Dialhot 06-07-2004 10:14 PM

So to tell that there is no setting of avg bitrate in your line but probably an error of cut/paste.

kwag 06-07-2004 11:28 PM

Quote:

Originally Posted by Dialhot
So to tell that there is no setting of avg bitrate in your line but probably an error of cut/paste.

Hi Phil,

I didn't paste the "encode.bat" that I use.
I assume is standard operating procedure ;)

-kwag

Fluffbutt 06-08-2004 12:01 AM

Quote:

Originally Posted by Koekies
@Fluffbutt he allready found out what was wrong :P

:oops: :oops: :oops:

<Fluffbutt was watching a mouse as he typed...>
:oops:

maurus 06-08-2004 03:15 AM

Code:

pullup,softskip
1) There settings are also for PAL KSVCD?

2) Are you removed vqblur=0?

3) noise=2th also for KSVCD (480x576)?

4) scplx_mask=0.01 and lmin=0.01?

I use scplx_mask=0.3 and lmin=0.3. Are your setting best for KSVCD for 1 CD 80 min, with lower bitrates (900-1300)?

Thanks.


-Maurus

incredible 06-08-2004 06:05 AM

Quote:

Originally Posted by kwag
....... red-planet-.......

vf=.......,pullup,softskip........

Question: As you do encode from your "Red planet" DVD.
I dont understand why do you perform an IVTC on a not telecined DVD source?? As Your sample just gots the pulldown flag but not a real pulldown to "real" 29.97fps :?:

kwag 06-08-2004 10:14 AM

Quote:

Originally Posted by incredible
Question: As you do encode from your "Red planet" DVD.
I dont understand why do you perform an IVTC on a not telecined DVD source?? As Your sample just gots the pulldown flag but not a real pulldown to "real" 29.97fps :?:

Hi Inc,

As stated in the manual, "pullup" takes care of any material that is either mixed, hard telecined, 24 fps progressive and 30 fps progressive.
So this covers all my bases, in case of any future weird source ;)
In this case, as in Red Planet that is processing a true progressive FILM material, "pullup" is not a problem, and doesn't do any changes on the stream.

-kwag

incredible 06-08-2004 11:08 AM

Ok, I didnt beleive before that pullup is that intelligent ;-)

Koekies 06-08-2004 01:33 PM

NOTE: Presently pullup lacks any way to cap the output framerate, so during 30 fps progressive sequences or stills, it will output more than 24 fps, meaning you’ll have trouble if you use it with mencoder −ofps 23.976.

vmesquita 06-08-2004 01:38 PM

Quote:

Originally Posted by Koekies
NOTE: Presently pullup lacks any way to cap the output framerate, so during 30 fps progressive sequences or stills, it will output more than 24 fps, meaning you’ll have trouble if you use it with mencoder −ofps 23.976.

This is outdated. If you check the latest manpage from CVS, there's a new filter "softskip" which allows pullup to work correctly with fixed output fps. (and other nice stuff)

Prodater64 06-08-2004 01:46 PM

Quote:

This is outdated. If you check the latest manpage from CVS, there's a new filter "softskip" which allows pullup to work correctly with fixed output fps. (and other nice stuff)
Where is that updated manual? Thank you.


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

http://www.digitalfaq.com/archives/error.gif

incredible 06-08-2004 01:52 PM

The known path ;-) :

http://www.mplayerhq.hu/homepage/design7/info.html#docs

and there "manual"

(but that softskip subject already is included in the manual for maaany weks now.)

Prodater64 06-08-2004 03:21 PM

Quote:

Originally Posted by incredible
The known path ;-) :

http://www.mplayerhq.hu/homepage/design7/info.html#docs

and there "manual"

(but that softskip subject already is included in the manual for maaany weks now.)

Thank you Inc, I already knew that link, but I don't knew that it is the latest manual update. :oops:


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

http://www.digitalfaq.com/archives/error.gif

audioslave 06-09-2004 12:08 AM

@kwag
So this command should be able to deal with hybrid material too I guess?
Could you please post your *.bat file (2 pass of course :wink: )?

kwag 06-09-2004 12:17 AM

Quote:

Originally Posted by audioslave
@kwag
So this command should be able to deal with hybrid material too I guess?
Could you please post your *.bat file (2 pass of course :wink: )?

My baftch file:
mencoder -include temp.conf -lavcopts vbitrate=859:vhq:vpass=1 "k:\Back to the Future\VTS_01_1.VOB" -o "K:\back.m2v"

My configuration (included file):

# Find cropping.
#vf=yuvcsp,pullup,softskip,cropdetect


# Test Back to the Future
vf=yuvcsp,pullup,softskip,crop=720:460:0:6,scale=3 36:320,hqdn3d,sab=.5:.5:1,noise=1th,expand=352:480


of=rawvideo=1
ovc=lavc=1
nosound=1
sws=2
#sws=9

#KSVCD
#lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=2500:aspect=4/3:keyint=18:vrc_buf_size=917:preme=2:precmp=2:auto aspect=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,3 4,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,3 0,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,3 2,34,36,38,40,42,44

# KDVD
lavcopts=vcodec=mpeg2video:vstrict=-1:vmax_b_frames=2:vrc_maxrate=5000:aspect=4/3:keyint=18:vrc_buf_size=1835:preme=2:precmp=2:aut oaspect=1:vrc_eq=tex:scplx_mask=0.01:vqmin=1:mbqmi n=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,2 6,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,2 6,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

audioslave 06-09-2004 12:19 AM

@kwag
Thanks a lot, Maestro! :) I just came out of bed and saw your new discovery, helpful indeed.

BTW Which version of MEncoder do you use?

kwag 06-09-2004 12:26 AM

Good morning Audioslave :)

I'm using MEncoder dev-CVS-040430-00:00-3.3.1 (C) 2000-2004 MPlayer Team

-kwag

audioslave 06-09-2004 12:47 AM

Thanks again! :D

incredible 06-09-2004 07:12 AM

And thats the point why only a crop detection is very risky:

Quote:

Originally Posted by Kwag
crop=720:460:0:6,scale=336:320,...........,expand= 352:480

This will end up in a wrong AR! (headache! :lol: )

IF you go from 720 width to PAR 128/117 (no matter if overscan will be added) means in this case to a 352 width you have to crop the width by 8 before IF u use cropping as first command!

crop=704:460:0:6,scale=336:320,...........,expand= 352:480

;-)

kwag 06-09-2004 10:49 AM

Quote:

Originally Posted by incredible

crop=704:460:0:6,scale=336:320,...........,expand= 352:480

;-)

Yes you're right :)
704/352 = 2. But 720/352 is not even :!:

Isn't resizing a bitch :lol:

-kwag

jorel 06-09-2004 10:55 AM

Quote:

Originally Posted by kwag
Isn't resizing a bitch :lol:
-kwag

yes, bitch is always "too large"! :roll: :bawl: :rotf:

kwag 06-09-2004 11:41 AM

Actually the correct line for "Back to the Future" is: vf=yuvcsp,pullup,softskip,crop=704:460:0:6,scale=3 36:336,hqdn3d,sab=.5:.5:1,noise=1th,expand=352:480

The original is 1.85:1 ;)

-kwag

Prodater64 06-09-2004 12:37 PM

Quote:

Originally Posted by kwag
Actually the correct line for "Back to the Future" is: vf=yuvcsp,pullup,softskip,crop=704:460:0:6,scale=3 36:336,hqdn3d,sab=.5:.5:1,noise=1th,expand=352:480

The original is 1.85:1 ;)

-kwag

Can pullup and softskip to be included in any script, no matter source type (DVD or AVI), or source fps (23.976, 29.976, 25), or telecined, or progressive?
When it must to be present in the script?


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

http://www.digitalfaq.com/archives/error.gif

kwag 06-09-2004 01:48 PM

Quote:

Originally Posted by Prodater64
Can pullup and softskip to be included in any script, no matter source type (DVD or AVI), or source fps (23.976, 29.976, 25), or telecined, or progressive?
When it must to be present in the script?

pullup is for NTSC only.

Quote:

pullup
Third-generation pulldown reversal (inverse telecine) filter, capable of handling mixed hard-telecine, 24 fps progressive, and 30 fps pro- gressive content. The pullup filter is designed to be much more robust than detc or ivtc, by taking advantage of future context in making its deci- sions. Like ivtc, pullup is stateless in the sense that it does not lock onto a pattern to follow, but it instead looks forward to the following fields in order to identify matches and rebuild progressive frames. It is still under development, but be- lieved to be quite accurate. No configuration op- tions are available yet. NOTE: Always follow pullup with the softskip filter when encoding to ensure that pullup is able to see each frame. Fail- ure to do so will lead to incorrect output and will usually crash, due to design limitations in the codec/filter layer.
http://www.mplayerhq.hu/DOCS/man/en/manpage.html#CODEC%20SPECIFIC%20ENCODING%20OPTIONS %20(MENCODER%20ONLY)

-kwag

Prodater64 06-09-2004 02:01 PM

@Kwag: I already read that, but i don't understand it. I'm sorry. It is too technic for my english.


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

http://www.digitalfaq.com/archives/error.gif

kwag 06-09-2004 03:15 PM

Quote:

Originally Posted by Prodater64
@Kwag: I already read that, but i don't understand it. I'm sorry. It is too technic for my english.

In Spanish:
http://www.mplayerhq.hu/DOCS/man/es/manpage.html#CODEC%20SPECIFIC%20ENCODING%20OPTIONS %20(MENCODER%20ONLY) :)

digitall.doc 06-09-2004 03:56 PM

Hi all :D .
Hi Kwag. Already tested your MA mencoder filter chain. With a resolution 704x576, it slowed mencoder to 4-5 fps (you already advised it).
I wanted to compare it with mencoderAVS, but after upgrading my PC (a big 160 GB HDD) mencoderAVS is not working for me ( :x ), even avisynth is working OK. I still have to compare it (speed) with makeavis way... and with vmesquita filter chain (image quality).
But this filter chain would work more like hybridfupp than MA (in a way), since it just blurs some portions of the picture, am I wrong?.
Other thing I'm curious (sorry, it's OT): from your last posts in this thread, I can see you're using a different approach related to mencoder parameters
- using mbd=1 (vhq), we were using default mbd=0. I didn't compare them. Is it slower?. Does it improve quality (it's supposed to)?. It's even better with mbd=2, but sloooow.
- you dropped vqblur=0 (so you're using default 0.5). With vqblur=0 mencoder is supposed to raise quantizer immediately whenever it's needed; with vqblur=0.5 quantizers are averaged with previous values. Why do you want mencoder to do so?, in what way does it improve the stream?.
- you're using scplx_mask=0.01, very little mask is applied. scplx_mask is used with deblocking purpose. Does it mean that the filter chain is enough to avoid blocks?, does it make mencodings faster?.
- finally, you're using a lmin=0.01 value. I tested really low values earlier (0.1), not so low, and with them I got a planar Q curve, as when using vqscale. And it also made bitrate peaks raise a lot. What's your purpose when using this very low value?, don't you get a planar Q curve, and high bitrate peaks?.
Kwag, I make all this questions to learn from your experience. Sorry if I did too much questions, but I want to understand your way. And as I don't have much time now to test, I need you tell us the result of your way (even there's already a sample to see the result :lol: )
Thanx in advance

kwag 06-09-2004 05:18 PM

Quote:

Originally Posted by digitall.doc
But this filter chain would work more like hybridfupp than MA (in a way), since it just blurs some portions of the picture, am I wrong?.

No you're not wrong ;)
Quote:

Other thing I'm curious (sorry, it's OT): from your last posts in this thread, I can see you're using a different approach related to mencoder parameters
- using mbd=1 (vhq), we were using default mbd=0. I didn't compare them. Is it slower?.
Yes.
Quote:

Does it improve quality (it's supposed to)?.
Yes.
Quote:

It's even better with mbd=2, but sloooow.
- you dropped vqblur=0 (so you're using default 0.5). With vqblur=0 mencoder is supposed to raise quantizer immediately whenever it's needed; with vqblur=0.5 quantizers are averaged with previous values. Why do you want mencoder to do so?, in what way does it improve the stream?.
To avoid the spikes that many people were seeing.
Quote:

- you're using scplx_mask=0.01, very little mask is applied. scplx_mask is used with deblocking purpose. Does it mean that the filter chain is enough to avoid blocks?,
I got better results with that low mask value. Remember, these are values I'm experimenting with, so take them with a grain of salt ;)
Quote:

does it make mencodings faster?.
No.
Quote:

- finally, you're using a lmin=0.01 value. I tested really low values earlier (0.1), not so low, and with them I got a planar Q curve, as when using vqscale. And it also made bitrate peaks raise a lot. What's your purpose when using this very low value?,
With the value I have set lmin and scplx_min, I'm getting better bitrate distribution.
Quote:

don't you get a planar Q curve, and high bitrate peaks?.
Nope. No crazy peaks at all, and bitrate within the MAX limits every time :)
Quote:

Kwag, I make all this questions to learn from your experience. Sorry if I did too much questions, but I want to understand your way. And as I don't have much time now to test, I need you tell us the result of your way (even there's already a sample to see the result :lol: )
Thanx in advance
No problem ;)

-kwag

maurus 06-10-2004 03:29 AM

Already tested your MA mencoder filter chain.

The quality is good, but it is very very slow in PCs < 1 GHz.

I look for another chain alternative with decent quality:

Code:

SCALE, CROP, unsharp=l3x3:0.6,hqdn3d=3:6:2,unsharp=l3x3:-0.7:c3x3:-1.5,noise=2th, EXPAND
An removing
Code:

vhq
It could be this? It is the last propose chain before the current MA.
I can optimize something this?

Thanks.

-Maurus

SILK 06-10-2004 04:28 AM

Same problem here: two slow. I've got an athlon xp 2400 and with this script i've got only 10 fps and with 2 pass it takes 8 or 9 hours. The quality is very good but I can't wait so long.

Koekies 06-10-2004 04:59 AM

Is anyone getting buffer underflows in mencoder with these filters? I get alot of them and the audio isn't sync anymore after half an hour :? Reducing the noise to 1th has helped a bit with the buffer underflows in mencoder but the bitrate drops below 200 :(

maurus 06-10-2004 05:11 AM

I allways (with this filter chain and with all filters chain than I try) get a lot of "buffer underflowin", but in the PC and in the player the KSVCD seems good.

-Maurus

Koekies 06-10-2004 07:32 AM

No problems with your audio?


All times are GMT -5. The time now is 06:37 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.