This post was updated on .
Hi All,
My requirement is to stream audio and video. I am using gstreamer to achieve this. I have identified the pipeline for the same and tested it using gst-launch. Playing/Streaming the video is not a problem. I am facing problem only when I stream the audio. I am able to hear the audio on the receiver side but with choppiness. I am using rtpL16pay element to stream the audio. After analysis it is found that , the packets are not been sent at a constant interval. For example, receiver is expecting 512 bytes per packet every 2.66ms. Any one has idea as how to set this property in rtpL16pay? We do not have any control on the receiver side. Thanks in advance. |
Hi,
On Sat, Jul 30, 2011 at 5:10 PM, Hello <[hidden email]> wrote: > Hi All, > > I am streaming audio and video. I have identified the pipeline for the same > and tested it using gst-launch. I am able to stream the audio and able to > hear the audio on the receiver side but with choppiness. > I am using rtpL16pay element to stream the audio. After analysis it is found > that , the packets are not been sent at a constant interval. It's hard to say without more details. What do you mean for "not been sent at constant interval"? A few msecs of jitter are more than normal in common networks, especially considering buffer-bloating. If more, you may have issues with the bandwidth / packets size. Try reducing the sample rate and number of channels as well as the MTU. Regards > Any one of you know to send the rtp packets at a constant interval. > Note: we dont have any control on the receiver side. > > Thanks in advance > > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Audio-and-Video-Streaming-tp3706344p3706344.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Marco,
Thank you so much for your reply. This is the pipeline i am using to stream the audio: gst-launch-0.10 -v filesrc location="/bulk/x.mp3" ! audio/mpeg, mpegversion=1, layer=3 ! decodebin ! audioconvert ! audio/x-raw-int, channels=2, depth=16, width=16, rate=48000, endianness=4321 ! rtpL16pay ptime-multiple=2660000 pt=97 ssrc=0 timestamp-offset=0 seqnum-offset=0 mtu=1000 ! udpsink host=239.1.2.12 port=51000 sync=true qos=true I am suppose to stream 512 bytes/packet at every 2.66ms. Receiver is expecting the packets in that time interval only. How can i acheive that. mtu is used to specify the packet lenght. But if i use mtu=512, it is sending 9 packets with 512 bytes and 10th packet as 120bytes. This pattern continues. Moreover it is sending in a different time intervals, which is causing overrun/underrun issues at the receiver side. Receiver is expecting the packets at a constant time interval, that is 512bytes/packet for every 2.66ms. I used ptime-multiple=2660000 assuming it would satisfy my requirement. But i failed. Audio is streamed with choppiness. Guess receiver is missing some of the packets, which is only causing that choppiness. Is there any way, i can acheive this requiremt?? Thanks in advance. |
Friends,
Any idea on the above said issue?? Any kind of help is appreciated! Thanks in advance. |
In reply to this post by akaChella
On 08/01/2011 05:44 AM, Durga wrote:
<snip> > I used ptime-multiple=2660000 assuming it would satisfy my requirement. But > i failed. Audio is streamed with choppiness. Guess receiver is missing some > of the packets, which is only causing that choppiness. You want to set the min-ptime and max-ptime to 2660000 instead. Wim > Is there any way, i can acheive this requiremt?? > > Thanks in advance. > > > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Audio-and-Video-Streaming-tp3706344p3708847.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I did!! I captured the packets using tcpdump and also in wireshark.. the packets are been sent at a different time intervals...
Any idea??? |
This post was updated on .
In reply to this post by Wim Taymans
Hi Wim Taymans,
This is the pipeline i used for testing: gst-launch-0.10 -v filesrc location="/bulk/MainAgarKahoon.mp3" ! audio/mpeg, mpegversion=1, layer=3 ! decodebin ! audioconvert ! audio/x-raw-int, channels=2, depth=16, width=16, rate=48000, endianness=4321 ! rtpL16pay min-ptime=2660000 max-ptime=2660000 pt=97 ssrc=0 timestamp-offset=0 seqnum-offset=0 ! udpsink host=239.1.2.12 port=51000 sync=true qos=true As you said, i set the min-ptime and max-ptime to 2660000. Here is the tcpdump of the same: 02:26:31.043806 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.053625 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.054672 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.055469 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.056225 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.064933 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.067261 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.068065 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.069060 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.084847 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.085729 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.088052 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.088939 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.094562 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.095563 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.096357 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.097224 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.097965 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.109049 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:31.109934 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 .... .... .... 02:26:35.996443 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:35.997334 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:35.998356 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.006500 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.007477 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.008260 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.009010 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.009897 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.010656 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.011390 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.012218 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.016184 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.025888 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.026864 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.027802 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.028577 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.029319 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.030042 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.031013 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.031775 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.032681 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.041005 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.041883 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.042818 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.043596 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.044393 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.045080 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.056358 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.057227 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.058135 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.066570 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.067439 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 02:26:36.068344 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 From the dump, i could see that the time interval does not seems to be constant..!! Is that anything else i am missing ?? Need your input on this! Thanks in advance. |
Hi,
sorry for replying this late. In my understanding, GStreamer does not provide a mean to fine-grain control the interleave time for output buffers (but maybe some unknown elements can provide such a feature). One possible way to achieve this could be by installing a probe in the sink pad of your udpsink and then force the pipeline to wait there if a packet arrives too early. Indeed, this is an ugly hack but might work for your case. As a last comment, consider that it is extremely hard to control deltas lower than (or even close to) the granularity of the kernel in the system you're using. Tuning the process niceness could also ne needed. Regards On 8/4/11, Durga <[hidden email]> wrote: > Hi Wim Taymens, > > This is the pipeline i used for testing: > > gst-launch-0.10 -v filesrc location="/bulk/MainAgarKahoon.mp3" ! audio/mpeg, > mpegversion=1, layer=3 ! decodebin ! audioconvert ! audio/x-raw-int, > channels=2, depth=16, width=16, rate=48000, endianness=4321 ! rtpL16pay > min-ptime=2660000 max-ptime=2660000 pt=97 ssrc=0 timestamp-offset=0 > seqnum-offset=0 ! udpsink host=239.1.2.12 port=51000 sync=true qos=true > > As you said, i set the min-ptime and max-ptime to 2660000. > > Here is the tcpdump of the same: > > 02:26:31.043806 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.053625 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.054672 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.055469 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.056225 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.064933 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.067261 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.068065 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.069060 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.084847 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.085729 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.088052 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.088939 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.094562 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.095563 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.096357 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.097224 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.097965 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.109049 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:31.109934 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > .... > .... > .... > 02:26:35.996443 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:35.997334 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:35.998356 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.006500 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.007477 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.008260 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.009010 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.009897 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.010656 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.011390 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.012218 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.016184 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.025888 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.026864 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.027802 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.028577 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.029319 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.030042 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.031013 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.031775 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.032681 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.041005 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.041883 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.042818 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.043596 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.044393 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.045080 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.056358 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.057227 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.058135 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.066570 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.067439 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > 02:26:36.068344 IP hst1x9.49147 > 239.1.2.12.51000: UDP, length 520 > > From the dump, i could see that the time interval does not seems to be > constant..!! > > Is that anything else i am missing ?? > > Need your input on this! > > Thanks in advance. > > > > -- > View this message in context: > http://gstreamer-devel.966125.n4.nabble.com/Audio-and-Video-Streaming-tp3706344p3719071.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |