Administrator
|
I have a buffer probe on the src pad of a capsfilter. In the callback I print out each buffer's timestamp. The data is demuxed from a matroska contaner file and represents a recorded mjpeg
Here is a sample of the listing where x is a counter incremented as each new frame is processed: x = 1482 ---> 4237392448l x = 1483 ---> 4269392448l x = 1484 ---> 7425152l x = 1485 ---> 40425152l x = 1486 ---> 75425152l x = 1487 ---> 208425152l x = 1488 ---> 240425152l x = 1489 ---> 274425152l x = 1490 ---> 309425152l Are the frames really this badly out of order? Are the timestamps reliable? Is there a pipe element that I need to add after the demuxer to reorder the frames? Wes |
Hi ,
It would be better if you print timestamp is GST_TIME_FORMAT.
On Tue, Jun 8, 2010 at 10:28 PM, Wes Miller <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Wes Miller
On Tue, 2010-06-08 at 09:58 -0700, Wes Miller wrote:
> I have a buffer probe on the src pad of a capsfilter. In the callback I > print out each buffer's timestamp. The data is demuxed from a matroska > contaner file and represents a recorded mjpeg > > Here is a sample of the listing where x is a counter incremented as each new > frame is processed: > x = 1482 ---> 4237392448l > x = 1483 ---> 4269392448l > x = 1484 ---> 7425152l > x = 1485 ---> 40425152l > x = 1486 ---> 75425152l > x = 1487 ---> 208425152l > (snip) > Are the frames really this badly out of order? Are the timestamps reliable? > Is there a pipe element that I need to add after the demuxer to reorder the > frames? MJPEG streams should not have out-of-order timestamps. Two things to check: 1. Are the timestamps in the file really what you think? Maybe you are just printing the timestamps incorrectly? gst-launch-0.10 -v filesink location=... ! matroskademux name=d \ d.video_0 ! fakesink 2. Are feeding buffers with good timestamps into matroskamux in the first place? Check by looking at the debug log, or add an identity element into a gst-launch pipeline and use gst-launch -v to make it print the timestamps of buffers passing through. Cheers -Tim ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Administrator
|
In reply to this post by Sudarshan Bisht
>> Hi ,
>> It would be better if you print timestamp is GST_TIME_FORMAT. Ok, here is the same set of samples in the requested format. C-code reads: g_print( "x = %d ---> "GST_TIME_FORMAT" \n", x, GST_TIME_ARGS( GST_BUFFER_TIMESTAMP( buffer ))); x = 1482 ---> u:00:00.000000055 x = 1483 ---> u:00:00.000000055 x = 1484 ---> u:00:00.000000055 x = 1485 ---> u:00:00.000000055 x = 1486 ---> u:00:00.000000055 x = 1487 ---> u:00:00.000000056 x = 1488 ---> u:00:00.000000056 x = 1489 ---> u:00:00.000000056 x = 1490 ---> u:00:00.000000056 x = 1491 ---> u:00:00.000000056 x = 1492 ---> u:00:00.000000056 Ok, they're in order, apparently, but this output is still weird; The saved video is 1 minute in length and the printed timestamps show there are about 27 frames per second as expected. However, why is the rightmost field of the timestamps showing seconds? Shouldn't those be nanoseconds? Wes Wes |
Administrator
|
On Tue, 2010-06-08 at 11:35 -0700, Wes Miller wrote:
> > g_print( "x = %d ---> "GST_TIME_FORMAT" \n", x, > GST_TIME_ARGS( GST_BUFFER_TIMESTAMP( buffer ))); Correct version:"x = %d ---> %"GST_TIME_FORMAT" \n" ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Administrator
|
In reply to this post by Wes Miller
Edward,
Thanks for the proofreading/lesson. I didn't quite understand the doc to mean I'd need the "%". My timestamps are correct now. Tim, thanks for the reminder on using identity. Thanks to Edward Hervey and Sudarshan Bisht for the additional help. Everything is correct now. Correct format was: g_print( "x = %d ---> % "GST_TIME_FORMAT" \n", x, GST_TIME_ARGS( GST_BUFFER_TIMESTAMP( buffer ))); Wes |
Free forum by Nabble | Edit this page |