Mimicking Motion Adaptiveness blur with Mencoder.
@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 |
We remove also the current two unsharp filters?
-Maurus |
You do noise on Chroma also ? Won't this be noticiable ?
Eye is far more sensitive to noise in chroma than in luma. |
@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 |
Quote:
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 :) |
@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 :lol:). 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: http://www.digitalfaq.com/archives/i.../2004/06/5.png Sample here: http://s2.yousendit.com/d.aspx?id=BF...A956C60D831C05 1,340Kbps (Real 1,437Kbps) average bitrate graph: http://www.digitalfaq.com/archives/i.../2004/06/6.png 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 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 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 |
@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. -------------------------- http://www.digitalfaq.com/archives/error.gif |
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 :) |
Quote:
-kwag |
Quote:
Thanks for pointing it out. It should be 1, not 2. All other parameters are correct. I just verified them. -kwag |
Much better :)
This is from another encode (The first 3 minutes of "Space Cowboys" ) http://www.digitalfaq.com/archives/i.../2004/06/7.png |
Quote:
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". |
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 |
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 :-)
|
Quote:
-------------------------- 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
This is great! :D 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? |
Quote:
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:
Quote:
-kwag |
Quote:
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). |
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" 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 |
Quote:
Maybe Quote:
-------------------------- 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 |
thanx I'll try that :)
EDIT: That wasn't it :( |
Hi this is what dos says.
MPEG-PS file format detected. VIDEO: MPEG2 720x480 (aspect 3) 29.970 fps 9800.0 kbps (1225.0 kbyte/s) [V] filefmt:2 fourcc:0x10000002 size:720x480 fps:29.97 ftime:=0.0334 Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1 ================================================== ======================== Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough VDec: vo config request - 720 x 480 (preferred csp: Mpeg PES) Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. VDecoder init failed :( Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1 Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2)) ================================================== ======================== Writing AVI header... VDec: vo config request - 720 x 480 (preferred csp: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. videocodec: libavcodec (720x480 fourcc=3267706d [mpg2]) [mpeg2video @ 009B1B2C]MPEG1/2 doesnt support 2997/125 fps, there may be AV sync issues New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf). subtitle font: load_sub_face failed. [mpeg2video @ 009B1B2C]rc buffer underflowmin 0mb A-V:0.000 [0:0] Pos: 0.3s 9f ( 0%) 0fps Trem: 0min 0mb A-V:0.000 [0:0] Skipping frame! Mencoder chooses to use 720x480 :? is there anyway you can force mencoder not to do that :?: -Koekies |
Hi koekies,
Can you try just Code:
vf=scale=720:480::0:9,crop=672:378:24:16,expand=704:480 Cheers |
I'll try :) Bicubic resizing gives the same problem as lancos :( Which is better quality? and I'm trying the experimental motion estimation method X1 anyone tried that before?
|
I think the motion estimation command vme=5 took away some tiny blocks you could see when there was fast motion :) I'm not sure though it could be something else.
|
Mencoder still says
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough VDec: vo config request - 720 x 480 (preferred csp: Mpeg PES) Could not find matching colorspace - retrying with -vf scale... Opening video filter: [scale] The selected video_out device is incompatible with this codec. VDecoder init failed Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1 Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2)) ================================================== ======================== Writing AVI header... VDec: vo config request - 720 x 480 (preferred csp: Planar YV12) VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.78:1 - prescaling to correct movie aspect. videocodec: libavcodec (720x480 fourcc=3267706d [mpg2]) |
In the man_page from mplayer I found this
Code:
−zoom |
Maybe, but it seems to me that your problem is either on expand or crop where the 1st of them takes precedence.
This doesn't seem a scaling problem but mencoder scale is way different than any AVISynth resizer. Give it a try, anyway. Cheers |
Hi guys man i know this isin't for newbies because i don't understand anything you guys are doing but when i alter the temp.conf file how do i run it without using the gui
:oops: :cry: |
create a bat file like this
Code:
Mencoder.exe -include temp.conf -lavcopts vbitrate="your bitrate here":vpass=1 "path to your file you want to encode" -o "path to your encoded file example c:\movie\skvcd.m2v" -Koekies |
No luck with the zoom command I don't think it was meant to be used for what I wanted it to bad the -x="x" and -y="y" commands only work in mplayer :(
|
HI Koekies
Code:
create a bat file like this is that for me The only way i know how to get mencoder to run is through one og the Gui's made here(MEncoderMe or packshot) I started one like Karl said and then edited the file but now i don't know what to do to start again without the GUi(which will overwrite what i just changed) if your above answer is what i need to do i just don't understand :D thanx for your help |
First tell me what your conf file is named
Is it in the same dir as mencoder? Then you create a tekst file copy the stuff in it I just posted rename it to *.bat and run it |
Thanx buddy please bare with me because i am not computer smart
my conf file is simply named temp.conf and yes it is in the same folder as mencoder I tried to run the bat file(by double clicking it) that was created the same time as my conf file but it starts and just closes |
Quote:
Code:
−sws <software scaler type> (see −vf scale option too) |
@ bigggt the bat created by mencodeme doesn't just work like that
because of the value %%PASS%% or something it only works with mencodeme. So copy that line so you have it two times. replace the first %%PASS%% with 1 and the second with 2 encode bat mencodeme makes Mencoder.exe -include temp.conf -lavcopts vbitrate=843:vpass=%%PASS%% "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.avi" -o "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.mpv" what you do to it Mencoder.exe -include temp.conf -lavcopts vbitrate=843:vpass=1 "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.avi" -o "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.mpv" Mencoder.exe -include temp.conf -lavcopts vbitrate=843:vpass=2 "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.avi" -o "C:\movies\Timeline\alliance-timeline-xvid\alliance-timeline-xvid.mpv" |
Thanx Koekies
I have to leave for the day but i will try when i get home tonight I appreciate your help :D |
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:
|
why not?
run it in dos see why it shuts down there must be some mencoder error if it shuts down immediatly |
Thanx Buddy I final i got it (thanx to you :wink: )
The error i was getting was something to the effect of not finding the directory or something |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.