『漫游』酷论坛>『影音数码技术学习交流』>【请教】dshow2raw 2pass  ..
【请教】dshow2raw 2pass 写码遇到的问题
HDvideo@2009-06-21 10:04
我搞了几天的反交错,看到dshow2raw+ffdshow方案很不错,不过我想一压就几十个小时,平时用GUI,现在换成命令行不知道如何 暂停、停止、设置程序优先级(想留些CPU上网、通过任务管理器那个设置不行) 
x264.exe -o I:\HDTV\a.mkv I:\HDTV\a.mpg --keyint 250 --bframes 3 --b-pyramid --ref 4 --filter 0,0 --bitrate 3000 --vbv-maxrate 6000 --qpmin 10 --qpmax 51 --ratetol 1.0 --pass 2  --qcomp 1.0 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --direct auto --weightb --merange 16 --me umh --subme 5 --mixed-refs --8x8dct --trellis 1 --sar 1:1 --level 5.1 --progress --no-psnr --no-ssim --threads auto
补充:但是怎么一气呵成压 2 pass呢?
是不是要先压pass 1完了以后,要再手动加载pass 2?
那么假如想达到比较好的质量是不是就要为pass 1和pass 2分别写两条代码呢,还是只需要用一条代码,然后改--pass *这个参数呢?
能不能在1st的时候只输出.log文件,不要在I:\HDTV\下面真的生成一个a.mkv,因为我只想到了2nd才输出a.mkv
264768502@2009-06-21 10:24
为什么任务管理器不行?
暂停的话,可以按键盘上的 Pause 键(不过好像不能暂停太长时间,不然就回不去了)
停止么,直接关闭命令行,或者关闭进程都可
HDvideo@2009-06-21 10:36
引用 
最初由 264768502 发布
为什么任务管理器不行?
暂停的话,可以按键盘上的 Pause 键(不过好像不能暂停太长时间,不然就回不去了)
停止么,直接关闭命令行,或者关闭进程都可 
可能我的问题,假如压片时用任务管理器的优先级,CPU是下来了,但是有时会蓝屏死机~~
我会在出门时压片,有时回来后又想看片,一停就一两个小时,这样的话 暂停 会出错吗,还回得去吗?
264768502@2009-06-21 10:42
任务管理器不行的话,试试看直接以低优先级运行程序
start/low x264.exe
暂停的问题我没具体测试过能多长,反正我这里超过半个小时就回不去了..所以都是低优先级来运行,只要你看片不是100%CPU,边压边看也可以的
HDvideo@2009-06-21 10:55
引用 
最初由 264768502 发布
任务管理器不行的话,试试看直接以低优先级运行程序
start/low x264.exe
暂停的问题我没具体测试过能多长,反正我这里超过半个小时就回不去了..所以都是低优先级来运行,只要你看片不是100%CPU,边压边看也可以的 
因为不把压片停下来,看片那个会没有图像的,可能是同一个解码器的问题,我一会再试一下~
roozhou@2009-06-21 13:34
停止Ctrl+C即可,直接关可能有问题
你用的什么解码器?播放器呢?
暂停的话直接在命令行里用鼠标点一下就行,按回车继续
HDvideo@2009-06-21 19:52
x264.exe -o I:\HDTV\a.mkv I:\HDTV\a.mpg 1280x720 --pass 2 -B/--bitrate 3000 --vbv-maxrate 6000 --stats "K:\x264_2pass.log" --progress --keyint 250 --bframes 3 --qpmin 10 --qpmax 51 --no-psnr --mixed-refs --trellis 1 --ref 4 --filter 0,0 --direct auto --me umh --no-ssim --level 5.1 -w/--weightb --b-pyramid -A/--analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --threads auto -8/--8x8dct -m/--subme 5 --sar 1:1 --b-rdo --bime --qcomp 1.0 --merange 16 --ratetol 1.0
请问我哪里写错了,为什么dshow2raw总是显示invalid option,我的片源1080 mpg,想压成720 mkv
roozhou@2009-06-21 19:58
x264 --longhelp > x264.txt
打开x264.txt,然后看看你哪些参数里面是没有的
HDvideo@2009-06-21 20:05
引用 
最初由 roozhou 发布
x264 --longhelp > x264.txt
打开x264.txt,然后看看你哪些参数里面是没有的 
一些基本的格式都有了,新参数不需要,所以不加,一些默认就行了,所以也不加,其他参数参照置顶的x264参数帖
HDvideo@2009-06-21 20:07
引用 
最初由 roozhou 发布
x264 --longhelp > x264.txt
打开x264.txt,然后看看你哪些参数里面是没有的 
看得我眼都花了,应该提取哪些信息呢?是不是上面要求的都要加呢?有些我只需要默认是不是也要加呢?
- x264 core:67 r1163
- Syntax: x264 [options] -o outfile infile [widthxheight]
- 
- Infile can be raw YUV 4:2:0 (in which case resolution is required),
-   or YUV4MPEG 4:2:0 (*.y4m),
-   or AVI or Avisynth if compiled with AVIS support (yes).
-   or any file that can be rendered in DirectShow.
- Outfile type is selected by filename:
-  .264 -> Raw bytestream
-  .mkv -> Matroska
-  .mp4 -> MP4 if compiled with GPAC support (yes)
- 
- Options:
- 
-  -h, --help                 List the more commonly used options
-      --longhelp             List all options
- 
- Frame-type options:
- 
-  -I, --keyint          Maximum GOP size [250]
-  -i, --min-keyint      Minimum GOP size [6]
-      --no-scenecut          Disable adaptive I-frame decision
-      --scenecut        How aggressively to insert extra I-frames [40]
-  -b, --bframes         Number of B-frames between I and P [0]
-      --b-adapt              Adaptive B-frame decision method [1]
-                                Higher values may lower threading efficiency.
-                                - 0: Disabled
-                                - 1: Fast
-                                - 2: Optimal (slow with high --bframes)
-      --b-bias          Influences how often B-frames are used [0]
-      --b-pyramid            Keep some B-frames as references
-      --no-cabac             Disable CABAC
-  -r, --ref         Number of reference frames [1]
-      --no-deblock           Disable loop filter
-  -f, --deblock  Loop filter AlphaC0 and Beta parameters [0:0]
-      --interlaced           Enable pure-interlaced mode (tff)
-      --tff                  Alias for --interlaced
-      --bff                  Enable pure-interlaced mode (bff)
- 
- Ratecontrol:
- 
-  -q, --qp              Set QP (0=lossless) [26]
-  -B, --bitrate         Set bitrate (kbit/s)
-      --crf           Quality-based VBR (nominal QP)
-      --vbv-maxrate     Max local bitrate (kbit/s) [0]
-      --vbv-bufsize     Enable CBR and set size of the VBV buffer (kb) [0]
-      --vbv-init      Initial VBV buffer occupancy [0.9]
-      --qpmin           Set min QP [10]
-      --qpmax           Set max QP [51]
-      --qpstep          Set max QP step [4]
-      --ratetol       Allowed variance of average bitrate [1.0]
-      --ipratio       QP factor between I and P [1.40]
-      --pbratio       QP factor between P and B [1.30]
-      --chroma-qp-offset  QP difference between chroma and luma [0]
-      --aq-mode         AQ method [1]
-                                - 0: Disabled
-                                - 1: Variance AQ (complexity mask)
-      --aq-strength   Reduces blocking and blurring in flat and
-                             textured areas. [1.0]
-                                - 0.5: weak AQ
-                                - 1.5: strong AQ
-  -p, --pass <1|2|3>         Enable multipass ratecontrol
-                                - 1: First pass, creates stats file
-                                - 2: Last pass, does not overwrite stats file
-                                - 3: Nth pass, overwrites stats file
-      --stats        Filename for 2 pass stats ["x264_2pass.log"]
-      --qcomp         QP curve compression: 0.0 => CBR, 1.0 => CQP [0.60]
-      --cplxblur      Reduce fluctuations in QP
-                             (before curve compression) [20.0]
-      --qblur         Reduce fluctuations in QP
-                             (after curve compression) [0.5]
-      --zones //... Tweak the bitrate of some regions of the video
-                             Each zone is of the form
-                                 ,,
-                                 where 
-                                     q= (force QP)
-                                 or  b= (bitrate multiplier)
-      --qpfile       Force frametypes and QPs for some or all frames
-                             Format of each line: framenumber frametype QP
-                             QP of -1 lets x264 choose. Frametypes: I,i,P,B,b.
- 
- Analysis:
- 
-  -A, --partitions   Partitions to consider ["p8x8,b8x8,i8x8,i4x4"]
-                                - p8x8, p4x4, b8x8, i8x8, i4x4
-                                - none, all
-                                 (p4x4 requires p8x8. i8x8 requires --8x8dct.)
-      --direct       Direct MV prediction mode ["spatial"]
-                                - none, spatial, temporal, auto
-  -w, --weightb              Weighted prediction for B-frames
-      --me           Integer pixel motion estimation method ["hex"]
-                                - dia: diamond search, radius 1 (fast)
-                                - hex: hexagonal search, radius 2
-                                - umh: uneven multi-hexagon search
-                                - esa: exhaustive search
-                                - tesa: hadamard exhaustive search (slow)
-      --merange         Maximum motion vector search range [16]
-      --mvrange         Maximum motion vector length [-1 (auto)]
-      --mvrange-thread  Minimum buffer between threads [-1 (auto)]
-  -m, --subme           Subpixel motion estimation and mode decision [6]
-                                - 0: fullpel only (not recommended)
-                                - 1: SAD mode decision, one qpel iteration
-                                - 2: SATD mode decision
-                                - 3-5: Progressively more qpel
-                                - 6: RD mode decision for I/P-frames
-                                - 7: RD mode decision for all frames
-                                - 8: RD refinement for I/P-frames
-                                - 9: RD refinement for all frames
-      --psy-rd               Strength of psychovisual optimization ["1.0:0.0"]
-                                #1: RD (requires subme>=6)
-                                #2: Trellis (requires trellis, experimental)
-      --mixed-refs           Decide references on a per partition basis
-      --no-chroma-me         Ignore chroma in motion estimation
-  -8, --8x8dct               Adaptive spatial transform size
-  -t, --trellis     Trellis RD quantization. Requires CABAC. [0]
-                                - 0: disabled
-                                - 1: enabled only on the final encode of a MB
-                                - 2: enabled on all mode decisions
-      --no-fast-pskip        Disables early SKIP detection on P-frames
-      --no-dct-decimate      Disables coefficient thresholding on P-frames
-      --nr          Noise reduction [0]
-      --deadzone-inter  Size of the inter luma quantization deadzone [21]
-      --deadzone-intra  Size of the intra luma quantization deadzone [11]
-                                Deadzones should be in the range 0 - 32.
-      --cqm          Preset quant matrices ["flat"]
-                                - jvt, flat
-      --cqmfile      Custom quant matrices from a JM-compatible file
-                                Overrides any other --cqm* options.
-      --cqm4           Set all 4x4 quant matrices
 
