audio rtp input stream plays short audio sections aftre source stopped
Posted: 01 Jun 2020 17:56
Hello
I wrote a little c# program, using libvlcsharp 3.4.5 and libvlc 3.0.10, that plays incoming rtp audio stream (alaw, 8000Hz, 16bit, mono).
The program works fine and the audio plays well but i have encountered a strange issue.
My program keep running all the time waiting for a source to send audio to it.
After the audio source is stop sending data to my program, I hear section from the audio that sent from the source (a few second of playing) every 80 to 90 seconds although there is no source that sending data.
I do not here such a thing in the VLC player.
Does anybody encounter this problem and can help me avoid it?
my code is very simple:
public LibVLC _libVLC = null;
public MediaPlayer _mp = null;
public Media _media = null;
...
Core.Initialize();
...
_libVLC = new LibVLC();
_mp = new MediaPlayer(_libVLC);
videoView1.MediaPlayer = _mp;//not necessary
_media = new Media(_libVLC, "rtp://@:12016", FromType.FromLocation);
_media.AddOption(":network-caching=1000");
bool res = _mp.Play(_media);
Thank you very much
Roy
I wrote a little c# program, using libvlcsharp 3.4.5 and libvlc 3.0.10, that plays incoming rtp audio stream (alaw, 8000Hz, 16bit, mono).
The program works fine and the audio plays well but i have encountered a strange issue.
My program keep running all the time waiting for a source to send audio to it.
After the audio source is stop sending data to my program, I hear section from the audio that sent from the source (a few second of playing) every 80 to 90 seconds although there is no source that sending data.
I do not here such a thing in the VLC player.
Does anybody encounter this problem and can help me avoid it?
my code is very simple:
public LibVLC _libVLC = null;
public MediaPlayer _mp = null;
public Media _media = null;
...
Core.Initialize();
...
_libVLC = new LibVLC();
_mp = new MediaPlayer(_libVLC);
videoView1.MediaPlayer = _mp;//not necessary
_media = new Media(_libVLC, "rtp://@:12016", FromType.FromLocation);
_media.AddOption(":network-caching=1000");
bool res = _mp.Play(_media);
Thank you very much
Roy