Replay at wrong speed/framerate
Robin Aproskie
raproskie at tellumat.com
Mon Jun 9 07:05:56 PDT 2014
Hi
I am recording an (UDP (RTP (h.264 ) ) ) stream. It streams 50 frames per second interlaced. When I play it back it seems to play at half the speed ie 25 frames per second and takes twice as long to play.
The time stamp info seems to match the duration = 40000000
*******The Record Pipeline Is
pipeline2 = gst_pipeline_new ("REC-pipeline");
source2 = gst_element_factory_make ("udpsrc", NULL);
rtpdepay2 = gst_element_factory_make ("rtph264depay", NULL);
caps = gst_caps_from_string("application/x-rtp,"
"media=(string)video,"
"clock-rate=90000,"
"encoding-name=(string)H264,"
"sprop-parameter-sets=(string)\"J2QAKKwXKgLQSZAA\\,KP4BriwA\"," /*"sprop-parameter-sets=(string)\"J2QAKqwXKgFAFuQA\\,KP4BriwA\","*/
"payload=(int)96,"
"framerate=(string)50/1");
g_object_set (G_OBJECT (source2), "caps", caps, NULL);
g_object_set (G_OBJECT (source2), "address", videoIpAddress, NULL);
g_object_set (G_OBJECT (source2), "port", m_ipPortVideo, NULL);
g_object_set (G_OBJECT (source2), "buffer-size", 65000, NULL);
g_object_set (G_OBJECT (source), "multicast-iface", multicastIF, NULL);
filtercaps = gst_element_factory_make("capsfilter","filter");
caps264 = gst_caps_new_simple ("video/x-h264", \
"stream-format", G_TYPE_STRING, "byte-stream", \
"alignment", G_TYPE_STRING,"nal",NULL, \
"framerate",GST_TYPE_FRACTION, 50, 1, NULL);
g_object_set (G_OBJECT (filtercaps), "caps",caps264, NULL);
filesink = gst_element_factory_make ("filesink", NULL);
g_object_set (G_OBJECT (filesink), "location", "c:\\video.h264", NULL);
gst_bin_add_many (GST_BIN (pipeline2),source2 \
,rtpdepay2
,filtercaps \
,filesink \
,NULL);
gst_element_link ( source2 ,rtpdepay2 );
gst_element_link (rtpdepay2 ,filtercaps);
gst_element_link ( filtercaps ,filesink);
******The play pieline is
qStringToGchar("c:\\video\\" + dirName + "\\" + fileName + ".h264",location,100);
source = gst_element_factory_make ("filesrc", NULL);
g_object_set (G_OBJECT (source), "location", "c:\\video.h264", NULL);
h264parse = gst_element_factory_make ("h264parse", NULL);
queue = gst_element_factory_make ("queue", NULL);
avdec = gst_element_factory_make ("avdec_h264", NULL);
queue2 = gst_element_factory_make ("queue", NULL);
/* Adaptors needed because cairooverlay only supports ARGB data */
autovideoconvert2 = gst_element_factory_make ("videoconvert", NULL);
cairo_overlay = gst_element_factory_make ("cairooverlay", "overlay");
/* If failing, the element could not be created */
g_assert (cairo_overlay);
/* Hook up the neccesary signals for cairooverlay */
g_signal_connect (cairo_overlay, "draw", G_CALLBACK (draw_overlay3), overlay_state);
g_signal_connect (cairo_overlay, "caps-changed",G_CALLBACK (prepare_overlay), overlay_state);
sink = gst_element_factory_make ("d3dvideosink", NULL);
**********************************************************************
Relevant company disclaimers are available at the following addresses:
Tellumat (Pty) Ltd e-mail: mailto:disclaimer at tellumat.com?Subject=Tellumat_Disclaimer
Web: http://www.tellumat.com/email.aspx
**********************************************************************
More information about the gstreamer-devel
mailing list