diff options
author | Andriy Gelman <andriy.gelman@gmail.com> | 2020-03-08 17:25:31 -0400 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2020-03-09 22:07:17 +0100 |
commit | 1676d0fb25c6851d0750ed6926b8205ed20973eb (patch) | |
tree | 8e7d868dd46f562904e0e1147241ca9e8d8e2340 /doc | |
parent | d99f3dc6b211509d9f6bbb82bbb59bff86a9e3a5 (diff) | |
download | ffmpeg-1676d0fb25c6851d0750ed6926b8205ed20973eb.tar.gz |
avformat: Add AMQP version 0-9-1 protocol support
Supports connecting to a RabbitMQ broker via AMQP version 0-9-1.
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/general.texi | 1 | ||||
-rw-r--r-- | doc/protocols.texi | 60 |
2 files changed, 61 insertions, 0 deletions
diff --git a/doc/general.texi b/doc/general.texi index 87eaad7791..3684847ac1 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -1331,6 +1331,7 @@ performance on systems without hardware floating point support). @multitable @columnfractions .4 .1 @item Name @tab Support +@item AMQP @tab X @item file @tab X @item FTP @tab X @item Gopher @tab X diff --git a/doc/protocols.texi b/doc/protocols.texi index 54a287f488..27df4759b6 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -51,6 +51,66 @@ in microseconds. A description of the currently available protocols follows. +@section amqp + +Advanced Message Queueing Protocol (AMQP) version 0-9-1 is a broker based +publish-subscribe communication protocol. + +FFmpeg must be compiled with --enable-librabbitmq to support AMQP. A separate +AMQP broker must also be run. An example open-source AMQP broker is RabbitMQ. + +After starting the broker, an FFmpeg client may stream data to the broker using +the command: + +@example +ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@@]hostname[:port] +@end example + +Where hostname and port (default is 5672) is the address of the broker. The +client may also set a user/password for authentication. The default for both +fields is "guest". + +Muliple subscribers may stream from the broker using the command: +@example +ffplay amqp://[[user]:[password]@@]hostname[:port] +@end example + +In RabbitMQ all data published to the broker flows through a specific exchange, +and each subscribing client has an assigned queue/buffer. When a packet arrives +at an exchange, it may be copied to a client's queue depending on the exchange +and routing_key fields. + +The following options are supported: + +@table @option + +@item exchange +Sets the exchange to use on the broker. RabbitMQ has several predefined +exchanges: "amq.direct" is the default exchange, where the publisher and +subscriber must have a matching routing_key; "amq.fanout" is the same as a +broadcast operation (i.e. the data is forwarded to all queues on the fanout +exchange independent of the routing_key); and "amq.topic" is similar to +"amq.direct", but allows for more complex pattern matching (refer to the RabbitMQ +documentation). + +@item routing_key +Sets the routing key. The default value is "amqp". The routing key is used on +the "amq.direct" and "amq.topic" exchanges to decide whether packets are written +to the queue of a subscriber. + +@item pkt_size +Maximum size of each packet sent/received to the broker. Default is 131072. +Minimum is 4096 and max is any large value (representable by an int). When +receiving packets, this sets an internal buffer size in FFmpeg. It should be +equal to or greater than the size of the published packets to the broker. Otherwise +the received message may be truncated causing decoding errors. + +@item connection_timeout +The timeout in seconds during the initial connection to the broker. The +default value is rw_timeout, or 5 seconds if rw_timeout is not set. + +@end table + @section async Asynchronous data filling wrapper for input stream. |