Archive

Archive for April, 2012

x264 rev2197+666 tMod

25th April 2012, Wednesday 4 comments

Sources on GitHub: https://github.com/astrataro/x264_tMod.

Use win32thread and fprofiled:

tMod/tMod-10bit/tMod+MixAQ/tMod+OreAQ:
Download:
x264_rev2197+666_tMod-libav.7z : NMMGitHubMediaFire
x264_rev2197+666_tMod-ffmpeg.7z : NMMGitHubMediaFire
x264_rev2197+666_tMod-lite.7z : NMMGitHubMediaFire

Main difference between ffmpeg/libav version:
Built with ffmpeg or libav (also ffms was built with ffmpeg/libav accordingly).
1. ffmpeg version uses libutvideo to decode utvideo, while libav version uses libavcodec’s internal utvideo decoder. libavcodec has not implemented SIMD optimizations and is slower than libutvideo decoder. In some rare cases libavcodec fail to decode correct frame (not sure, I would like to report this to libav/ffmpeg projects if I confirmed it is libavcodec’s issue), and libutvideo doesn’t have such problem.
2. ffmpeg version can decode celt audio via libcelt. celt codec doesn’t ensure capability with old version, and the libcelt in ffmpeg version is latest v0.11.3-19-git-r1588(e18de77) (standalone encoder/decoder binaries included). However, libcelt has stopped its development and moved to opus, and this final version of git should never be changed any more.
3. ffmpeg version supports more input-csp for raw input: rgba64be, rgba64le, bgra64be, bgra64le, 0rgb, rgb0, 0bgr, bgr0, yuva444p

Lite version (formerly Special_offer) has only tMod+MixAQ-8bit and tMod-10bit with 4:2:0 chroma subsampling, no interlaced/audio/lavf/swscale/ffms support, smaller in size and might be faster in speed.

libavcodec/libutvideo decode speed comparison:
E:\x264\Sakura_Cafe\x264_rev2197+666_tMod-ffmpeg\tMod+MixAQ-8bit>"x264_32_tMod+MixAQ-8bit-420.exe" E:\Test-utvideo-compress-fhd.avi --preset ultrafast -o nul.264
ffms [info]:
Codec : libutvideo
PixFmt : yuv420p
Timebase : 1001/0
Duration : 24000:00:00
ffms [info]: 1920x1080p 0:1 @ 24000/1001 fps (vfr)
ffms [info]: color matrix: undef
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264 [info]: profile Constrained Baseline, level 4.0
x264 [info]: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 fgo=0 bframes=0 weightp=0 keyint=250 keyint_min=23 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0000 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 aq2=0

x264 [info]: started at Thu Apr 26 00:36:11 2012
x264 [info]: frame I:2 Avg QP:18.50 size:174995
x264 [info]: frame P:498 Avg QP:22.53 size: 42904
x264 [info]: mb I I16..4: 100.0% 0.0% 0.0%
x264 [info]: mb P I16..4: 10.9% 0.0% 0.0% P16..4: 50.9% 0.0% 0.0% 0.0% 0.0% skip:38.1%
x264 [info]: coded y,uvDC,uvAC intra: 29.8% 50.3% 11.5% inter: 25.1% 24.1% 0.6%
x264 [info]: i16 v,h,dc,p: 52% 29% 11% 8%
x264 [info]: i8c dc,h,v,p: 35% 24% 28% 13%
x264 [info]: kb/s:8330.76

encoded 500 frames, 62.8615 fps, 8330.76 kb/s, 20.71 MB
x264 [info]: ended at Thu Apr 26 00:36:19 2012
x264 [info]: encoding duration 0:00:08

================================================================

E:\x264\Sakura_Cafe\x264_rev2197+666_tMod-libav\tMod+MixAQ-8bit>"x264_32_tMod+MixAQ-8bit-420.exe" E:\Test-utvideo-compress-fhd.avi --preset ultrafast -o nul.264
ffms [info]:
Codec : utvideo
PixFmt : yuv420p
Timebase : 1001/0
Duration : 24000:00:00
ffms [info]: 1920x1080p 0:1 @ 24000/1001 fps (vfr)
ffms [info]: color matrix: undef
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264 [info]: profile Constrained Baseline, level 4.0
x264 [info]: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 fgo=0 bframes=0 weightp=0 keyint=250 keyint_min=23 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0000 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 aq2=0

