[FFmpeg-user] Nut + ZMQ + rawvideo
Andriy Gelman
andriy.gelman at gmail.com
Mon Nov 9 04:36:38 EET 2020
On Thu, 5 Nov 2020 at 22:41, Andriy Gelman <andriy.gelman at gmail.com> wrote:
> Hi Sergei,
>
> On Wed, 04. Nov 13:09, Online video wrote:
> > Hi,
> >
> >
> > I want to distribute uncompressed video to multiple separate processes
> > using Nut format and ZMQ protocol.
> >
> >
> > The first distributing process works for me without problems:
> >
> > *c:\ff\ffmpeg.exe -i "source_link" -c:v rawvideo -c:a pcm_s16le -f nut
> > "zmq:tcp://127.0.0.1:11111 <http://127.0.0.1:11111/>"*
> >
> > [image: image.png]
> >
> >
> > But I cannot accept this stream, the receiving process does not start:
> >
> > *\ffmpeg.exe -f nut -i "zmq:tcp://127.0.0.1:11111
> > <http://127.0.0.1:11111/>" -c:v libx264 -preset:v fast -b:v 8000k
> -maxrate
> > 8000k -bufsize 8000k -bf 2 -g 50 -keyint_min 50 -c:a aac -b:a 128k -f
> > mpegts "udp://127.0.0.1:22222?pkt_size=1316
> > <http://127.0.0.1:22222/?pkt_size=1316>"*
> >
> > [image: image.png]
> > After press CTRL-C:
> > [image: image.png]
> >
> > What can you advise to solve this problem? Perhaps, instead of NUT, there
> > is another container format that allows you to transfer uncompressed
> > streaming video to multiple recipients?
> >
>
> It looks that the headers in the nut container are not repeated often
> enough.
> So if they are missed by the subscriber, the stream will not start to play.
>
> I think it should be possible to periodically repeat the headers. I'll
> have a
> look and send the patch to the mailing list.
>
> --
> Andriy
>
I've sent some patches to the mailing list that add an option to
periodically repeat the headers in nut:
https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=2709
With the series, the following works for me:
./ffmpeg -i /dev/video0 -codec:v rawvideo -f nut -header_period 15
zmq:tcp://127.0.0.1:10000
./ffplay -f nut -i zmq:tcp://127.0.0.1:10000
Let me know if you can also test.
--
Andriy
More information about the ffmpeg-user
mailing list