分页: 1 / 1

bat脚本,求指教

发表于 : 2014-08-21 10:15
chobit
我写了一个bat脚本,纯小白
想请各位看看,指教一二

代码: 全选

@ECHO OFF & CD/D "%~dp0"
FOR /f "tokens=2 delims='" %%i IN ('findstr "core.ffms2.Source" "%~1"') DO set videoph=%%i
"D:\Program Files (x86)\VapourSynth\core64\vspipe.exe" -y -p "%~1" - | "D:\Program Files (x86)\VapourSynth\x264\x264_64_tMod-10bit-all.exe" --demuxer y4m --bitrate 1800 -o "%~dpn1_video.264" - && "D:\Program Files (x86)\VapourSynth\ffmpeg\bin\ffmpeg.exe" -i "%videoph%" -vn -f wav - | "D:\Program Files (x86)\VapourSynth\qaac\x86\qaac.exe" --tvbr 127 --quality 2 --no-optimize -noreplaygain --ignorelength -o "%~dpn1_audio.m4a" - && "D:\Program Files (x86)\VapourSynth\ffmpeg\bin\ffmpeg.exe" -i "%~dpn1_video.264" -i "%~dpn1_audio.m4a" -vcodec copy -acodec copy "%~dpn1_x264.mp4"
if exist "%~dpn1_video.264" del "%~dpn1_video.264"
if exist "%~dpn1_audio.m4a" del "%~dpn1_audio.m4a"
pause&exit
感觉bat写起来跟linux的sh有点...
本来想写x264_option,qaac_option变量定义压制参数,但%x264_option%放进命令里面,没用....
还有&&这个后面不能换行?
希望大家给点意见,优化一下 {:cat_2}

Re: bat脚本,求指教

发表于 : 2014-08-26 6:13
msg7086
为什么不装个msys然后用shell脚本呢?
为什么不直接用make/rake呢?

Re: bat脚本,求指教

发表于 : 2014-08-26 12:44
chobit
msg7086 写了:为什么不装个msys然后用shell脚本呢?
为什么不直接用make/rake呢?
说的也是,不过我就想用win试试而已

Re: bat脚本,求指教

发表于 : 2014-08-27 1:25
fletin
你还可以试试Python脚本。。。

Re: bat脚本,求指教

发表于 : 2014-08-30 21:08
msg7086
chobit 写了:
msg7086 写了:为什么不装个msys然后用shell脚本呢?
为什么不直接用make/rake呢?
说的也是,不过我就想用win试试而已
我说的这3个,哪个不是win?

Re: bat脚本,求指教

发表于 : 2014-09-03 22:29
chobit
msg7086 写了:
chobit 写了:
msg7086 写了:为什么不装个msys然后用shell脚本呢?
为什么不直接用make/rake呢?
说的也是,不过我就想用win试试而已
我说的这3个,哪个不是win?
抱歉,是我表达有误,嗯