头像
msg7086
帖子: 600
注册时间: 2011-02-19 0:49

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

另外要注意下,这个patch属于beta版,万一出现崩溃/工作不正常的情况,请务必仔细检查成品好坏。就算正常压制完了,也请检查成品好坏。

(万一坏档会很明显的,比如全屏错色或者大范围错帧什么的,瞄一眼没问题的话就算没问题了喵)
Delogo LGD Collections 各种台标下载 | Home Of VapourSynth Evolution

<回答が無い理由>
1. 誰も知らない
2. 質問文が意味不明
3. 知ってるが、お前の態度が気に入らない
4. 良いボケが思いつかない
头像
rshadow
帖子: 57
注册时间: 2011-03-23 10:18
联系: ICQ

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

{:cat_11} 感谢msg7086的解释~明白很多了



不过还有些许东西搞不懂:

1.超线程的CPU又该怎么做呢?例如2核4线程

2.貌似部分滤镜是可以跑多线程的,在Avsynth-ST中使用是跑单线程还是多线程?固定在单核心上是否合理?

3.如果改用Avsynth-MT,是不是就可以考虑把AVS固定在3核心上?
x264.threads=6,affinity=32,x264-affinity=7(假设CPU是原生6核心)



{:cat_3} 对程序毫无概念的小白乱提的问题,请轻拍……OTL
头像
msg7086
帖子: 600
注册时间: 2011-02-19 0:49

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

