[gst-devel] Problem with rtpbin usage

amitpandya at itimes.com amitpandya at itimes.com
Thu Aug 5 11:24:34 CEST 2010


Hi all,

I am working on aac streaming application.
I am using "udpsink" to stream the aac frames with the following pipeline,

"gst-launch-0.10 filesrc location=/home/amit/Test_streams/mono/test1_44kHz_longmono.pcm ! myaacencoder samplerate=44100 ! audio/mpeg, mpegversion=4, channels=1, rate=44100 ! rtpmp4gpay ! application/x-rtp, media=audio, payload=127, encoding-name=MPEG4-GENERIC, mode=AAC-hbr ! udpsink host=10.60.5.78 port=5000"

I am able to playback the stream on VLC player without any problem with corrrect timestamp.
My input stream is 45 Seconds long and VLC is showing stream info as below,
Decoded blocks/played buffers = 1954
In this case the pipline gives the "Execution ended after 45396547000 ns."

In same pipeline if i use rtpbin for streaming instead of udpsink using following pipeline,

"gst-launch-0.10 filesrc location=/home/amit/Test_streams/mono/test1_44kHz_longmono.pcm ! myaacencoder samplerate=44100 ! audio/mpeg, mpegversion=4, channels=1, rate=44100 ! rtpmp4gpay ! application/x-rtp, media=audio, payload=127, encoding-name=MPEG4-GENERIC, mode=AAC-hbr ! rtpbin destinations=10.60.5.78:5000 localport=5000"

pipeline is running much much faster and VLC is not able to play the full stream.
In this case VLC is only playing 8 seconds stream with stream info as below,
Decoded blocks/played buffers = 357
In this case the pipline gives the "Execution ended after 4266499000 ns."

In both the case their is no buffer lost.
But if you notice, pipeline Execution time in case of "rtpbin" is around 10 times faster  than in the case of "udpsink" (45396547000 ns is aroung 10 times more than 4266499000 ns) 
Can anyone tell me why i am getting such behavior?what diffrence it will make in streaming if rtpbin is used instead of udpsink?

I tried putting "queue" in between the pipeline but same problem is their.
Do I need to slow down the pipeline processing by putting the delay(sleep) in either "aacencoder" or in  "packetizer"?
If yes how can i calculate the exact delay required for diffrent sample-rate aac streams?   

Any help will be very much appreciated.

Thanks.




More information about the gstreamer-devel mailing list