<div dir="ltr">I am trying to get the start and duration from a file (a few 1000 of them once I get the first one working)<br><br><div><a href="http://a-vinter.com/Capture0001.mov">http://a-vinter.com/Capture0001.mov</a><br><br>import os<br><br>from gi.repository import Gst <br>from gi.repository import GObject<br>GObject.threads_init()<br>Gst.init(None)<br> <br>from gi.repository import GstPbutils<br><br>pathname = "Capture0001.mov"<br>discoverer = GstPbutils.Discoverer()<br>d = discoverer.discover_uri('file://' + os.path.abspath(pathname))<br><br> <br> d = discoverer.discover_uri('file://' + os.path.abspath(pathname))<br>GLib.Error: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12)<br><br><br>$ gst-inspect-1.0 qtdemux <br>Factory Details:<br> Rank primary (256)<br> Long-name QuickTime demuxer<br> Klass Codec/Demuxer<br> Description Demultiplex a QuickTime file into audio and video streams<br> Author David Schleef <<a href="mailto:ds@schleef.org">ds@schleef.org</a>>, Wim Taymans <<a href="mailto:wim@fluendo.com">wim@fluendo.com</a>><br><br>Plugin Details:<br> Name isomp4<br> Description ISO base media file format support (mp4, 3gpp, qt, mj2)<br> Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstisomp4.so<br> Version 1.4.5<br> License LGPL<br> Source module gst-plugins-good<br> Source release date 2014-12-18<br> Binary package GStreamer Good Plugins (Ubuntu)<br> Origin URL <a href="https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0">https://launchpad.net/distros/ubuntu/+source/gst-plugins-good1.0</a><br><br>GObject<br> +----GInitiallyUnowned<br> +----GstObject<br> +----GstElement<br> +----GstQTDemux<br><br>Pad Templates:<br> SINK template: 'sink'<br> Availability: Always<br> Capabilities:<br> video/quicktime<br> video/mj2<br> audio/x-m4a<br> application/x-3gp<br><br> SRC template: 'video_%u'<br> Availability: Sometimes<br> Capabilities:<br> ANY<br><br> SRC template: 'audio_%u'<br> Availability: Sometimes<br> Capabilities:<br> ANY<br><br> SRC template: 'subtitle_%u'<br> Availability: Sometimes<br> Capabilities:<br> ANY<br><br><br>Element Flags:<br> no flags set<br><br>Element Implementation:<br> Has change_state() function: gst_qtdemux_change_state<br><br>Element has no clocking capabilities.<br>Element has no URI handling capabilities.<br><br>Pads:<br> SINK: 'sink'<br> Implementation:<br> Has chainfunc(): 0x7f4eda708870<br> Has custom eventfunc(): 0x7f4eda708900<br> Has custom queryfunc(): gst_pad_query_default<br> Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default<br> Pad Template: 'sink'<br><br>Element Properties:<br> name : The name of the object<br> flags: readable, writable<br> String. Default: "qtdemux0"<br> parent : The parent of the object<br> flags: readable, writable<br> Object of type "GstObject"<br><br>Element Signals:<br> "pad-added" : void user_function (GstElement* object,<br> GstPad* arg0,<br> gpointer user_data);<br> "pad-removed" : void user_function (GstElement* object,<br> GstPad* arg0,<br> gpointer user_data);<br> "no-more-pads" : void user_function (GstElement* object,<br> gpointer user_data);<br><br><br><br>$ mediainfo Capture0001.mov <br>General<br>Complete name : Capture0001.mov<br>Format : QuickTime<br>Format/Info : Original Apple specifications<br>File size : 1.43 GiB<br>Duration : 3mn 37s<br>Overall bit rate mode : Constant<br>Overall bit rate : 56.3 Mbps<br>Encoded date : UTC 2015-04-26 20:16:04<br>Tagged date : UTC 2015-04-26 20:16:04<br>Writing library : Apple QuickTime<br><br>Video<br>ID : 1<br>Format : ProRes<br>Format version : Version 0<br>Format profile : Proxy<br>Codec ID : apco<br>Duration : 3mn 37s<br>Bit rate mode : Constant<br>Bit rate : 37.9 Mbps<br>Width : 1 248 pixels<br>Original width : 1 280 pixels<br>Height : 702 pixels<br>Original height : 720 pixels<br>Display aspect ratio : 16:9<br>Frame rate mode : Constant<br>Frame rate : 50.000 fps<br>Color space : YUV<br>Chroma subsampling : 4:2:2<br>Scan type : Progressive<br>Bits/(Pixel*Frame) : 0.864<br>Stream size : 982 MiB (67%)<br>Writing library : bmd1<br>Language : English<br>Encoded date : UTC 2015-04-26 20:16:04<br>Tagged date : UTC 2015-04-26 20:16:04<br>Color primaries : BT.709<br>Transfer characteristics : BT.709<br>Matrix coefficients : BT.709<br>matrix_coefficients_Original : BT.709<br><br>Audio<br>ID : 2<br>Format : PCM<br>Format settings, Endianness : Little<br>Format settings, Sign : Signed<br>Codec ID : lpcm<br>Duration : 3mn 37s<br>Bit rate mode : Constant<br>Bit rate : 18.4 Mbps<br>Channel(s) : 16 channels<br>Sampling rate : 48.0 KHz<br>Bit depth : 24 bits<br>Stream size : 478 MiB (33%)<br>Language : English<br>Encoded date : UTC 2015-04-26 20:16:04<br>Tagged date : UTC 2015-04-26 20:16:04<br><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Carl K<br><br></div></div></div></div></div>
</div></div>