x264 [info]: started at Thu Apr 26 00:36:52 2012
x264 [info]: frame I:2 Avg QP:18.50 size:174995
x264 [info]: frame P:498 Avg QP:22.53 size: 44090
x264 [info]: mb I I16..4: 100.0% 0.0% 0.0%
x264 [info]: mb P I16..4: 10.7% 0.0% 0.0% P16..4: 52.3% 0.0% 0.0% 0.0% 0.0% skip:36.9%
x264 [info]: coded y,uvDC,uvAC intra: 30.2% 51.3% 11.7% inter: 25.8% 24.7% 0.8%
x264 [info]: i16 v,h,dc,p: 51% 29% 11% 8%
x264 [info]: i8c dc,h,v,p: 34% 25% 29% 13%
x264 [info]: kb/s:8557.27

encoded 500 frames, 22.1700 fps, 8557.27 kb/s, 21.27 MB
x264 [info]: ended at Thu Apr 26 00:37:14 2012
x264 [info]: encoding duration 0:00:22

Latest updates:
– Updated to x264 to latest git-r2197.
– Added ffmpeg based version.
– Renamed special_offer suffix to lite.

Also add support for “high10″/”high422″/”high444p” and Level 5.2 in TAEC.py / avc_refclac.py

—– How to load subtitles internally –—
These builds ported subtitles video-filter from direct264, and are able to render subtitles internally.
To render subtitles in this way, demuxer must be libav/ffms. Raw/avs demuxer is not supported for now. And VSFilter.dll(for 32-bit builds) or VSFilter64.dll(for 64-bit builds) must be placed together with the x264 binary or in the system path. Do NOT change filenames of them.
Rendering multiple subtitles is possible. Now you can render at most 16 subtitles simultaneously by calling --sub for each subtitles. Note that the later calling of --sub overlays the subtitles after previous calling of --sub, so if several subtitles are in the same position, the last one should overlays on all those rendered before.
The VSFilters are modified to add custom csri API. Patches can be found in svn of direct264 project. Therefore do NOT replace them with other builds. BT.709/BT.601 is auto detected according to video resolution. For HD videos BT.709 is used and for SD videos BT.601 is used.
Both 8-bit and 10-bit builds can use subtitles rendering, but rendering should only take place in 8-bit colorspaces. For example, if the input video is 10-bit, which would be converted to yuv420p16le internally before encoding, you need to use “resize” filter to downscale it to 8-bit before “subtitles” filter: --video-filter resize:csp=i420:8/subtitles --sub "subtitles.ass".
ICL build of VSFilter(64).dll might be faster than VC2010 build on Intel CPU, as VSFilter uses some intrinsic functions which are more optimized by ICL compiler. Rendered frames should be identical.
The commandline example to render subtitles:
x264_32_tMod-8bit-420.exe --sub "subtitles-1.ass" --sub "subtitles-2.ass" --sub "subtitles-3.ass" --video-filter [Other video filters/]subtitles[/Other video filters] [Other x264 options] --output "output.mp4" "input.mp4"

Patches:
–—––—– Download(L-Smash not included): patches-rev2197.7z: NMMMediaFire
00:L-Smash(including audio encoding);
01:More detailed version head
02:Add back “touhou” tune
03:Film Grain Optimization
04:Fade Compensation
05:Remove stats before renaming
06:Add a parameter to set level of writing options in User Data Unregistered SEI
07:Utilize internal threading in lavf/ffms
08:Auto VBV settings
09:AVI output
10:filters hqdn3d pad vflip yadif patch
11:Log file
12:Encoding time
13:Level force
14:Profile force
16:New experimental AQ mode (modification of Auto-variance AQ)
17:Print video info with lavf/ffms demuxer
18:lto & Ofast
19:AviSynth 16bit hack
20:Skip bit depth filter when possible
21:Video filter: subtitles
22:Detect color matrix with lavf/ffms demuxer
23:Fix AviSynth color space converting matrix
24:High-precision fps, encoded file size & estimated total size (Update!!)
25:More detailed “zones” help
26:Unofficial --device
27:Add “libaacplus” (New!!)
28-1:MixAQ-core;(only in tMod+MixAQ version, remove AQDebug)
28-2:OreAQ-core.(only in tMod+OreAQ version, remove AQDebug)

