Log in

View Full Version : x264 encoding


Kurogane
24th September 2011, 04:10
I just wondering is current possible to convert 10 bits to 8 bits

The question may seem strange maybe some else will also have the same question as mine

professor_desty_nova
24th September 2011, 08:20
If you use the 8bit-depht version of x264.exe to re-encode the file directly, it converts a 10bit to 8bit.

Kurogane
2nd October 2011, 06:34
Yes, but, not encode correctly seems like when you try to see 10 bits without 10 bits decoder or maybe i do something wrong?

nibus
2nd October 2011, 09:12
Install a new 10-bit capable build of ffdshow and then use directshowsource.

the_weirdo
2nd October 2011, 11:32
Yes, but, not encode correctly seems like when you try to see 10 bits without 10 bits decoder or maybe i do something wrong?

Did you use a recent build of x264 (if you're decode through built-in ffms/lavf)? Also, latest FFMS2 Avisynth plugin can decode 10-bit H.264 properly (it cannot output 10-bit of course but dithered down to 8-bit due to the limitation of Avisynth; however, that is what you want). So the answer is: update your software.

Kurogane
3rd October 2011, 08:35
I update x264 build 2085 and ffms2 2.16 and still have the problem.

the_weirdo
3rd October 2011, 10:45
I update x264 build 2085 and ffms2 2.16 and still have the problem.

Can you describe what you're doing? (For example, encode through a GUI or using x264 CLI directly, what're your steps...) If you're using Avisynth, please post your Avisynth script here.

Kurogane
6th October 2011, 05:37
AVS FILE

LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("C:\Users\user\Documents\test\movie[10bit].mkv", threads=1)
#deinterlace
#crop
Spline36Resize(1280,720) # Spline36 (Neutral)
#denoise

__film = last
__t0 = __film.trim(0, 500)
__t0

Encode settings

x264-8bits --level 5.1 --preset veryslow --tune animation --ref 16 --psy-rd 0.3:0.0 --aq-strength 1.4 --crf 18 --threads 6 -o "test.mp4" "test.avs" 2> log.txt

Logs

avs [info]: 1280x720p 0:0 @ 24000/1001 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile High, level 5.1

x264 [info]: frame I:4 Avg QP:13.72 size: 46644
x264 [info]: frame P:88 Avg QP:11.23 size: 21654
x264 [info]: frame B:409 Avg QP:17.52 size: 2969
x264 [info]: consecutive B-frames: 1.8% 1.2% 0.6% 5.6% 4.0% 61.1% 9.8% 16.0% 0.0% 0.0% 0.0%
x264 [info]: mb I I16..4: 37.3% 52.8% 9.9%
x264 [info]: mb P I16..4: 2.5% 14.2% 2.2% P16..4: 36.9% 13.6% 4.1% 0.1% 0.0% skip:26.5%
x264 [info]: mb B I16..4: 0.2% 0.7% 0.1% B16..8: 26.1% 2.7% 0.6% direct: 3.2% skip:66.5% L0:51.8% L1:41.5% BI: 6.7%
x264 [info]: 8x8 transform intra:71.6% inter:40.6%
x264 [info]: direct mvs spatial:99.0% temporal:1.0%
x264 [info]: coded y,uvDC,uvAC intra: 71.3% 66.4% 52.6% inter: 4.8% 3.5% 0.4%
x264 [info]: i16 v,h,dc,p: 29% 8% 17% 45%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 9% 24% 9% 9% 7% 10% 8% 14%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 9% 24% 9% 12% 8% 9% 7% 11%
x264 [info]: i8c dc,h,v,p: 61% 12% 10% 17%
x264 [info]: Weighted P-Frames: Y:6.8% UV:6.8%
x264 [info]: ref P L0: 43.3% 1.4% 26.6% 8.7% 6.2% 3.4% 3.0% 1.7% 1.3% 0.9% 0.8% 0.7% 0.6% 0.5% 0.5% 0.4%
x264 [info]: ref B L0: 62.0% 17.3% 7.4% 3.9% 2.5% 1.8% 1.3% 0.9% 0.7% 0.6% 0.5% 0.4% 0.4% 0.2% 0.1%
x264 [info]: ref B L1: 91.6% 8.4%
x264 [info]: kb/s:1265.92

encoded 501 frames, 5.57 fps, 1266.19 kb/s

Download

http://www.mediafire.com/?31qc29g8dzzaijn

the_weirdo
6th October 2011, 08:50
Hmm... that's weird.
Did that script display correctly when you preview it (with MeGUI or VirtualDub...)? Can you post a small sample? I cannot reproduce it here.
One more question, how do you update FFMS? Because MeGUI use its own FFMS and you must replace that FFMS (in this case it's located in "C:\Program Files (x86)\MeGUI\tools\ffms"), or if you update FFMS in Avisynth plugins folder then you need to delete the line LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll"). Also, MeGUI has been updated its FFMS to newer version than 2.16, you should let it update and no need to update yourself.

Temuthril
6th October 2011, 14:43
FFVideoSource needs colorspace="yv12" added to it for 10 bit sources, as far as I know.

Kurogane
6th October 2011, 15:09
Hmm... that's weird.
Did that script display correctly when you preview it (with MeGUI or VirtualDub...)
No.

Can you post a small sample? I cannot reproduce it here
What small sample? is not enough my previous sample?
One more question, how do you update FFMS? Because MeGUI use its own FFMS and you must replace that FFMS (in this case it's located in "C:\Program Files (x86)\MeGUI\tools\ffms"),

I download oficial pages and replace "C:\Program Files (x86)\MeGUI\tools\ffms") files FFMS2.avsi, ffms2.dll and ffmsindex.exe

MeGUI has been updated its FFMS to newer version than 2.16, you should let it update and no need to update yourself.
Updated or not always same problem.

FFVideoSource needs colorspace="yv12" added to it for 10 bit sources, as far as I know.

I added ConvertToYV12() and same problem.

sneaker_ger
6th October 2011, 15:43
No problem here decoding 10bit h.264 using ffms2 r570 from the google code page, no extra parameters besides source file name needed.

the_weirdo
6th October 2011, 16:00
What small sample? is not enough my previous sample?
Sample from your source (your 10-bit video), not your encoded video.

I added ConvertToYV12() and same problem.
He means add colorspace="YV12" as a parameter to FFMS, but as sneaker_ger stated, there's no need for that any more.

Did you try with other 10-bit H.264 videos to see if the problem still remain?

sneaker_ger
6th October 2011, 16:11
I'm pretty sure he used the following sample, it seems to be a "standard" sample to show the power of 10bit that has been floating around for a while:
http://www.mediafire.com/?c121ant1en0dtln

But as I said: no problem with that here. (r570 from the google page, AviSynth 2.6 32bit)

Kurogane
6th October 2011, 20:06
With the beta files r570 now is working!!!!

Thanks sneaker_ger

the_weirdo
7th October 2011, 03:35
With the beta files r570 now is working!!!!

Thanks sneaker_ger

You didn't provide a sample of your source so I'm not sure, but if your source is same as the one sneaker_ger posted then even ffms 2.16 have no problem decoding it at all. I guess your problem is actually PEBKAC.

Glad to hear you figure that out, anyway.