Memory usage increasing when rtp streaming without mux

About encoding, codec settings, muxers and filter usage
vukia
Blank Cone
Blank Cone
Posts: 28
Joined: 24 Jan 2011 07:03

Memory usage increasing when rtp streaming without mux

Postby vukia » 16 Jul 2014 11:02

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 :(

vukia
Blank Cone
Blank Cone
Posts: 28
Joined: 24 Jan 2011 07:03

Re: Memory usage increasing when rtp streaming without mux

Postby vukia » 16 Jul 2014 17:07

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Memory usage increasing when rtp streaming without mux

Postby Rémi Denis-Courmont » 16 Jul 2014 19:27

Err what? Without muxer, the RPT output does not use a muxer at all, period.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vukia
Blank Cone
Blank Cone
Posts: 28
Joined: 24 Jan 2011 07:03

Re: Memory usage increasing when rtp streaming without mux

Postby vukia » 17 Jul 2014 04:20

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Memory usage increasing when rtp streaming without mux

Postby Rémi Denis-Courmont » 17 Jul 2014 19:30

I'd guess some queue, possibly the RTP output thread, is filling up faster than it gets flushed.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

vukia
Blank Cone
Blank Cone
Posts: 28
Joined: 24 Jan 2011 07:03

Re: Memory usage increasing when rtp streaming without mux

Postby vukia » 21 Jul 2014 05:29

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;
}

vukia
Blank Cone
Blank Cone
Posts: 28
Joined: 24 Jan 2011 07:03

Re: Memory usage increasing when rtp streaming without mux

Postby vukia » 29 Nov 2016 09:21

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~


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 40 guests