[FFmpeg-user] Need help to re-stream multicast
Karim SLIMANI
diffusepro at gmail.com
Thu Oct 29 00:34:40 EET 2020
Hello,
i am not sure about PAT and PMT errors. Maybe using mpegts muxer options :
https://ffmpeg.org/ffmpeg-formats.html#mpegts-1
PS: note that fifo_size and overrun_nonfatal are "receiver" only options
and, i think, have no effect on output udp url.
Le mer. 28 oct. 2020 à 18:52, Daniel Dimitrov <596076 at gmail.com> a écrit :
> On Wed, Oct 28, 2020 at 12:56 PM Karim SLIMANI <diffusepro at gmail.com>
> wrote:
>
> > hello,
> >
> > i think you need to increase fifo_size parameter. (remove pkt_size and
> > buffer_size parameters, but keep overrun_nonfatal=1)
> >
> > try a fifo_size=524288 if it continue to crash, then try a value of
> > fifo_size=2621400
> >
> > Circular buffer overrun happen when the computer cannot catch up in
> > processing received data, so increasing the size may help (ie: fifo_size)
> > To understand what is happening here, take a look at
> > https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/udp.c#L500
> >
> > Best regards,
> >
> >
> > Le mar. 27 oct. 2020 à 22:19, Daniel Dimitrov <596076 at gmail.com> a
> écrit :
> >
> > > Dear all,
> > > I try to retransmit multicast stream . I can partially manage to do it
> > > unfortunately some interruptions in the stream appear , Please help me
> to
> > > correctly calculate the parameters for the udp url (fifo_size ,
> > > buffer_size,bitrate, pkt_size) i want to set video bitrate to 3M and i
> am
> > > not sure if i have to do muxrate. Command is here :
> > >
> > > *ffmpeg -i
> > > "udp://@
> > >
> >
> 238.252.250.9:5000?overrun_nonfatal=1&fifo_size=350000&pkt_size=1316&buffer_size=10000000
> > > <
> > >
> >
> http://238.252.250.9:5000?overrun_nonfatal=1&fifo_size=350000&pkt_size=1316&buffer_size=10000000
> > > >"
> > > -vf scale=720:576 -b:v 3M -maxrate 4M -bufsize 8M -b:a 128k
> > > -muxrate 5M -f mpegts
> > > "udp://@
> > >
> >
> 239.253.251.13:5505?overrun_nonfatal=1&fifo_size=350000&pkt_size=188&&buffer_size=2000000&bitrate=5000000
> > > <
> > >
> >
> http://239.253.251.13:5505?overrun_nonfatal=1&fifo_size=350000&pkt_size=188&&buffer_size=2000000&bitrate=5000000
> > > >"*
> > >
> > > i have doubts about most of the udp parameters so please correct me if
> > > anything looks wrong to you.
> > >
> > > *Here is the input stream:*
> > >
> > > Input #0, mpegts, from 'udp://@238.252.250.9:5000':
> > > Duration: N/A, start: 31142.994278, bitrate: N/A
> > > Program 2002
> > > Metadata:
> > > service_name : RT Doc HD
> > > service_provider: GLOBECAST
> > > Stream #0:0[0x7e5]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> > > yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50
> > > tbr, 90k tbn, 50 tbc
> > > Stream #0:1[0x7e6](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
> > > stereo, fltp, 192 kb/s
> > > Stream #0:2[0x7e7](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000
> > Hz,
> > > stereo, fltp, 192 kb/s
> > >
> > >
> > > * If i execute the command above it crashes after 5min with :*
> > >
> > >
> > > [h264 @ 0x6b52480] reference picture missing during reorder
> > > Last message repeated 1 times
> > > [h264 @ 0x6b52480] Missing reference picture, default is 65814
> > > Last message repeated 1 times
> > > [h264 @ 0x6ad5380] reference picture missing during reorder
> > > [h264 @ 0x6ad5380] Missing reference picture, default is 65815
> > > Output #0, mpegts, to 'udp://@
> > >
> > >
> >
> 239.253.251.13:5505?overrun_nonfatal=1&fifo_size=350000&pkt_size=188&&buffer_size=2000000&bitrate=4000000
> > > ':
> > > Metadata:
> > > encoder : Lavf58.45.100
> > > Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45
> > DAR
> > > 16:9], q=2-31, 3000 kb/s, 25 fps, 90k tbn, 25 tbc
> > > Metadata:
> > > encoder : Lavc58.91.100 mpeg2video
> > > Side data:
> > > cpb: bitrate max/min/avg: 4000000/0/3000000 buffer size: 2000000
> > > vbv_delay: N/A
> > > Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
> > > Metadata:
> > > encoder : Lavc58.91.100 mp2
> > > Stream #0:2(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
> > > Metadata:
> > > encoder : Lavc58.91.100 mp2
> > > av_interleaved_write_frame(): Cannot allocate memory:18.08
> > > bitrate=4995.0kbits/s speed=1.01x
> > > Last message repeated 1 times
> > > Error writing trailer of udp://@
> > >
> > >
> >
> 239.253.251.13:5505?overrun_nonfatal=1&fifo_size=350000&pkt_size=188&&buffer_size=2000000&bitrate=4000000
> > > :
> > > Cannot allocate memory
> > > frame= 9427 fps= 25 q=2.8 Lsize= 230612kB time=00:06:18.24
> > > bitrate=4994.6kbits/s speed=1.01x
> > > video:138661kB audio:11807kB subtitle:0kB other streams:0kB global
> > > headers:0kB muxing overhead: 53.263130%
> > > [udp @ 0x682e200] Circular buffer overrun. Surviving due to
> > > overrun_nonfatal option
> > > Last message repeated 121516 times
> > > Conversion failed!
> > > _______________________________________________
> > > ffmpeg-user mailing list
> > > ffmpeg-user at ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
>
> Hi Karim ,
> Thank you for your mail, Setting fifo_size to 2621400 did the job but I
> still have some problems in the stream . I have an analyzer listening for
> the output stream and it shows some errors in PAT and PMT every 30-40sec .
> Tried different parameters and no luck. Please check the photo attached to
> this mail and if any of you guys has any proposal please let me know.
> ffmpeg command:
>
> ffmpeg -i "udp://@238.252.250.9:5000?overrun_nonfatal=1&fifo_size=524288"
> -map 0:0 -vf scale=720:576 -b:v 3M -minrate 3M -maxrate 5M -map 0:2
> -b:a 128k -map -0:1 -muxrate 7M -threads 0 -f mpegts "udp://@
>
> 239.253.251.13:5505?overrun_nonfatal=1&fifo_size=524288&bitrate=7000000&pkt_size=1316
> "
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list