首页 > 解决方案 > -b 标志未在 FFMpeg 中解释

问题描述

我正在尝试通过 ffmpeg 将文件循环到两个 rtp 端口。当我运行此命令时,我收到以下错误:

Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (rtp://127.0.0.1:49152) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.

ffmpeg -y -re -stream_loop -1 -i ./demovideo.m4v -r 24 -s 1280x720 -c:v libvpx -minrate 3M -maxrate 3M -b:v 3M -c:a libopus -map 0:a:0 -f rtp -c 复制 rtp://127.0.0.1:49152 -map 0:v:0 -f rtp -c 复制 rtp://127.0.0.1:49154?pkt_size=1012

我已指定 b 标志表示带有“-b:v”的视频。我错过了什么?

标签: ffmpeg

解决方案


-c copyafter-f rtp覆盖-c:vand-c:a选项。将它-c:v libvpx放在您当前的命令之前。

请参阅此处了解期权放置如何生效。


推荐阅读