首页 > 解决方案 > 如何在 Windows 命令行中运行命令集

问题描述

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

标签: windowscommand-lineffmpeg

解决方案


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

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

推荐阅读