超线程的话可以绑定到2个小核心上,不过我不确定…… (死

ST版里的MT滤镜是可能的,通过开旁路线程+线程同步的方式做多线,不过在核心数很多的情况下(6核+),只要avs把核心平均着用的话,效率还是会掉的厉害。只有把旁路线程固定一核,avs线程固定在另一核,才能达到最大效率。折中办法是固定在2个核心上,然后跑一下banchmark看哪边的fps高。不排除有时候吃cpu多的反而慢。

MT多线程我现在始终觉得效率没有双开来得高。MT是通过时间轴向拆帧selectevery或者空间上拆帧crop+stack来做。具体的情况还要看具体的滤镜使用,像mctd这种滤镜显然就没法很好地MT。

如果是3/3配比的话,应该是x264.threads=4 affinity=32+16+8=56 x264-affinity=4+2+1=7
Delogo LGD Collections 各种台标下载 | Home Of VapourSynth Evolution

<回答が無い理由>
1. 誰も知らない
2. 質問文が意味不明
3. 知ってるが、お前の態度が気に入らない
4. 良いボケが思いつかない
头像
rshadow
帖子: 57
注册时间: 2011-03-23 10:18
联系: ICQ

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

图片
CPU是E3-1230
有关avs4x264mod的参数不管是写
--pipe-mt --pipe-buffer 512 --x264-affinity 63 --affinity 196
或是--pipe-mt --pipe-buffer 512 --x264-affinity 127 --affinity 128
或是--pipe-mt --pipe-buffer 512 --x264-affinity 7 --affinity 8
都是出现上图的错误
AVS只有一行 ffmpegsource2("test.mp4")
{:cat_18} 实在是不懂该怎么使用……能给个模板抄下吗

设定 x264.threads=6,affinity=32,x264-affinity=31
这里是必须需要设置x264.threads? 用--threads X 在X264中设置?
只有把旁路线程固定一核,avs线程固定在另一核,才能达到最大效率。折中办法是固定在2个核心上,然后跑一下banchmark看哪边的fps高。不排除有时候吃cpu多的反而慢。
{:cat_7} 这个彻底想不懂该怎么写bat了……求教
如果是3/3配比的话,应该是x264.threads=4 affinity=32+16+8=56 x264-affinity=4+2+1=7
……这里为什么不是“x264.threads=6”呢?


好像问题反而越来越多了囧……
头像
msg7086
帖子: 600
注册时间: 2011-02-19 0:49

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

crash的情况比较微妙……avs那块我分离的大概有点问题,需要花时间调一下。

x264 threads并非是必须设置,只是线程数越少,单个线程的效率越高,压缩效率也越高。

3/3配比的话,x264只能用3个核心,那么按照×1.5的标准来算,4个线程就差不多能达到最高效率了。

然后E3-1230……泪流满面
後期のCPUは化け物か!
8线程核心的话,6/2配比没啥大问题,也可以3/1配比然后同时压2个
Delogo LGD Collections 各种台标下载 | Home Of VapourSynth Evolution

<回答が無い理由>
1. 誰も知らない
2. 質問文が意味不明
3. 知ってるが、お前の態度が気に入らない
4. 良いボケが思いつかない
头像
rshadow
帖子: 57
注册时间: 2011-03-23 10:18
联系: ICQ

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

只有把旁路线程固定一核,avs线程固定在另一核
这一点该怎么实现呢?8线程核心的话,直接做6/2配比?


另外……貌似最近的版本有bug……

代码: 全选

avs4x264mod.exe --preset slow --crf 26 -o test.264 test.avs

pause
avs4x264mod-0.6.2-5-git-r43(ba9df01)
这样也会crash……OTL
貌似是程序本身的问题了……{:cat_7}
头像
msg7086
帖子: 600
注册时间: 2011-02-19 0:49

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

0.6.2git50

修正了1个double free
修正了1个segment fault
修正了某函数少传1个参数的问题
修正了avs版本变量类型错误的问题
修正了affinity设置晚于打开avs的问题
稍微美化了一下输出
供测试
附件
avs4x264mod.exe.bz2
avs4x264mod 0.6.2git50
(33.7 KiB) 下载 180 次
Delogo LGD Collections 各种台标下载 | Home Of VapourSynth Evolution

<回答が無い理由>
1. 誰も知らない
2. 質問文が意味不明
3. 知ってるが、お前の態度が気に入らない
4. 良いボケが思いつかない
头像
msg7086
帖子: 600
注册时间: 2011-02-19 0:49

Re: avs4x264mod-0.6.2-git-r43(7e0284f)【增加--seek-mode】

0.6.2git51

修正了高位色深画面出错的问题
附件
avs4x264mod.exe.bz2
(33.74 KiB) 下载 217 次
Delogo LGD Collections 各种台标下载 | Home Of VapourSynth Evolution

<回答が無い理由>
1. 誰も知らない
2. 質問文が意味不明
3. 知ってるが、お前の態度が気に入らない
4. 良いボケが思いつかない
头像
Holy
核心会员
核心会员
帖子: 235
注册时间: 2010-09-24 9:28

Re: avs4x264mod-0.6.3-git-r47(a5b1251)【增加--seek-mode】

請問香芋菊苣,為何avs4x264mod加上--tcfile-in的話會有不正常的timecode info出現,但單獨用x264的話是正常的 {:cat_13},用的avs4x264mod是目前的0.6.3.47版本。
TimeCode:

代码: 全选

# timecode format v1
Assume 23.976023976024
0,119,23.976023976024
120,269,29.97002997003
270,389,23.976023976024
單獨用x264:
D:\暫存>x264 --tcfile-in "TimeCode.txt" --output NUL "test.avs"
avs [info]: 640x480p 0:0 @ 24000/1001 fps (cfr)
avs [info]: color matrix: undef
timecode [info]: automatic timebase generation 1001/120000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile High, level 3.0
x264 [info]: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trelli
s=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 f
go=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cr
f mbtree=1 crf=23.0000 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
x264 [info]: started at Fri Mar 23 18:54:59 2012
x264 [info]: frame I:2 Avg QP: 8.00 size: 504
x264 [info]: frame P:98 Avg QP:28.39 size: 25
x264 [info]: frame B:290 Avg QP:28.39 size: 19
x264 [info]: consecutive B-frames: 0.8% 0.0% 0.8% 98.5%
x264 [info]: mb I I16..4: 100.0% 0.0% 0.0%
x264 [info]: mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0%
x264 [info]: 8x8 transform intra:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 97% 0% 3% 0%
x264 [info]: i8c dc,h,v,p: 100% 0% 0% 0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:4.82

encoded 390 frames, 570.1754 fps, 4.82 kb/s
x264 [info]: ended at Fri Mar 23 18:54:59 2012
x264 [info]: encoding duration 0:00:00
使用avs4x264mod:
D:\暫存>avs4x264mod --tcfile-in "TimeCode.txt" --output NUL "test.avs"
avs [info]: Avisynth version: 2.60
avs [info]: Video colorspace: YV12
avs [info]: Video resolution: 640x480
avs [info]: Video framerate: 24000/1001
avs [info]: Video framecount: 390
avs4x264 [info]: "x264_64" - --tcfile-in TimeCode.txt --output NUL --frames 390 --input-res 640x480 --input-csp i420
raw [info]: 640x480p 0:0 @ 25/1 fps (cfr)
raw [info]: color matrix: undef
timecode [info]: automatic timebase generation 1/18048030
x264 [info]: using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
x264 [info]: profile High, level 3.0
x264 [info]: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trelli
s=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 f
go=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=cr
f mbtree=1 crf=23.0000 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
x264 [info]: started at Fri Mar 23 18:55:57 2012
x264 [info]: frame I:2 Avg QP: 8.00 size: 506
x264 [info]: frame P:98 Avg QP:28.39 size: 25
x264 [info]: frame B:290 Avg QP:28.39 size: 19
x264 [info]: consecutive B-frames: 0.8% 0.0% 0.8% 98.5%
x264 [info]: mb I I16..4: 100.0% 0.0% 0.0%
x264 [info]: mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0%
x264 [info]: 8x8 transform intra:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 97% 0% 3% 0%
x264 [info]: i8c dc,h,v,p: 100% 0% 0% 0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:4.82

encoded 390 frames, 268.5950 fps, 4.82 kb/s
x264 [info]: ended at Fri Mar 23 18:55:58 2012
x264 [info]: encoding duration 0:00:01
图片
头像
06_taro
核心会员
核心会员
帖子: 998
注册时间: 2010-09-22 18:32
来自: United Kingdom
联系: 网站

Re: avs4x264mod-0.6.3-git-r47(a5b1251)【增加--seek-mode】

x264默認輸出timebase與輸入源的timebase相同。如果是avs的話,輸入源的timebase常常是正確的(譬如1001)。而用avs4x264mod來pipe時,對x264來說的輸入源是raw video,而raw的timebase是1(timescale是25),所以x264在對timecodes做parsing的時候會以1為timebase,結果導致這種奇怪的幾個。我之前曾經考慮過在有timecodes輸入的情況下自動將avs的fpsden作為timebase添加到參數裡,在有手動指定--timebase時例外。不過這樣有幾種情況會出現問題,主要是自己設定的timecodes.txt裡正確的timebase和avs不相同的情況下。譬如avs是TIVTC做2pass的自動vfr出現的奇怪fps,而沒有在腳本內將fpsden統一到1001,這時avs的timebase很詭異,而timecodes應該是1001。或者當壓制確實想手動改變timebase時,譬如24000/1001的avs當作25/1來壓的情況。綜合考慮了下我還是覺得不要自動添加timebase,如果需要的話請自己手動添加timebase參數(其實對大部分NTSC的片子,在任何有tcfile-in的情況下增加--timebase 1001是個好習慣,不管有沒有用avs4x264mod)
つまんねー事聞くなよ!

I, personally, for me, believe (obviously sometimes) that my OS choice is right. That's me. I'm not telling you that you should believe it. Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one. (source)

Follow me: @06_taro

304——
为纪念伟大的宇宙史上最强压制304先生,联合国教科文组织决定,将每年的第304天,即平年的10月31日或者闰年的10月30日,定为世界304日。

回到 “视频编码器 / Video encoder discussion”