Timestamp issue with audio/video playback when using mpegtsdemux

krupa krupa.gopal at gmail.com
Tue Aug 6 07:30:25 PDT 2013


Hi,

I'm using the following pipeline 
gst-launch-0.10 filesrc location=test2.ts ! video/mpegts ! mpegtsdemux
name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! decodebin  !
ffmpegcolorspace ! ximagesink demux. ! queue max-size-buffers=0
max-size-time=0 ! dvdlpcmdec ! alsasink 

I have one test1.ts in which PTS values for each for the audio and video
packets are set and another test2.ts where some of the video packets(almost
alternating) don't have PTS values set. The pipeline works for test1.ts but
doesn't work for test2.ts. When running test2.ts, the screen just displays
one video frame and just hangs and I'm not able to hear any audio.

If I use filesink instead of audio and video sinks, its able to dump both
audio and video and I'm able to decode them later and play them out
separately.

If for the same pipeline I add sync=false at both the audio and video sinks,
both audio and video are able to play out but are not in sync with each
other.

When PTS value is not there in the packet, mpegtsdemux sets,

time = GST_CLOCK_TIME_NONE;
GST_BUFFER_TIMESTAMP(buffer) = time;

before doing the gst_pad_push of the buffer.

Is this setting of GST_BUFFER_TIMESTAMP to GST_CLOCK_TIME_NONE causing the
problem? How should the timestamp be handled when PTS value is not set in
the packet?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Timestamp-issue-with-audio-video-playback-when-using-mpegtsdemux-tp4661457.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list