Log in

View Full Version : What colorspace should sources be for x264?


Avisynth_challenged
22nd July 2010, 09:06
Hi all,

I'm looking to run Avisynth on a MPEG2 file which contains 1080i hard telecined content. Here's my script:


# These lines call the scripts required for IVTC
Import("C:\program files\avisynth 2.5\plugins\jdl_util.avs")
Import("C:\program files\avisynth 2.5\plugins\jdl_telecine.avs")
############

# This line loads the MPEG source
MPEG2Source("source.d2v")
############

# IVTC Section:
# If source has perfect 3:2 pulldown pattern, choose JDL_IVTCPattern
# Otherwise, choose telecide().decimate()
# Use only one, comment out the other!

JDL_IVTCPattern(2, false) #3:2 pulldown removal for this clip
#telecide().decimate()
############


It's pretty basic, as you can see. All I'm doing is loading my MPEG2 1080i source and applying IVTC. I will save to an intermediate avi file (Huffyuv compression, no audio), which I intend to use as input into x264.

My main question:
I know that whenever an intermediate avi is created, you have to convert to the correct colorspace for your encoder of choice. For example, CCE requires YUY2 sources for input, and TMPGEnc requires RGB. So... what does x264 require?

My MPEG2 source is obviously YV12. Should I leave it YV12 before rendering my IVTC'd output to Huffyuv?

A couple other questions:
What do the experts here use to IVTC sources which have inconsistent 3:2 pulldown cadences? As you can see in the script, I've used telecide().decimate(). But are there any better solutions out there?

Finally, can anyone recommend a good deblocking method in Avisynth (i.e. plugin or script) which has a minimal impact on image detail?

Thanks to everyone for reading. I look forward to hearing your responses :)

nurbs
22nd July 2010, 09:20
So... what does x264 require?
YV12

(filler)

GodofaGap
22nd July 2010, 11:04
Since there isn't any intensive filtering done here, I'd just feed it the AVS script directly without rendering an intermediate file.

Soichiro
23rd July 2010, 02:52
What do the experts here use to IVTC sources which have inconsistent 3:2 pulldown cadences? As you can see in the script, I've used telecide().decimate(). But are there any better solutions out there?
I would recommend TFM().TDecimate(). TFM seems to do a better job of adapting the patterns than the default telecide filter. I've never had any problems with it, at least. It even comes with a built-in post-processor if you need it (adjustable with the PP setting).

Finally, can anyone recommend a good deblocking method in Avisynth (i.e. plugin or script) which has a minimal impact on image detail?
I've seen a few recommended here and there but haven't personally found any that I like (most of them have been bad at removing blocks in my opinion). However, I have found that gradfun2dbmod, despite being a debanding filter, is also quite good at deblocking in many cases (it probably works better on anime than it does on live action).