A problem in playing a streamed H264 video over a network

ibrahim suliman iss_kh at yahoo.com
Mon Sep 26 14:47:55 PDT 2011


Hello,
 
I have written a C application for streaming H.264 encoded videos, and this command describes it:
 
gst-launch v4l2src ! videorate ! video/x-raw-yuv,width=176,height=144,framerate=15/1
! ffmpegcolorspace ! x264enc bitrate=64 cabac=false ! udpsink
host=127.0.0.1 port=8991
and I have written a C application which can receive, decode and display the streamed video, and this command describes it:
 
gst-launch udpsrc caps = "video/x-h264, width=(int)176, height=(int)144, framerate=(fraction)15/1, codec_data=(buffer)014d401effe10018674d401e92540501ed8088000003000800000301e078b17501000468ee3c80, stream-format=(string)avc" multicast-group=127.0.0.1 port=8991 ! h264parse ! ffdec_h264 ! ffmpegcolorspace ! autovideosink
It is working perfectly using the "gst-launch", but when I implement it in a C application, it did not working for me and let me descibe what I am thinking is the problem:
the "caps" property should be included for the "udpsrc" element in order to get the H.264 video displayed. This "caps" property has different parameters as follows:
 
filtercaps =gst_caps_new_simple ("video/x-h264",
  "width",G_TYPE_INT,176,
  "height",G_TYPE_INT,144,
  "framerate",GST_TYPE_FRACTION,15,1,         
"codec_data", ........!!!!!!!!!!, 014d401effe10018674d401e92540501ed8088000003000800000301e078b17501000468ee3c80,
"stream-format", G_TYPE_STRING, "avc",
NULL);
 
as yuo can see, the problem is that "codec_data" should be of type (buffer) and I am not sure how to deal with this type of value. So, please help in this....
 
Cheers
 
Ibra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110926/6ee5e35b/attachment.htm>


More information about the gstreamer-devel mailing list