[gst-devel] Using gstreamer to transmit H264 file over RTP

Farah Akhtar farahakhtar_24c at yahoo.com
Sun May 30 17:55:38 CEST 2010


Hi

I am trying to transmit an H264 file over a network using RTP streaming of gstreamer. My pipeline is:

Sender: 
 gst-launch-0.10  filesrc location=akiyo_qcif.264 ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=42050 sync=false

Receiver: 
gst-launch-0.10 udpsrc port=42050 ! rtph264depay  ! filesink location=/home/mrplus/Desktop/June/test.264

Please note that I am using the loopback address and there should be no packet loss. To verify if my pipeline is working fine and there should be no encoding loss, I used the following pipeline:

gst-launch-0.10  filesrc location=akiyo_qcif.264 ! h264parse ! rtph264pay pt=96 ! rtph264depay !  h264parse  ! filesink location=/home/mrplus/Desktop/June/test2.264

Now, in the first scenario, the sender finishes playing after a time on its own. I have to close the receiver using a Ctrl+C. I get an output file at the receiver that is significantly smaller than the sent file, runs a couple of seconds lesser than the sent file and has worse quality (boxes, blur etc) visually, when played. In the case of the second pipeline, however, the file is the perfect copy of the sent file as expected. I dont understand where is the loss taking place in a loopback address!!! Or else, what am I doing wrong? Is it because of the Ctrl+C and no EOS element on the receiever? What to do?

Is it fine to stream and H264 file like that or do I have to have it in a container like mp4, avi etc. to stream properly?

I attach the output of gst-launch -v for both sender and receiver. Both seem ok to me, no errors.
---------------------------------------------------------------------------------------------------------------------------

Sender:
gst-launch-0.10 -v  filesrc location=akiyo_qcif.264 ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=42050 sync=false
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/pipeline0/h264parse0.src: caps = video/x-h264
/pipeline0/rtph264pay0.sink: caps = video/x-h264
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/pipeline0/rtph264pay0.src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)900033, sprop-parameter-sets=(string)\"Z5AAM64ZGoLE6EAAAAMAQAAADKPGDKg\\=\", payload=(int)96, ssrc=(guint)2945604081, clock-base=(guint)1436723394, seqnum-base=(guint)52331
/pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, profile-level-id=(string)900033, sprop-parameter-sets=(string)\"Z5AAM64ZGoLE6EAAAAMAQAAADKPGDKg\\=\", payload=(int)96, ssrc=(guint)2945604081, clock-base=(guint)1436723394, seqnum-base=(guint)52331
Got EOS from element "pipeline0".
Execution ended after 24871606 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/pipeline0/udpsink0.sink: caps = NULL
/pipeline0/rtph264pay0.sink: caps = NULL
/pipeline0/rtph264pay0.src: caps = NULL
/pipeline0/h264parse0.src: caps = NULL
Setting pipeline to NULL ...
FREEING pipeline ...
-------------------------------------------------------------------------------------------------------------------------------

Receiver: (Interrupt is the Ctrl+C)

gst-launch-0.10 -v udpsrc port=42050 ! rtph264depay  ! filesink location=/home/mrplus/Desktop/June/test11.264
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 1403396440 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...
----------------------------------------------------------------------------------------------------------------------



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100530/bb884a7c/attachment.htm>


More information about the gstreamer-devel mailing list