如何在Windows命令行中运行命令集

时间:2020-02-24 14:38:01

标签: windows command-line ffmpeg

x264-preset用于第二个命令(Cmd 2)。是替代还是?

命令1:

x264-preset:
vcodec=libx264
thread_type=slice
slices=1
profile=baseline
level=32
preset=superfast
tune=zerolatency
intra-refresh=1
crf=15
x264-params=vbv-maxrate=5000:vbv-bufsize=1:slice-max-size=1500:keyint=60

命令2

$ ffmpeg -r 30 -f dshow -i video="devicename" -pix_fmt yuv420p -an -vpre
x264-preset -f mpegts udp://127.0.0.1:8888

我运行Cmd 1时不起作用。即使使用SET,例如:

x264-preset:
SET vcodec=libx264
SET thread_type=slice
SET slices=1
SET profile=baseline
SET level=32
SET preset=superfast
SET tune=zerolatency
SET intra-refresh=1
SET crf=15
SET x264-params=vbv-maxrate=5000:vbv-bufsize=1:slice-max-size=1500:keyint=60

来源: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2016-January/030127.html

1 个答案:

答案 0 :(得分:1)

您似乎正在尝试执行自定义preset file的内容。要将其作为普通命令运行:

ffmpeg -framerate 30 -f dshow -i video="devicename" -pix_fmt yuv420p -an -vcodec libx264 -thread_type slice -slices 1 -profile:v baseline -level 32 -preset superfast -tune zerolatency -intra-refresh 1 -crf 15 -x264-params vbv-maxrate=5000:vbv-bufsize=1:slice-max-size=1500:keyint=60 -f mpegts udp://127.0.0.1:8888