Page 1 of 1
Memory usage increasing when rtp streaming without mux
Posted: 16 Jul 2014 11:02
by vukia
Hi all,
I've tested this issue from 2.0.x up to 2.1.3,
I use vlm to create a rtsp streaming, the source is a h.264 rtsp ip camera.
When didn't set any mux, after several days(usually 2 days it will happen), it will suddenly increase memory usage from 30mb to 400mb and continuing increasing until crash.
If I set the rtsp streaming "mux = ts", it works normally over 40 days.
Thanks any help, because I need camera sound, but ts can't
Re: Memory usage increasing when rtp streaming without mux
Posted: 16 Jul 2014 17:07
by vukia
I've trace the rtp.c source code, it seems use "es" muxer if no mux has been set.
Besides, even the memory is increasing, the streaming is working and cpu usage doesn't increase work load, just memory problem.
If I try to lookup source codes about es muxer, which file should I notice?
Thanks alot
Re: Memory usage increasing when rtp streaming without mux
Posted: 16 Jul 2014 19:27
by Rémi Denis-Courmont
Err what? Without muxer, the RPT output does not use a muxer at all, period.
Re: Memory usage increasing when rtp streaming without mux
Posted: 17 Jul 2014 04:20
by vukia
I didn't found any error, function is working, but the memory suddenly increasing 400k~800k per second after unknown condition happen.
Usually race this condition after two days.
The same environment but set "mux=ts", didn't have any problem.
I'm tracing rtp.c files now, hope I can find something there
Re: Memory usage increasing when rtp streaming without mux
Posted: 17 Jul 2014 19:30
by Rémi Denis-Courmont
I'd guess some queue, possibly the RTP output thread, is filling up faster than it gets flushed.
Re: Memory usage increasing when rtp streaming without mux
Posted: 21 Jul 2014 05:29
by vukia
Thanks for your reply,
I traced the rtp.c source code, maybe this issue is in p_buffer block release and packetize:
if (id->b_first_packet)
{
id->b_first_packet = false;
if (!strcmp(id->rtp_fmt.ptname, "vorbis") ||
!strcmp(id->rtp_fmt.ptname, "theora"))
rtp_packetize_xiph_config(id, id->rtp_fmt.fmtp,
p_buffer->i_pts);
}
if( id->rtp_fmt.pf_packetize( id, p_buffer ) )
break;
block_Release( p_buffer );
p_buffer = p_next;
}
Re: Memory usage increasing when rtp streaming without mux
Posted: 29 Nov 2016 09:21
by vukia
This issue seems still exists in the latest version, does anyone can give me some hint to solve this problem?
Because if I set mux to ts, the audio from IP camera (mlaw) is gone....
Thanks for any help~