Compiler
mingw-gcc 4.7.0

Libpack info
ffmpeg-n0.8-9180-git-r40116(cab15f9)
libav-v0.8-1507-git-r33313(394dbde)
ffms svn-r673
VSFilter-2.41 (MPC-HC v1.6.2 svn-r4492)
lame 3.99-5
libvorbis-aotuv_b6.03 (libvorbis-1.3.3)
opencore-amr 0.1.3 git-r189(958395d)
vo-amrwbenc v0.1.2-3 git-r52(6ffcea9)
libaacplus-2.0.2
faac 1.28
qtsdk 7.3

—————————————————-
My other tools list ( including some of the x264 builds ) : MediaFire

Categories: encode, x264, x264-bin

x264 rev2197+664 tMod ( Update VSFilter )

18th April 2012, Wednesday 8 comments

Sources on GitHub: https://github.com/astrataro/x264_tMod.

Use win32thread and fprofiled:

tMod/tMod-10bit/tMod+MixAQ/tMod+OreAQ:
Download:
x264_rev2197+664_tMod-v2.7z : NMMMediaFire
x264_rev2197+664_tMod-v2-Special_offer.7z : NMMMediaFire

Special offer has only tMod+MixAQ-8bit and tMod-10bit with 4:2:0 chroma subsampling, no interlaced/audio/lavf/swscale/ffms support, smaller in size and might be faster in speed.

Latest updates:
– Updated to x264-devel.
– Updated “High-precision fps, encoded file size & estimated total size” patch.
– Updated libav to fix a regressive crash on 10-bit H.264 decoding.
– Updated VSFilter to latest MPC-HC svn-r4429, also added icl 12.1 build of VSFilter.dll.
– Replaced “libvo-aacenc” by “libaacplus”. The quality of the former is too poor (even worse than faac at most bitrate level), while the later is somehow useful for low bitrate aac. But libaacplus and libvo-aacenc cannot be linked together. Even if I do some hack to make both of them linked in the binary, at least one of them cannot work, so I dropped libvo-aacenc. Also note that libaacplus always uses SBR (and sometime with PS, if the bitrate is even lower), and the maximum bitrate of libaacplus is 72kbps.

Also add support for “high10″/”high422″/”high444p” and Level 5.2 in TAEC.py / avc_refclac.py

—– How to load subtitles internally –—
These builds ported subtitles video-filter from direct264, and are able to render subtitles internally.
To render subtitles in this way, demuxer must be libav/ffms. Raw/avs demuxer is not supported for now. And VSFilter.dll(for 32-bit builds) or VSFilter64.dll(for 64-bit builds) must be placed together with the x264 binary or in the system path. Do NOT change filenames of them.
Rendering multiple subtitles is possible. Now you can render at most 16 subtitles simultaneously by calling --sub for each subtitles. Note that the later calling of --sub overlays the subtitles after previous calling of --sub, so if several subtitles are in the same position, the last one should overlays on all those rendered before.
The VSFilters are modified to add custom csri API. Patches can be found in svn of direct264 project. Therefore do NOT replace them with other builds. BT.709/BT.601 is auto detected according to video resolution. For HD videos BT.709 is used and for SD videos BT.601 is used.
Both 8-bit and 10-bit builds can use subtitles rendering, but rendering should only take place in 8-bit colorspaces. For example, if the input video is 10-bit, which would be converted to yuv420p16le internally before encoding, you need to use “resize” filter to downscale it to 8-bit before “subtitles” filter: --video-filter resize:csp=i420:8/subtitles --sub "subtitles.ass".
ICL build of VSFilter(64).dll might be faster than VC2010 build on Intel CPU, as VSFilter uses some intrinsic functions which are more optimized by ICL compiler. Rendered frames should be identical.
The commandline example to render subtitles:
x264_32_tMod-8bit-420.exe --sub "subtitles-1.ass" --sub "subtitles-2.ass" --sub "subtitles-3.ass" --video-filter [Other video filters/]subtitles[/Other video filters] [Other x264 options] --output "output.mp4" "input.mp4"

