gst-launch rtp problem with filesink and packet loss

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gst-launch rtp problem with filesink and packet loss

Luca Gaggero
Hi all,

I have a problem with a stream audio rtp.
I send from a pc1 to a pc2 a stream rtp with gst-launch, I use codec alaw.

In the sender I use:

gst-launch-0.10 -v filesrc location=./file.wav ! wavparse ! audioconvert
! alawenc ! rtppcmapay ! udpsink host=192.168.1.2 port=5000

In the receiver I use:

gst-launch-0.10 -v udpsrc port=5000 caps="application/x-rtp,
media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMA,
     payload=(int)8" ! rtppcmadepay ! alawdec ! audioconvert !
audioresample ! wavenc  ! filesink location=output.wav sync=false

the stream arrive and if I listening the file output.wav it is correct.



But I need to introduce in the comunication a packet loss.
Now if I repeate the test with a packet loss the file is created, but
the duration of the audio stream is less.
I want to write a silence frame when the packet are missing, as like as
a listener listen in real time the audio stream...

Someone have a solution?
I also write a programm with java media framework but I have the same
problem...


------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-launch rtp problem with filesink and packet loss

Marco Ballesio
Hi,

On Mon, May 24, 2010 at 11:03 PM, Luca Gaggero
<[hidden email]> wrote:
>
> But I need to introduce in the comunication a packet loss.

How (at which ISO/OSI level) are you introducing this packet loss? If
you simply removed a portion of the original file this is the expected
behaviour ;).

> Now if I repeate the test with a packet loss the file is created, but
> the duration of the audio stream is less.
> I want to write a silence frame when the packet are missing, as like as
> a listener listen in real time the audio stream...

If timestamps are preserved correctly and the loss occurred in the
network you should have a silence.. Can you try with a pipeline like
the examples in:

http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-gstrtpbin.html

Regards

>
> Someone have a solution?
> I also write a programm with java media framework but I have the same
> problem...
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel