GNOME Bugzilla – Bug 615160
Use of mpegvideoparse returns erroneous stream info
Last modified: 2011-05-24 08:16:43 UTC
Using following test filestream : gst-launch-0.10.exe videotestsrc num-buffers=100 ! videorate ! video/x-raw-rgb,framerate=15/1 ! queue ! ffmpegcolorspace ! ffenc_mpeg2video quantizer=4 pass=2 gop-size=0 ! mpegtsmux ! filesink location=test.ts sync=0 I expect to read the file and gets its framerate (15) and correct timestamps for buffers. Using following reading pipeline: gst-launch-0.10.exe filesrc location=test.ts ! decodebin ! fakesink -v can be replaced (looking for created elements) by: gst-launch-0.10.exe filesrc location=test.ts ! mpegtsdemux ! mpegvideoparse ! ffdec_mpeg2video ! fakesink -v which gives as output: /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1 ... Setting pipeline to PLAYING ... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < (115200 bytes, timestamp: none, duration: 0:00:00.000000000, offset: -1, offset_end: -1, flags: 0) 00BAB378" New clock: GstSystemClock /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < (115200 bytes, timestamp: 0:00:00.000000000, duration: 0:00:00.000000000, offset: -1, offset_end: -1, flags: 0) 00BAB6E8" ... One can see that framerate is seen as 30/1, not 15/1, and first buffer has no timestamp, second has timestamp 0... Using exact inverse pipeline as writer gives: gst-launch-0.10.exe filesrc location=test.ts ! mpegtsdemux ! ffdec_mpeg2video ! fakesink -v /GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1 ... Setting pipeline to PLAYING ... /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < (115200 bytes, timestamp: 0:00:00.000000000, duration: 0:00:00.000000000, offset: -1, offset_end: -1, flags: 0) 00BAD4D0" New clock: GstSystemClock /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* < (115200 bytes, timestamp: 0:00:00.066655555, duration: 0:00:00.000000000, offset: -1, offset_end: -1, flags: 0) 00BAD528" ... Here we can see that framerate and buffer timestamps are correct. There is thus a problem using mpegvideoparse elements (in decodebin or as pipeline element).
This seems to be fixed now somewhere, I get correct (and the same) timestamps and durations with and without mpegvideoparse pipelines.