Patches:
–—––—– Download(L-Smash not included): patches-rev2197.7z: NMMMediaFire
00:L-Smash(including audio encoding);
01:More detailed version head
02:Add back “touhou” tune
03:Film Grain Optimization
04:Fade Compensation
05:Remove stats before renaming
06:Add a parameter to set level of writing options in User Data Unregistered SEI
07:Utilize internal threading in lavf/ffms
08:Auto VBV settings
09:AVI output
10:filters hqdn3d pad vflip yadif patch
11:Log file
12:Encoding time
13:Level force
14:Profile force
16:New experimental AQ mode (modification of Auto-variance AQ)
17:Print video info with lavf/ffms demuxer
18:lto & Ofast
19:AviSynth 16bit hack
20:Skip bit depth filter when possible
21:Video filter: subtitles
22:Detect color matrix with lavf/ffms demuxer
23:Fix AviSynth color space converting matrix
24:High-precision fps, encoded file size & estimated total size (Update!!)
25:More detailed “zones” help
26:Unofficial --device
27:Add “libaacplus” (New!!)
28-1:MixAQ-core;(only in tMod+MixAQ version, remove AQDebug)
28-2:OreAQ-core.(only in tMod+OreAQ version, remove AQDebug)

Compiler
mingw-gcc 4.7.0

Libpack info
libav-v0.8-1492-git-r33298(d7458bc)
ffms svn-r673
VSFilter-2.41 (MPC-HC v1.6.2 svn-r4492)
lame 3.99-5
libvorbis-aotuv_b6.03 (libvorbis-1.3.3)
opencore-amr 0.1.3 git-r189(958395d)
vo-amrwbenc v0.1.2-3 git-r52(6ffcea9)
libaacplus-2.0.2
faac 1.28
qtsdk 7.3

—————————————————-
My other tools list ( including some of the x264 builds ) : MediaFire

Categories: encode, x264, x264-bin

avs4x264mod v0.6.4 ( Fix my stupid fix )

11th April 2012, Wednesday Leave a comment

Download links ( source codes are here):
avs4x264mod-0.6.4-git-r48(a15d375).7z:
MediaFireGitHubNMM Mirror

Changelog:

v0.1:
– Fix capability with high bit depth avs.
– Add parameter to customize x264 binary.
– Print full command line used by x264.

v0.2:
– Delete ugly blank space in command line, which was generated in v0.1 if “--x264-binary” specified.

v0.3:
– Fix invalid x264 binary path when both avs4x264 and x264 binary is given by full path
– Add switch -L as a short name of --x264-binary, e.g., -L C:\x264.exe is equal to --x264-binary C:\x264.exe.

v0.4:
– Directly output i422/i444 with AviSynth 2.6 new csp YV16/YV24. No forced ConvertToYV12 for these two csp any more. Thanks to SAPikachu.
– Display version and help info when run with no options.

v0.5:
– Improve capability with more styles of parameters in x264.
E.g., --tcfile-in="timecode.txt", --input-depth=16, --x264-binary="x264", -L=x264 and -Lx264.

v0.5.1:
– Fix pipe error with YV12. This bug was introduced in v0.4.

v0.6:
– Do not add --input-res/--fps/--frames/--input-csp if already defined.
– Correct number of frames to be handled when --frames is defined. Now you can specify frame numbers to be encoded without getting errors.

v0.6.1:
– Correct --frames when used with --seek, faster --seek if no timecodes defined.
– Show more script information when opening avs.

v0.6.2:
– Add "--seek-mode" paramters, and some minor bug fixes.

v0.6.3 :
– Fix crash on XP/Server 2003, thanks to maki_rxrz.

v0.6.4 :
– Made a mistake in my last “Fix crash on XP/Server 2003”, details: here. Thanks for bug report.

Explanation on "--seek-mode" ( string, "fast"/"safe", only affects how to deal with "--seek" )

– “fast” mode is similar to x264′s internal method of avs demuxer: skip frames until the frame --seek indicates. However, when used with --qpfile/--tcfile-in, it won’t skip but add a “FreezeFrame(0, seek, seek)” to avs script to actually skip the process of those frames. I have to play this trick because x264 regards qpfile/tcfile-in as qpfiles/timecodes of input files, not output files, so the frame numbers of input piped raw ( can be only linearly seeked in x264 ) has to be left untouched.
– “safe” mode uses a safer but slower method: delivering every untouched frame to x264. When the process of frames before “--seek” frame is heavy, the “useless” running time of processing those frames will be much longer than “fast” mode, but the result is safer for scripts like TDecimate(mode=3), which can only be seeked in a linear way.

