Error when sending rtp stream to stdout

*nix specific usage questions
baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Error when sending rtp stream to stdout

Postby baboom » 08 Jun 2012 10:32

Hi all,
I'm using vlc 1.1.9 on an ubuntu 11.04 machine.
I'm trying to get an rtp stream and send it to stdout where it will be used by asterisk for a music on hold application.
Some time ago i got it working but now I started a new machine and I can't really remember what I did... :?
The command I'm running is:

Code: Select all

vlc-wrapper rtp://@:5004 --sout=#transcode{acodec=ulaw,ab=64,samplerate=8000,channels=1}:std{access=file,mux=raw,dst=-}
(I'm sure I haven't changed this)
But when the audio is played on the softphones, there's a repeated noise while the song can be "recognized" in the background.

Here are the messages shown by VLC:

Code: Select all

... rtp warning: too many RTP sessions rtp debug: removing RTP source (86c13faf) main debug: removing module "mpeg_audio" main debug: killing decoder fourcc `mpga', 0 PES in FIFO main debug: removing a sout input (sout_input:0x9857838) main debug: TIMER encoding audio frame : 0.003 ms - Total 4.134 ms / 1449 intvls (Avg 0.003 ms) main debug: removing module "mpeg_audio" main debug: removing module "avcodec" main debug: Filter 0x986708c removed from chain main debug: removing module "mpgatofixed32" main debug: Filter 0x9859214 removed from chain main debug: removing module "ugly_resampler" main debug: Filter 0x9b536a4 removed from chain main debug: removing module "simple_channel_mixer" main debug: Filter 0x98a26bc removed from chain main debug: removing module "audio_format" mux_dummy debug: removing input main warning: no more input streams for this mux main debug: Program doesn't contain anymore ES main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "mpeg_audio" main debug: TIMER module_need() : 0.153 ms - Total 0.153 ms / 1 intvls (Avg 0.153 ms) main debug: thread (decoder) created at priority 5 (input/decoder.c:301) rtp debug: added RTP source (a80ac5e2) main debug: thread started mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 main debug: adding a new sout input (sout_input:0x9867410) stream_out_transcode debug: creating audio transcoding from fcc=`mpga' to fcc=`ulaw' main debug: looking for decoder module: 30 candidates main debug: using decoder module "mpeg_audio" main debug: TIMER module_need() : 0.360 ms - Total 0.360 ms / 1 intvls (Avg 0.360 ms) main debug: looking for encoder module: 12 candidates avcodec debug: libavcodec already initialized avcodec debug: found encoder PCM MU-LAW main debug: using encoder module "avcodec" main debug: TIMER module_need() : 0.735 ms - Total 0.735 ms / 1 intvls (Avg 0.735 ms) stream_out_transcode debug: Looking for filter (mpga->s16l, channels 2->1, rate 44100->8000) main debug: looking for audio filter module: 13 candidates mpgatofixed32 debug: mpga->f32l, bits per sample: 0 main debug: using audio filter module "mpgatofixed32" main debug: TIMER module_need() : 0.080 ms - Total 0.080 ms / 1 intvls (Avg 0.080 ms) main debug: Filter 'mpgatofixed32' (0x986708c) appended to chain main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "ugly_resampler" main debug: TIMER module_need() : 0.073 ms - Total 0.073 ms / 1 intvls (Avg 0.073 ms) main debug: Filter 'ugly_resampler' (0x9859214) appended to chain main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "simple_channel_mixer" main debug: TIMER module_need() : 0.061 ms - Total 0.061 ms / 1 intvls (Avg 0.061 ms) main debug: Filter 'simple_channel_mixer' (0x98755fc) appended to chain main debug: looking for audio filter module: 13 candidates audio_format debug: f32l->s16l, bits per sample: 32->16 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.063 ms - Total 0.063 ms / 1 intvls (Avg 0.063 ms) main debug: Filter 'audio_format' (0x983f244) appended to chain stream_out_transcode debug: Got complete audio filter chain main debug: adding a new input mux_dummy debug: adding input mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 mpgatofixed32 debug: libmad error: bad main_data_begin pointer mpgatofixed32 debug: libmad error: bad main_data_begin pointer rtp warning: 4 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost rtp warning: 9 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun ...
and it goes on and on showing these last messages...

