[FFmpeg-devel] [PATCH] avformat: Add AMQP version 0-9-1 protocol support

Jean-Baptiste Kempf jb at videolan.org
Mon Feb 10 07:43:00 EET 2020



On Mon, Feb 10, 2020, at 01:47, Marton Balint wrote:
> 
> On Sun, 9 Feb 2020, Andriy Gelman wrote:
> 
> > On Sun, 09. Feb 22:58, Jean-Baptiste Kempf wrote:
> >> 
> >> 
> >> On Sun, Feb 9, 2020, at 14:32, Timo Rothenpieler wrote:
> >> > On 01.02.2020 20:02, Andriy Gelman wrote:
> >> > > From: Andriy Gelman <andriy.gelman at gmail.com>
> >> > > 
> >> > > Supports connecting to a RabbitMQ broker via AMQP version 0-9-1. The
> >> > > broker can redistribute content to other clients based on "exchange" and
> >> > > "routing_key" fields.
> >> > > ---
> >> > > 
> >> > > Compilation notes:
> >> > > - Requires librabbitmq-dev package (on ubuntu).
> >> > > - The pkg-config libprabbitmq.pc has a corrupt entry.
> >> > >    The line "Libs.private: rt; -lpthread" should be changed to
> >> > >    "Libs.private: -lrt -lpthread". I have made a bug report.
> >> > > - Compile FFmpeg with --enable-librabbitmq
> >> > > 
> >> > > To run an example:
> >> > > #
> >> > > # Start the RabbitMQ broker (I use docker)
> >> > > # The following starts the broker on localhost:5672. A webui is available on
> >> > > # localhost:15672 (User/password is "guest" by default)
> >> > > #
> >> > > $ docker run -it --rm --name rabbitmq -p 127.0.0.1:5672:5672 -p 127.0.0.1:15672:15672 rabbitmq:3-management
> >> > > 
> >> > > #
> >> > > # Stream to the RabbitMQ broker:
> >> > > #
> >> > > $ ./ffmpeg -re -f lavfi -i yuvtestsrc -codec:v libx264 -f mpegts -routing_key "amqp" -exchange "amq.direct" amqp://localhost:5672
> >> > > 
> >> > > #
> >> > > # Connect any number of clients to fetch data from the broker:
> >> > > # The clients are filtered by the routing_key and exchange.
> >> > > #
> >> > > $ ./ffplay -routing_key "amqp" -exchange "amq.direct" amqp://localhost:5672
> >> > > 
> >> > 
> >> > Isn't RabbitMQ, and any message broker like it, more designed to pipe 
> >> > short messages around?
> >> > I'd imagine it's really not designed to shovel huge amounts of data, 
> >> > like a full on video stream, around.
> >
> >> 
> >> Tbh, it's not a standard protocol for multimedia. It's not a format either.
> >> 
> >
> > Sure, I understand it's quite niche. 
> >
> >> I have a hard time seeing what this is doing in libavformat.
> >>
> 
> Just because it is not common, I don't think it is stupid to use message 
> brokers for distributing video/audio content. Message brokers are general 
> purpose.

Oh, I very well understand the reason, and nowhere did I say it was stupid.
First, because it is not stupid, and then, because that would be a blatant violation of the conducts I'd like to see in this project.

I just am not sure the place to write this code is in libavformat and not in either the tools, or in the client app.

And again, that's just my opinion.

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the ffmpeg-devel mailing list