Categories: avs4x26x, encode, x264

x264 rev2192+664 tMod ( Auto VBV supports “auto_high422″/”auto_high444” )

8th April 2012, Sunday 4 comments

Sources on GitHub: https://github.com/astrataro/x264_tMod.

Use win32thread and fprofiled:

tMod/tMod-10bit/tMod+MixAQ/tMod+OreAQ:
Download:
x264_rev2192+664_tMod.7z : NMMGitHubMediaFire
x264_rev2192+664_tMod-Special_offer.7z : NMMGitHubMediaFire

Special offer has only tMod+MixAQ-8bit and tMod-10bit with 4:2:0 chroma subsampling, no interlaced/audio/lavf/swscale/ffms support, smaller in size and might be faster in speed.

Latest updates:
– Updated to x264-devel for some bug fixes, such as “Fix disabling of mbtree when using 2pass encoding and zones”, which seems annoys many encoders, and now supports Level 5.2 according to latest superseded ITU standard.
– Updated “Auto VBV Settings” patch, it allows “auto_high422″/”auto_high444” now.

Also add support for “high10″/”high422″/”high444p” and Level 5.2 in TAEC.py / avc_refclac.py

—– How to load subtitles internally –—
These builds ported subtitles video-filter from direct264, and are able to render subtitles internally.
To render subtitles in this way, demuxer must be libav/ffms. Raw/avs demuxer is not supported for now. And VSFilter.dll(for 32-bit builds) or VSFilter64.dll(for 64-bit builds) must be placed together with the x264 binary or in the system path. Do NOT change filenames of them.
Rendering multiple subtitles is possible. Now you can render at most 16 subtitles simultaneously by calling –sub for each subtitles. Note that the later calling of –sub overlays the subtitles after previous calling of –sub, so if several subtitles are in the same position, the last one should overlays on all those rendered before.
The VSFilters are modified to add custom csri API. Patches can be found in svn of direct264 project. Therefore do NOT replace them with other builds. BT.709/BT.601 is auto detected according to video resolution. For HD videos BT.709 is used and for SD videos BT.601 is used.
Both 8-bit and 10-bit builds can use subtitles rendering, but rendering always takes place in 8-bit colorspaces.
The commandline example to render subtitles:
x264_32_tMod-8bit-420.exe --sub "subtitles-1.ass" --sub "subtitles-2.ass" --sub "subtitles-3.ass" --video-filter subtitles[/Other video filters] [Other x264 options] --output "output.mp4" "input.mp4"

Patches:
–—––—– Download(L-Smash not included): patches-rev2192.7z: NMMMediaFire
00:L-Smash(including audio encoding);
01:More detailed version head
02:Add back “touhou” tune
03:Film Grain Optimization
04:Fade Compensation
05:Remove stats before renaming
06:Add a parameter to set level of writing options in User Data Unregistered SEI
07:Utilize internal threading in lavf/ffms
08:Auto VBV settings (Update!!)
09:AVI output
10:filters hqdn3d pad vflip yadif patch
11:Log file
12:Encoding time
13:Level force
14:Profile force
16:New experimental AQ mode (modification of Auto-variance AQ)
17:Print video info with lavf/ffms demuxer
18:lto & Ofast
19:AviSynth 16bit hack
20:Skip bit depth filter when possible
21:Video filter: subtitles
22:Detect color matrix with lavf/ffms demuxer
23:Fix AviSynth color space converting matrix
24:High-precision fps & estimated total size
25:More detailed “zones” help
26:Unofficial --device
27-1:MixAQ-core;(only in tMod+MixAQ version, remove AQDebug)
27-2:OreAQ-core.(only in tMod+OreAQ version, remove AQDebug)

Compiler
mingw-gcc 4.7.0

Libpack info
libav-v0.8-1337-git-r33143(d293e34)
ffms svn-r673
VSFilter svn-r3698 (MPC-HC)
lame 3.99-5
libvorbis-aotuv_b6.03 (libvorbis-1.3.3)
opencore-amr 0.1.3 git-r189(958395d)
vo-aacenc v0.1.2-6 git-r85(c6bad70)
vo-amrwbenc v0.1.2-3 git-r52(6ffcea9)
faac 1.28
qtsdk 7.3

—————————————————-
My other tools list ( including some of the x264 builds ) : MediaFire

Categories: encode, x264, x264-bin