On Tue, Sep 18, 2012 at 10:56 AM, Janne Liljeblad <[email protected]> wrote: > Hi Dan, > > I looked at Shotcut, and saw that is has audio levels monitoring > meter, which no other open source video application has to my > knowledge.
It is based on code from Kdenlive; Kdenlive has the meter you have to turn on in the View menu. > Browsing the code I found that first you have method: > > Player::showAudio(Mlt::Frame* frame) > > which gets audio data from mlt.Frame object and then sends samples to: > > AudioSignal::slotReceiveAudio(const QVector<int16_t>& data, int, > int num_channels, int samples) > > which then calculates a double value to each channel. After that > values are converted to decibels and drawn. > > In principal I could do this in Flowblade using mltFrame.get_audio() > and doing all the same operations, but I'm afraid I'm going to get > killed by Pythons low performance if I try to do this per frame for 10 > channels. > > Would it possible to combine code in Player::showAudio() and > AudioSignal::slotReceiveAudio() audio and drop it to mlt_frame.c, and > then expose this, so I could do something like: > > channel_levels = produce.get_frame().get_channel_levels() > ch1_level, ch2_level = channel_levels > > and then convert to decibels and draw the meters. > > There may be better ways to do this, like calculating decibel values > in mlt_frame.c also, then all the MLT users would get it right. > > Do you think this doable/good idea? Yes, but I am thinking it could be done in a filter, which sets frame properties you would read in the app. The difficulty is the app would have to separate the usage of a filter for this purpose from a filter used for a composition. Comment? -- +-DRD-+ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mlt-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mlt-devel
