消费器:cbrts
- 目录
插件信息
title: CBR MPEG2-TS
media types:
Audio Video
description: 恒定码率 MPEG-2 传输流(Transport Stream)
version: 2
creator: Dan Dennedy
copyright: Copyright (C) 2010-2015 Broadcasting Center Europe S.A. http://www.bce.lu (opens in a new tab)
license: GPLv2
说明
在该消费器上设置的所有属性,除少数关键运行属性(如 real_time 和 terminate_on_pause)外,都会传递给被封装的 avformat 消费器 - 无需特殊前缀。虽然某些 avformat 属性可以接受 "k" 后缀,但该消费器要求 "muxrate" 且并 不理解 "k" 后缀;因此,请以字节每秒指定该值。 目前流始终输出到 STDOUT。
你可以重写并插入表段(table section)到传输流中。如果你 选择重写 PMT 段,则需要了解 libavformat 如何给各基本流设置 PID。 目前,视频流为 256 (0x100),音频流从 257 开始并依次递增。 有一组约定的属性名用于把 .sec 文件传给消费器。 约定如下: si.<section>.file=<filename.sec> si.<section>.pid=<number> si.<section>.time=<milliseconds> <section> 可以是任意内容,但通常为:pat、sdt、nit、eit 等。 "pat," "pmt," 和 "sdt" 是特殊的,提供它们时会使 libavformat 对应的段被过滤掉并替换为你提供的段。你应当始终对 NIT 使用 PID 16,对 SDT 使用 17, 当然,对 PAT 使用 0;PMT 可以是任意值,但 libavformat 使用 4095 (0xfff)。 time 属性表示插入该段的频率 - 每 N 毫秒一次。
参数
muxrate
type: integer
readonly: no
required: no
unit: bytes/second
udp.rtprio
title: 实时优先级
description:
设为有效值时,使网络输出线程以实时策略和优先级运行,其中 1 为最低,99 为最高。
type: integer
readonly: no
required: no
minimum: 1
maximum: 99
udp.address
title: UDP 地址
description:
如果提供了 IP 地址,则通过 UDP 发送该流,而不是输出到 STDOUT。
type: string
readonly: no
required: no
udp.port
title: UDP 端口
type: integer
readonly: no
required: no
minimum: 0
default: 1234
udp.ttl
title: 组播 TTL
description:
组播的存活时间(time-to-live)值控制组播可以经过多少个路由跳数。
type: integer
readonly: no
required: no
minimum: 0
maximum: 255
udp.reuse
title: 重用套接字地址
description:
未提供时,套接字以重用地址选项打开。将其设为 0 可禁用该行为。
type: boolean
readonly: no
required: no
default: 1
udp.sockbufsize
title: 套接字缓冲区大小
type: integer
readonly: no
required: no
minimum: 1
unit: bytes
udp.nb_tsp
title: 每个 UDP 包的 TS 包数
type: integer
readonly: no
required: no
minimum: 0
maximum: 7
default: 7
udp.buffer
title: 最多缓冲的 IP 包数
type: integer
readonly: no
required: no
minimum: 100
default: 1000
udp.rtp
title: 使用 RTP
type: boolean
readonly: no
required: no
default: 1
udp.rtp_ssrc
title: RTP 同步源
description:
默认是一个随机数,但你可以覆盖它。
type: integer
readonly: no
required: no
udp.interface
title: 组播接口名称
description:
通常组播接口由系统上配置的 IP 路由表选择,但用此项可能更方便。它接受形如 "eth0" 的名称。
type: string
readonly: no
required: no