• 2016-06-08:Windows中的bat脚本


    涉及循环嵌套,启用变量延时,算术运算

    @echo off
    setlocal enabledelayedexpansion 
    %路径以及文件名等变量设置%
    set x264_exe=E:democ++x264vs2008_buildinx264.exe
    set encode_basic_option=--fps 20 --profile baseline --tune zerolatency --min-keyint 20 --keyint 30 --no-scenecut
    set input_path=E:videoyuv_640x480
    set output_path=E:videox264
    set name_prefix=video_640x480
    
    
    %同时设置VBV和CRF%
    for /l %%i in (1,1,2) do (
    call :CRF
    )
    goto :eofvbv
    
    :CRF
    for /l %%c in (17,2,19) do (
    call :VBV
    )
    goto :eofvbv
    
    :VBV
    for /l %%v in (100,100,200) do (
    set bufsize=%%v
    set /a bufsize=!bufsize!+!bufsize!/2
    echo %x264_exe% %encode_basic_option% --crf %%c --vbv-maxrate %%v --vbv-bufsize !bufsize!  -o %output_path%%name_prefix%_%%i_crf%%c_vbv%%v.h264 %input_path%%name_prefix%_%%i.yuv
    )
    
    :eofvbv
    @echo off
    
    %路径以及文件名等变量设置%
    set x264_exe=E:democ++x264vs2008_buildinx264.exe
    set encode_basic_option=--fps 20 --profile baseline --tune zerolatency --min-keyint 20 --keyint 30 --no-scenecut
    set input_path=E:videoyuv_640x480
    set output_path=E:videox264
    set name_prefix=video_640x480
    
    %不设置VBV%
    for /l %%i in (1,1,1) do call :CRF %%i
    goto :eofnovbv
    :CRF
    for /l %%c in (17,2,19) do (
       echo %x264_exe% %encode_basic_option% --crf %%c -o %output_path%%name_prefix%_%%i_crf%%c_vbvno.h264 %input_path%%name_prefix%_%%i.yuv
    )
    :eofnovbv
  • 相关阅读:
    第5周作业
    第四周JAVA作业
    第三周JAVA学习
    第二周JAVA学习日志
    有关JAVA学习
    Swift 页面跳转
    Swift 登录判断
    单元测试学习
    WCF学习心得
    初次使用Oracle
  • 原文地址:https://www.cnblogs.com/zhouLee/p/5570372.html
Copyright © 2020-2023  润新知