Home > encode, x264, x264-bin > x264 with high bit depth y4m support ( for VapourSynth )

x264 with high bit depth y4m support ( for VapourSynth )

27th October 2012, Saturday Leave a comment Go to comments

Accept high bit depth y4m created by VapourSynth. Patch is here (from D_S’s x264 devel repo, thanks for Jeeb’s work).

Skip unnecessary depth conversion for y4m input, just like high bpp avs/raw input in old x264_tMod. Patch is here, note this patch comes after original tMod’s Skip bit depth filter when possible patch.

Ideally bit depth conversion should be put into one function instead of duplicating those codes in different files (input/raw.c, input/y4m.c, etc.). Jeeb seems to be working on it (link). If it is applied in the next official update, all above patches need to be re-written, so I didn’t put them on my GitHub’s repo.

Just a minor update mainly for high bpp y4m input, so didn’t include libav/ffms in it. Only Lite version:
Download:
MediaFire, NMM-Mirror

Example:

#!/bin/env python

import vapoursynth as vs
import sys
core = vs.Core()
core.std.LoadPlugin(path=r"ffms2.dll")
ret = core.ffms2.Source(r"input.mkv")
ret = core.resize.Bicubic(clip=ret, format=vs.YUV420P16)
ret.output(sys.stdout, y4m=True)

python example.vpy | x264 --demuxer y4m --output output.mp4 -

or

#!/bin/env python

import vapoursynth as vs
import sys
core = vs.Core()
core.std.LoadPlugin(path=r"ffms2.dll")
ret = core.ffms2.Source(r"input.mkv")
ret = core.resize.Bicubic(clip=ret, format=vs.YUV420P10)
ret.output(sys.stdout, y4m=True)

python example.vpy | x264 --demuxer y4m --output output.mp4 -

If you feed the second example.vay to x264_**_tMod-10bit-420.exe, you’ll see skip depth info as with high bpp raw/avs input for old tMod with same output depth:

Categories: encode, x264, x264-bin
  1. No comments yet.
  1. 11th November 2012, Sunday at 01,25pm UTC

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: