GNOME Bugzilla – Bug 642356
[Index] review api and add an example
Last modified: 2011-02-24 13:42:42 UTC
Created attachment 180876 [details] [review] WIP for better index docs Imho the index api is not useful for applications as it is now. For a start I like to docuement it better and add a test app that demonstrates how to use it. The only thing I found so far is: gst-plugins-bad/tests/examples/indexing/indexmpeg.c
Created attachment 180877 [details] [review] WIP for an index example Please look at the FIXME comments and let me know how it can be done better.
Created attachment 180879 [details] [review] WIP for better index docs
The GstIndex API is also not very good for bindings
Created attachment 181136 [details] [review] WIP for better index docs
(In reply to comment #3) > The GstIndex API is also not very good for bindings Can you be more specific. It would be nice to atleast have some FIXME: about it in the code.
Created attachment 181138 [details] [review] WIP for an index example This is now comming nice together and I was wondering if that would make a nice addition to gst-launch (add a -i, --index option). Example output: $ ./index file:///home/ensonic/Videos/TheChubbChubbs.mp4 indexing file:///home/ensonic/Videos/TheChubbChubbs.mp4... id 1 describes writer GstQTDemux id 1, GstQTDemux stats total time = 0:05:27.640000000 number of frames = 23550 number of keyframes = 15536 keyframe rate = 1,515834 min keyframe gap = 0:00:00.000000000 avg keyframe gap = 0:00:00.021031135 max keyframe gap = 0:00:00.021354167
Created attachment 181146 [details] [review] WIP for an index example Improve the output.
(In reply to comment #5) > (In reply to comment #3) > > The GstIndex API is also not very good for bindings > > Can you be more specific. It would be nice to atleast have some FIXME: about it > in the code. Sure, I hope I still have my notes somewhere... otherwise I'll try to find some time to write everything down again this weekend. Creating the GstIndex bindings was very annoying for C# and IIRC the Vala bindings are not optimal yet either because of the same problems.
Created attachment 181210 [details] [review] WIP for an index example Any comments about the idea to add this to gst-launch?
Created attachment 181441 [details] [review] add index support in gst-launch now added to gst-launch. Example output (sorry partly german local) below. ... Execution ended after 258579345031 ns. Leitung wird auf PAUSIERT gesetzt ... Leitung wird auf BEREIT gesetzt ... Index statistics id 1, GstAviDemux total time = 0:04:20.020050000 frame/keyframe rate = 13059 / 6621 = 1,972361 min/avg/max keyframe gap = 0:00:00.000000000, 0:00:00.039005640, 0:00:00.500000000 id 2, GstAviDemux.video_00 total time = 0:04:20.000000000 frame/keyframe rate = 6501 / 63 = 103,190476 min/avg/max keyframe gap = 0:00:00.040000000, 0:00:03.409494099, 0:00:12.000000000 id 3, GstMpegAudioParse no stats id 4, GstAviDemux.audio_00 total time = 0:04:20.020050000 frame/keyframe rate = 6558 / 6558 = 1,000000 min/avg/max keyframe gap = 0:00:00.000050000, 0:00:00.039723930, 0:00:00.500000000 id 5, GstMad total time = 0:04:19.700050000 frame/keyframe rate = 9943 / 0 = - Leitung wird auf NULL gesetzt ... ...
Comment on attachment 181210 [details] [review] WIP for an index example we go for the gst-launch one
Comment on attachment 181441 [details] [review] add index support in gst-launch Commit include man-page update. commit 88cda9893948efca11290bc2656532b994a98718 Author: Stefan Kost <ensonic@users.sf.net> Date: Mon Feb 21 11:24:45 2011 +0200 gst-launch: add index support When option "-i" is given, set an index object on the pipeline and compute statistics for all index writers. Print a sumary when shutting down the pipeline.