level 1
RT,我用64位系统,x264也是64位的,听说必须用64位的avs才能正常使用,而且--demuxer ffms命令好像不能使用avs,但是又需要用滤镜,x264的滤镜好像只有crop、resize和select_every,请问是否有方法在x264中直接使用外部滤镜,比如avs的tweak、Deen之类的。
我当前的命令是这样的
@ECHO OFF & CD/D "%~dp0"
:Enc1
IF "%~1"=="" GOTO :EOF
x264.exe --demuxer ffms --preset 9 --pass 1 --stats ".stats" --bitrate 600 --profile main --tune animation --qcomp 0.4 --psy-rd 0:0 --frames 1500 -o "%~dpn1_v.mp4" "%~1"
x264.exe --demuxer ffms --preset 9 --pass 2 --stats ".stats" --bitrate 600 --profile main --tune animation --qcomp 0.4 --psy-rd 0:0 --frames 1500 -o "%~dpn1_v.mp4" "%~1"
SHIFT /1
GOTO :Enc1
2011年04月14日 15点04分
1
level 1
回复:2楼
跑32位的也是需要avs吧,之前我按照某个帖子的方法把代码改成这样:
@ECHO OFF & CD/D "%~dp0"
:Enc1
IF "%~1"=="" GOTO :EOF
ffmpeg -i "%~1" -f yuv4mpegpipe -an -v 0 - | x264.exe --demuxer ffms --preset 9 --pass 1 --stats ".stats" --bitrate 600 --profile main --tune animation --qcomp 0.4 --psy-rd 0:0 --frames 1500 --demuxer y4m -o "%~dpn1_v.mp4" -
ffmpeg -i "%~1" -f yuv4mpegpipe -an -v 0 - | x264.exe --demuxer ffms --preset 9 --pass 2 --stats ".stats" --bitrate 600 --profile main --tune animation --qcomp 0.4 --psy-rd 0:0 --frames 1500 --demuxer y4m -o "%~dpn1_v.mp4" -
SHIFT /1
GOTO :Enc1
之后可以正常使用avs了,但是压出来的视频会有些超速,估计是--demuxer ffms对vfr的矫正失效了。
2011年04月14日 15点04分
4
level 13
我以前也是用x64的系统,用32位的avs和x264都没有出现问题啊...
2011年04月14日 15点04分
5
level 9
用64位的x264速度上也许会快那么一点,但带来的麻烦绝对不是一点点,想要用滤镜的还是乖乖的用32位吧。
2011年04月14日 15点04分
8
level 1
回复:8楼
看来的确是,不过即使换回了32位版,仍然出错,说:
ffms[error]:could not create index
x264[error]:could not open input file "……………….avs" via any method!
2011年04月14日 16点04分
9
level 1
发现avs里面用FFVideoSource,然后去掉x264的--demuxer ffms也能保证vfr帧率,不过不知为什么会有半秒左右的延迟。
2011年04月14日 16点04分
10
level 9
用avs是不能保证vfr帧率的,只能删帧或重复帧来保持cfr帧率
2011年04月14日 16点04分
11
level 1
回复:11楼
好像也不是吧,如果选择AssumeFPS的话不是可以保证帧数不变,帧率改变,缩短(或拉长)视频时间的形式吗?
这样的话事先用tcfile out搞出timecode,之后再用tcfile in装回到压出来的视频里,感觉这样应该可以保证vbr帧率。如果采用ChangeFPS、或是ConvertFPS的话,感觉也许会砍掉一些高帧率部分的细节动作。
不过我没有查到AssumeFPS所采用的方式是直接对原视频的每一帧一一压缩,还是添加(或删除)重复帧以保证视频成为cfr之后再按照设定的帧率重新取帧这样的方式,如果是后者的话,那还是悲剧。
啊,好晚了,明天早起继续实验。
2011年04月14日 17点04分
12
level 9
AssumeFPS不加减帧,但是你要知道avs只接受cfr输入。vfr输入必须先变成cfr才能给avs。
所以DSS依然不能用,因为总帧数不知道。ffms必须先扫描一遍得到index才能用,其实大部分格式的索引都集中在文件开头或者尾巴上不用扫描,但是ffms很悲剧不管三七二十一全部扫描一遍。
tcfile应该是在x264的输入时指定,这样才不会影响ratecontrol。
2011年04月15日 02点04分
13