本页为 NMM视频技术(旧)论坛(2004–2012)的只读存档,无法登录或发帖。欢迎前往 新论坛 交流。

NMM视频技术(旧)

查看: 23920回复: 1
打印 上一主题 下一主题

[AVC(H.264)] 关于x264新参数--video-filter的使用

[复制链接]
nmm520
跳转到指定楼层
1楼
发表于 2010-8-9 13:01 只看该作者 回帖奖励 倒序浏览 阅读模式
最近看到x264意思好像是内置了RESIZE和CROP的功能,但我试了几次都失败,谁给讲讲清楚举个例子。
-vf, --video-filter <filter0>/<filter1>/... Apply video filtering to the input
file
      Available filters:
      crop:left,top,right,bottom
      resize:[width,height][,sar][,fittobox][,csp][,method]
      select_every:step,offset1[,...]
lititude
2楼
发表于 2010-8-9 14:00 只看该作者
  1. >x264 --fullhelp里的filter解释;

  2. Filtering:

  3.       Filter options may be specified in the name=value format
  4. --vf, --video-filter <filter0>/<filter1>/... Apply video filtering to the input file
  5.       Available filters:
  6.       crop:left,top,right,bottom
  7.             removes pixels from the edges of the frame
  8.       resize:[width,height][,sar][,fittobox][,csp][,method]
  9.             resizes frames based on the given criteria:
  10.             - resolution only: resizes and adapts sar to avoid stretching
  11.             - sar only: sets the sar and resizes to avoid stretching
  12.             - resolution and sar: resizes to given resolution and sets the sar
  13.             - fittobox: resizes the video based on the desired contraints
  14.                - width, height, both
  15.             - fittobox and sar: same as above except with specified sar
  16.             simultaneously converting to the given colorspace
  17.             using resizer method ["bicubic"]
  18.              - fastbilinear, bilinear, bicubic, experimental, point,
  19.              - area, bicublin, gauss, sinc, lanczos, spline
  20.       select_every:step,offset1[,...]
  21.             apply a selection pattern to input frames
  22.             step: the number of frames in the pattern
  23.             offsets: the offset into the step to select a frame
  24.             see: http://avisynth.org/mediawiki/Select#SelectEvery
复制代码
-vf 滤镜1:参数1,参数2[,参数3...][/滤镜2...]

滤镜名称和参数之间用冒号,不同参数之间用逗号分开,滤镜之间用斜杠隔开。

举个例子:
  1. --vf crop:8,0,8,0/resize:640,480,,,,lanczos
复制代码
首先左右各切8,再用lanczos算法rezie到640x480

小黑屋手机版NMM视频技术

GMT+8, 2026-10-11 12:23 , Processed in 0.022693 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.