Re: [Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Pierre-Emmanuel Viau
For people who might have a similar problem, here is how I made it work using Dan's solution: import mlt import sys def get_audio_level(frame): # get_waveform provides an easy way to make the audio fetched. frame.get_waveform(160, 120) return frame.get_double('meta.media.audio_level.0

Re: [Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Pierre-Emmanuel Viau
That's great, thank you! I looked into fixing the bindings but I'm afraid that's a bit beyond my comprehension at this moment. On Fri, May 1, 2015 at 2:46 PM, Dan Dennedy wrote: > Alternatively, here is Python snippet from a project I did where I needed > audio levels, but you have to use the

Re: [Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Dan Dennedy
Alternatively, here is Python snippet from a project I did where I needed audio levels, but you have to use the level determined by this filter instead of your own code. Here is docs on the filter: http://www.mltframework.org/bin/view/MLT/FilterAudiolevel This filter is used to drive the peak meter

Re: [Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Pierre-Emmanuel Viau
Ok thanks, I will look into it! Pierre-Emmanuel Viau - Développeur • Software developer 514-943-8053 • pierre-emman...@timecodelab.com 5333 av Casgrain #514, Montréal, Qc, H2T 1X3 On Fri, May 1, 2015 at 2:36

Re: [Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Dan Dennedy
Mlt::Frame::get_audio() does not work in the script/managed-language bindings. See here what we did for get_image(). You need to extend this to get_audio() and build it yourself. If you do, we appreciate if you will contribute the patch that adds it. On Fri, May 1, 2015 at 11:28 AM Pierre-Emmanue

[Mlt-devel] Frame.get_audio using Python

2015-05-01 Thread Pierre-Emmanuel Viau
Hello, I am trying to write a simple test in order to get the audio level at a certain frame. So far I have: import mlt import sys mlt.Factory.init() profile = mlt.Profile( ) prod = mlt.Producer(profile, sys.argv[1]) profile.from_producer(prod) #test i = 172 prod.seek(i) frame = prod.get_frame(