Seeking when streaming to udpSink

doubledw dwood at mak.com
Tue Sep 27 19:54:28 UTC 2016


Hi,

I have been working to integrate gstreamer into my application for a few
months now but I am still having problems described previously with changing
speed and seeking when playing a video to a udpSink.  My application
supports playing back a video file to a local window and/or to a UDP stream.
When playing the video to a local window, I can change the playback speed
and seek forwards and backwards in a video file and the playback responds
immediately. However, if the playback is sent to the pipeline with a
udpSink, any attempts to change speed or seek forwards or backwards results
in a long pause (greater than 30 seconds) followed by the playback
continuing at a point past where the seek was specified.

Any insight into what is causing the playback to a udpSink to get hung up
when performing a seek would be greatly appreciated. Is it necessary to
perform some sort of reset or offset before making a seek? I tried to pause
and then perform the seek, but that did seem to help.

Here are my pipelines and the diagnostic output from gstreamer:

"This is my pipeline configuration for the udpSink: 

      data.pipeline = gst_parse_launch ("filesrc location=test2.mpeg !
decodebin ! identity single-segment=true ! avenc_mpeg2video ! mpegtsmux !
udpsink host=\"127.0.0.1\" port=5000", NULL); 

This is my pipeline configuration with playbin: 

      data.pipeline = gst_parse_launch ("playbin
uri=file:///C:/gstream/test2.mpeg", NULL); 

This is my seek event (rate=1.0): 

       seek_event = gst_event_new_seek (data->rate, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SKIP, 
         GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_NONE, 0); 

   gst_element_send_event (data->pipeline, seek_event); 


gstreamer diagnostic output after seek in udpSink pipeline is submitted: 

0:00:16.312514219  9348 00000000035D2A40 ERROR                  libav :0::
Invalid pts (0) <= last (378) 
0:00:16.313970803  9348 00000000035D2A40 ERROR                  libav
gstavvidenc.c:706:gst_ffmpegvidenc_handle_frame:<avenc_mpeg2video0>
avenc_mpeg2video: failed to encode buffer 
... 

[and ending with] 

0:00:17.612929299  9348 00000000035D2A40 ERROR                  libav
gstavvidenc.c:706:gst_ffmpegvidenc_handle_frame:<avenc_mpeg2video0>
avenc_mpeg2video: failed to encode buffer 
0:00:17.615227075  9348 00000000035D2A40 ERROR                  libav :0::
Invalid pts (378) <= last (378) 
0:00:17.615642325  9348 00000000035D2A40 ERROR                  libav
gstavvidenc.c:706:gst_ffmpegvidenc_handle_frame:<avenc_mpeg2video0>
avenc_mpeg2video: failed to encode buffer 
0:00:17.621328818  9348 00000000035D2A40 WARN                basesink
gstbasesink.c:3382:gst_base_sink_chain_unlocked:<udpsink0> warning: Internal
data flow problem. 
0:00:17.621889898  9348 00000000035D2A40 WARN                basesink
gstbasesink.c:3382:gst_base_sink_chain_unlocked:<udpsink0> warning: Received
buffer without a new-segment. Assuming timestamps start from 0. "




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Seeking-when-streaming-to-udpSink-tp4678702p4679822.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list