Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th June 2008, 16:12   #21  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Quote:
Originally Posted by nixius View Post
Another reason I didn't post my script is basically because I am not sure what I am doing and I am embaressed to post it because it is full of too many plugins (that probably conflict) and I know it isn't very ncie!
But your thread is about learning to encode. How will you learn if you don't expose your work to positive criticism and then benefit from it?
Guest is offline   Reply With Quote
Old 7th June 2008, 21:05   #22  |  Link
nixius
Registered User
 
Join Date: Nov 2007
Posts: 18
Hmm yes, I see your point. You are correct

Code:
#  SOURCE
mpeg2source("dnangel.d2v")

#assumetff()
telecide(guide=1,order=1,post=2,blend=true,vthresh=1)	
#telecide(guide=1)
decimate()

ConvertToYUY2()
GuavaComb(mode = "NTSC", recall=95, maxVariation=25, activation=10) 

DeDot()

FFT3DFilter(sigma=5,sigma2=3,sigma3=3,sigma4=.5,plane=4)

ConvertToYV12()
UnComb()

Convolution3d (0, 8, 16, 8, 8, 3, 0)

TComb(2, 5,6,6,5, false,12,false,4)

#  CROPPING
crop(4,0,708,476)

#  RESIZING
LanczosResize(720,544)
XVid settings I used the settings form the guide on this site, x264 settings I left everything at default except for :

Max ref Frames: 3

I encoded 2 pass, and at 1250 bitrate, although I usually do 1000.

I also added 2 VirtualDub Filters:

Smooth HQ Athlon by Klaus Post.
Diamater: 7
Threshold: 40
<all the rest default>

and HSV Adjust, moving the saturation to 108%

Edit: Oh btw, I do realise that I convert to YUY2 and then convert to YV12, when I could just move some functions to before the initial YUY2 conversion

Last edited by nixius; 7th June 2008 at 21:08.
nixius is offline   Reply With Quote
Old 7th June 2008, 21:17   #23  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,689
Quote:
Originally Posted by nixius View Post
x264 settings I left everything at default except for :

Max ref Frames: 3
What is "default"? Default depends on the program you're using... MeGUI for example lets you paste the commandline you're using, so paste the actual settings you used
Dark Shikari is offline   Reply With Quote
Old 7th June 2008, 21:35   #24  |  Link
nixius
Registered User
 
Join Date: Nov 2007
Posts: 18
I used VirtualDub, although the guide that was posted earlier used command line settings. Sorry I assumed the codec came with default settings.

Unfortunately I was unable to get MeGui working with command line settings, and I tried using the command line provided with x264 codec but I got some errors, so that is why I ended up using VD with x264 at least. However, I will write out what everything was:

Code:
---Rate Control
KeyFrame Boost (%): 40
B-Frames Reduction (%): 30
Bitrate Variability(%):60

Min QP: 10
Max QP: 51
Max QP Step: 4

Scene Cut Threshold: 40
Min IDR-frame interval: 25
Max... : 250

---MB & Frames
8x8 transform [X]
8x8,8x16, 16x8 P-Frame Search [X]
8x8,8x16, 16x8 B-Frame Search [X]
4x4, 4x8, 8x4 P-Frame Search [ ]  <<NOT ticked>>
8x8 Intra Search [X]
4x4 Intra Search [X]

Max Consecutive B-Frames: 2
Bias: 0

Use as references [ ] <<NOT ticked>>
Bidirectional ME [ ]
Adaptive [X]
Weighted biprediction [X]

Direct Mode: Temporal

---More...

Partition Decision: 5 (High Quality)
Method: Hexagonal Search

Range:16 (this is greyed out)
Chroma ME [X]
Max.ref Frames: 3
Mixed Refs [ ] <<NOT ticked>>

Simple AR  1:1
Threads: 1
CABAC [X]
Trellis [X]
Deblocking Filter [X]
Noise Reduction: 0
Sttrength: 0 
Threshold: 0  (think this and strength refer to the noise)

Log Level: Error
FourCC: H264

---Bitrate
Pass Option: (this changes betwee First Pass, single, Nth)
Bitrate: As I said 1250, but I usually used 1000
Statsfile: location (.\x264.stats) << for first pass if I remember correctly
Sorry, I should really invest some extra time in getting command line working. I was very frustrated that I couldn't get that done
nixius is offline   Reply With Quote
Old 7th June 2008, 21:40   #25  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,689
Quote:
Originally Posted by nixius View Post
I used VirtualDub, although the guide that was posted earlier used command line settings. Sorry I assumed the codec came with default settings.

Unfortunately I was unable to get MeGui working with command line settings, and I tried using the command line provided with x264 codec but I got some errors, so that is why I ended up using VD with x264 at least. However, I will write out what everything was:
This is very bad. x264 Video for Windows is not only old and unmaintained, but H.264 in AVI as a whole is generally considered Evil (TM).

If you have problems post them and get help rather than use something that's inherently broken to begin with
Quote:
Max Consecutive B-Frames: 2
This should be 16; anime benefits greatly from many B-frames (and x264 chooses the number automatically anyways, so no reason to cap the encoder to a specific value!). In particular, lots of B-frames also help it make better use of its reference frames.
Quote:
Use as references [ ] <<NOT ticked>>
Bidirectional ME [ ]
These should probably be ticked.
Quote:
Direct Mode: Temporal
Temporal is generally not good for anime; either use Auto on both passes, or Spatial.
Quote:
Partition Decision: 5 (High Quality)
Method: Hexagonal Search
You should generally use at least subme 6 (first parameter) and probably a better motion search too.
Quote:
Max.ref Frames: 3
Mixed Refs [ ] <<NOT ticked>>
Adding more refs and mixed-refs drastically increase efficiency for encoding anime, albeit at the cost of encoding speed.