Could anybody tell me how to fix this?
Thank you!!
Ben.

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

Re: Error when sending rtp stream to stdout

Postby Rémi Denis-Courmont » 08 Jun 2012 11:39

Looks like there is too heavy packet loss or reordering on the network.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Re: Error when sending rtp stream to stdout

Postby baboom » 08 Jun 2012 12:25

but I'm streaming and getting the audio on the same machine... :(

I tried doing the same but without asterisk and in that case I get no error messages... so the problem must be somewhere between VLC and Asterisk... When writing to stdout or when reading from stdin...

It's quite strange...

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

Re: Error when sending rtp stream to stdout

Postby Rémi Denis-Courmont » 08 Jun 2012 14:16

No. Something is clearly wrong with the RTP sender or the network, given the large number of RTP-related warnings.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

baboom
Blank Cone
Blank Cone
Posts: 50
Joined: 17 Oct 2011 09:13

Re: Error when sending rtp stream to stdout

Postby baboom » 08 Jun 2012 14:41

this is what I'm sending:

Code: Select all

:sout=#rtp{dst=192.168.1.221,port=5004} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep
just for trying I'm streaming from the same machine as the asterisk is running so network should not be an issue (I hope!)
and this is the messages I get:

Code: Select all

main debug: looking for services probe module: 9 candidates main debug: no services probe module matching "any" could be loaded main debug: TIMER module_need() : 7.038 ms - Total 7.038 ms / 1 intvls (Avg 7.038 ms) qt4 debug: Sorting by column -1, order 0 qt4 debug: Sorting by column -1, order 0 main debug: control type=3 mpeg_audio debug: emulated startcode (no startcode on following frame) mpeg_audio debug: emulated startcode mpeg_audio debug: emulated startcode (no startcode on following frame) mpeg_audio debug: emulated startcode mpeg_audio debug: emulated startcode mpeg_audio debug: emulated startcode (no startcode on following frame) mpeg_audio debug: emulated startcode (no startcode on following frame) main debug: Buffering 0% main debug: Buffering 8% main debug: Buffering 17% main debug: Buffering 26% main debug: Buffering 34% main debug: Buffering 43% main debug: Buffering 52% main debug: Buffering 60% main debug: Buffering 69% main debug: Buffering 78% main debug: Buffering 87% main debug: Buffering 95% main debug: Stream buffering done (313 ms in 0 ms) main debug: Decoder buffering done in 2 ms main debug: EOF reached main debug: finished input main debug: removing module "mpeg_audio" main debug: killing decoder fourcc `mpga', 0 PES in FIFO main debug: removing a sout input (sout_input:0x8807ee8) main debug: removing module "mpeg_audio" main debug: removing module "es" main debug: removing module "stream_filter_record" main debug: removing module "filesystem" main debug: Program doesn't contain anymore ES main debug: thread ended main debug: dead input main debug: repeating item main debug: starting new item main debug: creating new input thread main debug: Creating an input for 'Streaming' main debug: thread (input) created at priority 10 (input/input.c:220) main debug: thread started main debug: reusing sout main debug: you probably want to use gather stream_out main debug: using timeshift granularity of 50 MiB main debug: using timeshift path '/tmp' main debug: `/home/traintic/Music/beethoven.mp3' gives access `' demux `' path `/home/traintic/Music/beethoven.mp3' main debug: creating demux: access='' demux='' path='/home/traintic/Music/beethoven.mp3' main debug: looking for access_demux module: 8 candidates main debug: no access_demux module matching "any" could be loaded main debug: TIMER module_need() : 0.164 ms - Total 0.164 ms / 1 intvls (Avg 0.164 ms) main debug: creating access '' path='/home/traintic/Music/beethoven.mp3' main debug: looking for access module: 7 candidates vcd debug: trying .cue file: /home/traintic/Music/beethoven.cue vcd debug: could not find .cue file filesystem debug: opening file `/home/traintic/Music/beethoven.mp3' main debug: using access module "filesystem" main debug: TIMER module_need() : 0.309 ms - Total 0.309 ms / 1 intvls (Avg 0.309 ms) main debug: Using AStream*Stream main debug: pre buffering main debug: received first data after 0 ms main debug: pre-buffering done 1024 bytes in 0s - 76923 KiB/s main debug: looking for stream_filter module: 5 candidates main debug: no stream_filter module matching "any" could be loaded main debug: TIMER module_need() : 0.054 ms - Total 0.054 ms / 1 intvls (Avg 0.054 ms) main debug: looking for stream_filter module: 1 candidate main debug: using stream_filter module "stream_filter_record" main debug: TIMER module_need() : 0.046 ms - Total 0.046 ms / 1 intvls (Avg 0.046 ms) main debug: creating demux: access='' demux='' path='/home/traintic/Music/beethoven.mp3' main debug: looking for demux module: 52 candidates es debug: detected format mpga main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "mpeg_audio" main debug: TIMER module_need() : 0.063 ms - Total 0.063 ms / 1 intvls (Avg 0.063 ms) main debug: using demux module "es" main debug: TIMER module_need() : 0.163 ms - Total 0.163 ms / 1 intvls (Avg 0.163 ms) main debug: starting in async mode main debug: looking for meta reader module: 2 candidates lua debug: Trying Lua scripts in /home/traintic/.local/share/vlc/lua/meta/reader lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader main debug: no meta reader module matching "any" could be loaded main debug: TIMER module_need() : 0.611 ms - Total 0.611 ms / 1 intvls (Avg 0.611 ms) main debug: `/home/traintic/Music/beethoven.mp3' successfully opened mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 main debug: selecting program id=0 main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "mpeg_audio" main debug: TIMER module_need() : 0.061 ms - Total 0.061 ms / 1 intvls (Avg 0.061 ms) main debug: thread (decoder) created at priority 5 (input/decoder.c:301) qt4 debug: IM: Deleting the input main debug: TIMER input launching for 'Streaming' : 161.414 ms - Total 161.414 ms / 1 intvls (Avg 161.414 ms) main debug: thread started main debug: Buffering 0% main debug: switching to sync mode main debug: Buffering 8% main debug: Buffering 17% main debug: Buffering 26% main debug: Buffering 34% main debug: Buffering 43% main debug: Buffering 52% main debug: Buffering 60% main debug: Buffering 69% main debug: Buffering 78% main debug: Buffering 87% main debug: Buffering 95% main debug: Stream buffering done (313 ms in 0 ms) mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 main debug: adding a new sout input (sout_input:0x8789bc8) stream_out_rtp debug: maximum RTP packet size: 1400 bytes main debug: net: connecting to [192.168.1.221]:5004 main debug: net: connecting to [192.168.1.221]:5005 from [192.168.1.221]:59066 stream_out_rtp debug: sdp= v=0 o=- 15239177430566428365 15239177430566428365 IN IP4 ubuntu s=Unnamed i=N/A c=IN IP4 192.168.1.221 t=0 0 a=tool:vlc 1.1.9 a=recvonly a=type:broadcast a=charset:UTF-8 m=audio 5004 RTP/AVP 14 b=AS:128 b=RR:0 a=rtpmap:14 MPA/90000/2 main debug: Decoder buffering done in 0 ms qt4 debug: IM: Setting an input
I can't see any problem here...

and as for the receiver:

Code: Select all

application=/usr/bin/vlc-wrapper rtp://@:5004 --sout=#transcode{acodec=ulaw,ab=64,channels=1,samplerate=8000}:file{mux=raw,dst=-}
and the messages:

Code: Select all

rtp debug: removing RTP source (22c04981) main debug: removing module "mpeg_audio" main debug: killing decoder fourcc `mpga', 0 PES in FIFO main debug: removing a sout input (sout_input:0x86aa1f0) main debug: TIMER encoding audio frame : 0.002 ms - Total 8.074 ms / 1249 intvls (Avg 0.006 ms) main debug: removing module "mpeg_audio" main debug: removing module "avcodec" main debug: Filter 0x862936c removed from chain main debug: removing module "mpgatofixed32" main debug: Filter 0x86b3e9c removed from chain main debug: removing module "ugly_resampler" main debug: Filter 0x86b41d4 removed from chain main debug: removing module "simple_channel_mixer" main debug: Filter 0x85d0f3c removed from chain main debug: removing module "audio_format" mux_dummy debug: removing input main warning: no more input streams for this mux main debug: Program doesn't contain anymore ES main debug: looking for packetizer module: 21 candidates main debug: using packetizer module "mpeg_audio" main debug: TIMER module_need() : 0.192 ms - Total 0.192 ms / 1 intvls (Avg 0.192 ms) main debug: thread (decoder) created at priority 5 (input/decoder.c:301) rtp debug: added RTP source (6dae8305) main debug: thread started mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 main debug: adding a new sout input (sout_input:0x85aa2b0) stream_out_transcode debug: creating audio transcoding from fcc=`mpga' to fcc=`ulaw' main debug: looking for decoder module: 30 candidates main debug: using decoder module "mpeg_audio" main debug: TIMER module_need() : 0.389 ms - Total 0.389 ms / 1 intvls (Avg 0.389 ms) main debug: looking for encoder module: 12 candidates avcodec debug: libavcodec already initialized avcodec debug: found encoder PCM MU-LAW main debug: using encoder module "avcodec" main debug: TIMER module_need() : 0.713 ms - Total 0.713 ms / 1 intvls (Avg 0.713 ms) stream_out_transcode debug: Looking for filter (mpga->s16l, channels 2->1, rate 44100->8000) main debug: looking for audio filter module: 13 candidates mpgatofixed32 debug: mpga->f32l, bits per sample: 0 main debug: using audio filter module "mpgatofixed32" main debug: TIMER module_need() : 0.076 ms - Total 0.076 ms / 1 intvls (Avg 0.076 ms) main debug: Filter 'mpgatofixed32' (0x85d0f3c) appended to chain main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "ugly_resampler" main debug: TIMER module_need() : 0.071 ms - Total 0.071 ms / 1 intvls (Avg 0.071 ms) main debug: Filter 'ugly_resampler' (0x8556cf4) appended to chain main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "simple_channel_mixer" main debug: TIMER module_need() : 0.062 ms - Total 0.062 ms / 1 intvls (Avg 0.062 ms) main debug: Filter 'simple_channel_mixer' (0x85c7ddc) appended to chain main debug: looking for audio filter module: 13 candidates audio_format debug: f32l->s16l, bits per sample: 32->16 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.071 ms - Total 0.071 ms / 1 intvls (Avg 0.071 ms) main debug: Filter 'audio_format' (0x8702cb4) appended to chain stream_out_transcode debug: Got complete audio filter chain main debug: adding a new input mux_dummy debug: adding input mpeg_audio debug: MPGA channels:2 samplerate:44100 bitrate:128 mpgatofixed32 debug: libmad error: bad main_data_begin pointer mpgatofixed32 debug: libmad error: bad main_data_begin pointer rtp warning: 6 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 8 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 11 packet(s) lost rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! main warning: trying to send non-dated packet to stream output! rtp warning: 8 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost rtp warning: 11 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 8 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 9 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 8 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 11 packet(s) lost rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 8 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 10 packet(s) lost rtp warning: 11 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 10 packet(s) lost mpgatofixed32 debug: libmad error: Huffman data overrun mpgatofixed32 debug: libmad error: Huffman data overrun main warning: trying to send non-dated packet to stream output! rtp warning: 67 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun rtp warning: 49 packet(s) lost main warning: trying to send non-dated packet to stream output! mpgatofixed32 debug: libmad error: Huffman data overrun mpgatofixed32 debug: libmad error: Huffman data overrun
If I can provide more information just tell me!


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 41 guests