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)

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 02:06 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.