Last edited by Dark Shikari; 7th June 2008 at 21:43.
Dark Shikari is offline   Reply With Quote
Old 8th June 2008, 02:12   #26  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
That's a LOT of filtering for what looked like a pretty clean source. Can you really justify all that, or are you suffering from filteritis?
Guest is offline   Reply With Quote
Old 8th June 2008, 15:22   #27  |  Link
nixius
Registered User
 
Join Date: Nov 2007
Posts: 18
Thanks for your comments, really appreciate you helping me out!

Quote:
This is very bad. x264 Video for Windows is not only old and unmaintained, but H.264 in AVI as a whole is generally considered Evil (TM).

If you have problems post them and get help rather than use something that's inherently broken to begin with
I did read something about VirtualDub not being best for x264 but I didn't think all that much of it. Am I right in thinking that it is then alot better to be using MeGUI or some other command line based program and creating an .mp4 file?

I do very much appreciate your tips on the settings, however, I would really like to understand what they all mean . For example, I have no idea what a B-Frame is, or for that matter pretty much what anything you mentioned is . There probably is no easy way to learn so I think I will just google everything I can and work from there.

Later on I will try a few encodes with the new settings with a lower bitrate and re-post x264 vs XVid.

Am I right in think that if the bitrate is so high and they are both 'beyond' saturation point, that at a lower bitrate the differences between XViD and x264 will become apparent?

Quote:
That's a LOT of filtering for what looked like a pretty clean source. Can you really justify all that, or are you suffering from filteritis?
I am pretty sure it is mostly filteritis. The main reason for the mass of filters is that some parts of the video have annoying artifacts and dot crawl.

I am not sure of the correct approach to these problems, so honestly I google'd up filters for each type of problem, read their pages for the settings and tried to understand what they meant, then guessed the best settings to use.

I will have more of a play with these filters as well... I bet I could remove some of them ^^;
nixius is offline   Reply With Quote
Old 8th June 2008, 16:11   #28  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 959
Having looked at your source, and pinching someone else's IVTC, I came up with this. Checkmate removes the rain bowing and dot crawl very well. Other than that, the source is very clean. Such strong filtering like what you have used is just going to remove detail and smooth it too much.
Code:
MPEG2Source(vid_source, cpu=6)
AssumeTFF()
Checkmate()
Telecide(guide=1)
Decimate()
Vinverse() # probably not needed if using telecide's post-processing
ToonLite(0.2) # may thin lines too much for your taste
Crop(8,2,-8,-2)
The following is a good link for explaining some command line options for x264. I'm not sure if it explains some concepts in as much detail as you might like, but Google or maybe Wikipedia should be able to help you there. And you can always post questions you have.
http://ffmpeg.x264.googlepages.com/mapping
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.

Last edited by J_Darnley; 8th June 2008 at 16:13.
J_Darnley is offline   Reply With Quote
Old 8th June 2008, 22:23   #29  |  Link
Deinorius
Najarenthur
 
Deinorius's Avatar
 
Join Date: Jan 2006
Location: Austria (Vienna)
Posts: 202
@nixius
For removing grain DeGrainMedian(limitY=6,limitUV=8,mode=3) should be enough. I tried this script (nearly the same as J_Darnley's) and it works quite well too. With x264 and crf 20 (PS3 profile - HighProfile, subme6, RDO,...) I get around 700 kbit/s.
Code:
MPEG2Source("F:\SPLIT.d2v",idct=7)
Checkmate()
tfm(d2v="F:\SPLIT.d2v").tdecimate(mode=1)
Crop(8,0,-8,-0)
RemoveGrain(24)
DeGrainMedian(limitY=6,limitUV=8,mode=3)
#awarpsharp(depth=8,cm=1,blurlevel=1) #activate as you like (or try ToonLite)
gradfun2db(thr=1.6)
Deinorius is offline   Reply With Quote
Old 10th June 2008, 18:03   #30  |  Link
nixius
Registered User
 
Join Date: Nov 2007
Posts: 18
Hi again I am currently encoding some samples so please bear with me!

Initially I am doing a 1000 bitrate 2 pass of XVid and x264 again, but with the new x264 setting so graciousely provided by Dark Shikari - although for some reason I can't change Max Consecutive B-Frames to anything above 5.

Quote:
The following is a good link for explaining some command line options for x264. I'm not sure if it explains some concepts in as much detail as you might like, but Google or maybe Wikipedia should be able to help you there. And you can always post questions you have.
http://ffmpeg.x264.googlepages.com/mapping
That as you say isn't as detailed as I would like but it is an excellent starting point. Thank you very much for the link it will surely help!

I am currently encoding the x264 file into AVI again, judging from previous comments this seems like a bad idea. What are your preferred methods of encoding x264 video?

Once I have these initial samples I will play around with the settings from Deinorius and J_Darnley posts. Thanks alot for your suggestions !
nixius is offline   Reply With Quote
Old 10th June 2008, 18:28   #31  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,689
Quote:
Originally Posted by nixius View Post
I am currently encoding the x264 file into AVI again, judging from previous comments this seems like a bad idea. What are your preferred methods of encoding x264 video?
Try MeGUI. Its pretty easy to use and has some nice presets, including anime-related ones.
Dark Shikari is offline   Reply With Quote
Reply

Tags
anime, articles, encode, learn, resources

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.