-                                Takes a comma-separated list of 16 integers.
-      --cqm8           Set all 8x8 quant matrices
 
-                                Takes a comma-separated list of 64 integers.
-      --cqm4i, --cqm4p, --cqm8i, --cqm8p
-                             Set both luma and chroma quant matrices
-      --cqm4iy, --cqm4ic, --cqm4py, --cqm4pc
-                             Set individual quant matrices
- 
- Video Usability Info (Annex E):
- The VUI settings are not used by the encoder but are merely suggestions to
- the playback equipment. See doc/vui.txt for details. Use at your own risk.
- 
-      --overscan     Specify crop overscan setting ["undef"]
-                                - undef, show, crop
-      --videoformat  Specify video format ["undef"]
-                                - component, pal, ntsc, secam, mac, undef
-      --fullrange    Specify full range samples setting ["off"]
-                                - off, on
-      --colorprim    Specify color primaries ["undef"]
-                                - undef, bt709, bt470m, bt470bg
-                                  smpte170m, smpte240m, film
-      --transfer     Specify transfer characteristics ["undef"]
-                                - undef, bt709, bt470m, bt470bg, linear,
-                                  log100, log316, smpte170m, smpte240m
-      --colormatrix  Specify color matrix setting ["undef"]
-                                - undef, bt709, fcc, bt470bg
-                                  smpte170m, smpte240m, GBR, YCgCo
-      --chromaloc   Specify chroma sample location (0 to 5) [0]
- 
- Input/Output:
- 
-  -o, --output               Specify output file
-      --sar width:height     Specify Sample Aspect Ratio
-      --fps  Specify framerate
-      --seek        First frame to encode
-      --frames      Maximum number of frames to encode
-      --level        Specify level (as defined by Annex A)
-  -v, --verbose              Print stats for each frame
-      --progress             Show a progress indicator while encoding
-      --quiet                Quiet Mode
-      --no-psnr              Disable PSNR computation
-      --no-ssim              Disable SSIM computation
-      --threads         Parallel encoding
-      --thread-input         Run Avisynth in its own thread
-      --non-deterministic    Slightly improve quality of SMP,
-                             at the cost of repeatability
-      --asm             Override CPU detection
-      --no-asm               Disable all CPU optimizations
-      --visualize            Show MB types overlayed on the encoded video
-      --dump-yuv     Save reconstructed frames
-      --sps-id          Set SPS and PPS id numbers [0]
-      --swapuv               Swap UV planes, only available with RAW YUV input
-      --timescale       Manually set pts timescale [auto]
-      --timecode     Specify output timecode file
-      --deldup 
-                             Enable near duplicate frame remover prefilter
-                               :  specify the minimum fps 
-                               : luma threshold [0.8]
-                               ,: if the number of
-                                  8x8 blocks with SAD larger than mbthresh
-                                  exceeds mbmax, it will be considered
-                                  a non-duplicate frame [400,width/10]
-                               : chroma theshold [lthresh*2]
-      --smoothts             Adjust timestamps so that video plays smoothly
-      --ivtc           Enable field matching pre-filter
-                             require YUY2 input from DirectShow
-                                - a: auto
-                                - t: tff
-                                - b: bff
-      --sub          Load a subtitle using VobSub (need vsfilter.dll)
-      --starttime   Start encoding at specified position
-      --endtime     Stop encoding at specified position
-      --versioninfo          Write version information in stream header
-      --aud                  Use access unit delimiters
-      --nal-hrd              Use NAL HRD parameters
-      --pulldown    Use 3:2 pulldown
-                                - 32: TBT,BT,BTB,BT pattern
-                                - 64: triple,double *recommended for 720p
- 
a4840639@2009-06-21 20:35
1280*720......编码器是不能做resize的,只能借助FFDSHOW RAW FILTER
HDvideo@2009-06-21 21:00
引用 
最初由 a4840639 发布
1280*720......编码器是不能做resize的,只能借助FFDSHOW RAW FILTER 
我把1280*720去掉了,并且按顺序把参数排列了,可是依然显示“invalid option -- /”
- x264.exe -o I:\HDTV\a.mkv I:\HDTV\a.mpg --keyint 250 --bframes 3 --b-pyramid --ref 4 --filter 0,0 --bitrate 3000 --vbv-maxrate 6000 --qpmin 10 --qpmax 51 --ratetol 1.0 --pass 2 --qcomp 1.0 -A/--analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --direct auto -w/--weightb --merange 16 --me umh -m/--subme 5 --mixed-refs -8/--8x8dct --trellis 1 --sar 1:1 --level 5.1 --progress --no-psnr --no-ssim --threads auto
a4840639@2009-06-21 21:02
“-B/--bitrate”:这种都错了
“/”符号的意思是要你任选其一
HDvideo@2009-06-21 21:17
引用 
最初由 a4840639 发布
“-B/--bitrate”:这种都错了
“/”符号的意思是要你任选其一 
谢谢啊~OK了,新手就是新手啊!犯了低级错误!
HDvideo@2009-06-21 21:25
我用--pass 2 出现了
using n(某个数值) frames discovered from first pass for eta calculations.
那么就是说要把代码写成--pass 1后,等压完pass 1以后,再把代码换成--pass 2,再手动把stats(.log)文件代进去吗?
但是我想一气呵成(即压完pass 1以后自动接着压pass 2) 压2 pass,有方法吗?
«12»共2页
 | TOP