Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-05 Thread Michael Niedermayer
On Fri, Nov 04, 2016 at 11:37:24PM +0530, Pallavi Kumari wrote:
> >> ok, do you know how to compute that or should i explain it ?
> 
> Explanation will help. Is there any function in FFmpeg to get absolute
> value of FFT?

hypot() of the 2 real components of each complex value should work

complex numbers are like dots on a paper, if you declare the middle
of the paper as 0, the 2 components are the x and y coordinates of
a complex number and the distance to the 0 point is the absolute
value


> and how to get frequency data?

the data[i] array  after the FFT is so that data[i] are the values
for the frequency i. You may need to permute them though

see libavcodec/tests/fft.c for how exactly the fft relates to a
reference fft

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-04 Thread Pallavi Kumari
>> ok, do you know how to compute that or should i explain it ?

Explanation will help. Is there any function in FFmpeg to get absolute
value of FFT?
and how to get frequency data?


On Fri, Nov 4, 2016 at 11:04 PM, Michael Niedermayer  wrote:

> On Fri, Nov 04, 2016 at 09:01:22PM +0530, Pallavi Kumari wrote:
> > >> The frequency components after a R->C FFT are complex numbers
> > >> the peak values of complex numbers are not the same as the maxima of
> > >> their real components
> > >> did the paper this is based on say anything about what is recommanded
> > >> to take here for the maxima?
> >
> > >> It would seem logic to me to take the magnitude of the complex numbers
> > >> instead of the real components individually, but that may or may not
> > >> be what the paper meant
> > >> not that we have to do what the paper says, we can in fact do
> something
> > >> entirely different if it works better
> >
> > We need points who have high peak intensity(amplitude). Hence, we require
> > amplitude value at frequency points (say x-axis is freq and y is
> > amplitude.) so, I guess taking magnitude of complex numbers is logical.
> > That's how people are using.
>
> ok, do you know how to compute that or should i explain it ?
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> What does censorship reveal? It reveals fear. -- Julian Assange
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-04 Thread Michael Niedermayer
On Fri, Nov 04, 2016 at 09:01:22PM +0530, Pallavi Kumari wrote:
> >> The frequency components after a R->C FFT are complex numbers
> >> the peak values of complex numbers are not the same as the maxima of
> >> their real components
> >> did the paper this is based on say anything about what is recommanded
> >> to take here for the maxima?
> 
> >> It would seem logic to me to take the magnitude of the complex numbers
> >> instead of the real components individually, but that may or may not
> >> be what the paper meant
> >> not that we have to do what the paper says, we can in fact do something
> >> entirely different if it works better
> 
> We need points who have high peak intensity(amplitude). Hence, we require
> amplitude value at frequency points (say x-axis is freq and y is
> amplitude.) so, I guess taking magnitude of complex numbers is logical.
> That's how people are using.

ok, do you know how to compute that or should i explain it ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-04 Thread Pallavi Kumari
>> The frequency components after a R->C FFT are complex numbers
>> the peak values of complex numbers are not the same as the maxima of
>> their real components
>> did the paper this is based on say anything about what is recommanded
>> to take here for the maxima?

>> It would seem logic to me to take the magnitude of the complex numbers
>> instead of the real components individually, but that may or may not
>> be what the paper meant
>> not that we have to do what the paper says, we can in fact do something
>> entirely different if it works better

We need points who have high peak intensity(amplitude). Hence, we require
amplitude value at frequency points (say x-axis is freq and y is
amplitude.) so, I guess taking magnitude of complex numbers is logical.
That's how people are using.


>> This prints the amplitude of the peaks, so if the volume is changed
>> to half, all points change to half
>> Wasnt the paper about the locations of the peaks (which would not
>> change if the volume is changed) ?

(say x-axis is freq and y is amplitude.) We will be creating bins for ex:
0-40, 40-80, 80-120, 120-180, 180-300 frequency values. And for each freq
bin interest is to find a points with highest amplitude.

A example set(interest point) is  37, 72, 120, 158

 From each window an interest point is extracted.


On Fri, Nov 4, 2016 at 6:41 PM, Michael Niedermayer 
wrote:

> On Fri, Nov 04, 2016 at 05:27:34PM +0530, Pallavi Kumari wrote:
> > patch attached.
> >
> > On Fri, Nov 4, 2016 at 3:29 PM, Michael Niedermayer
> 
> > wrote:
> >
> > > On Fri, Nov 04, 2016 at 07:46:34AM +0530, Pallavi Kumari wrote:
> > > > Updated patch attached. PFA
> > > [...]
> > >
> > > >  Makefile|1
> > > >  af_peakpoints.c |  263 ++
> > > ++
> > > >  allfilters.c|1
> > > >  version.h   |2
> > > >  4 files changed, 266 insertions(+), 1 deletion(-)
> > > > 7f6affa8dcb632cdea162553a18ab1489f0783ce  0001-avfilter-added-
> > > peakpoints-filter.patch
> > > > From 46be941c87713f8afee686eed0262ca59a2896fd Mon Sep 17 00:00:00
> 2001
> > > > From: Atana 
> > > > Date: Fri, 4 Nov 2016 07:43:29 +0530
> > > > Subject: [PATCH] avfilter: added peakpoints filter
> > > >
> > > > ---
> > > >  libavfilter/Makefile|   1 +
> > > >  libavfilter/af_peakpoints.c | 263 ++
> > > ++
> > > >  libavfilter/allfilters.c|   1 +
> > > >  libavfilter/version.h   |   2 +-
> > > >  4 files changed, 266 insertions(+), 1 deletion(-)
> > > >  create mode 100644 libavfilter/af_peakpoints.c
> > > >
> > > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> > > > index 7ed4696..1a18902 100644
> > > > --- a/libavfilter/Makefile
> > > > +++ b/libavfilter/Makefile
> > > > @@ -96,6 +96,7 @@ OBJS-$(CONFIG_LADSPA_FILTER) +=
> > > af_ladspa.o
> > > >  OBJS-$(CONFIG_LOUDNORM_FILTER)   += af_loudnorm.o
> > > >  OBJS-$(CONFIG_LOWPASS_FILTER)+= af_biquads.o
> > > >  OBJS-$(CONFIG_PAN_FILTER)+= af_pan.o
> > > > +OBJS-$(CONFIG_PEAKPOINTS_FILTER) += af_peakpoints.o
> > > >  OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
> > > >  OBJS-$(CONFIG_RESAMPLE_FILTER)   += af_resample.o
> > > >  OBJS-$(CONFIG_RUBBERBAND_FILTER) += af_rubberband.o
> > > > diff --git a/libavfilter/af_peakpoints.c
> b/libavfilter/af_peakpoints.c
> > > > new file mode 100644
> > > > index 000..da108ca
> > > > --- /dev/null
> > > > +++ b/libavfilter/af_peakpoints.c
> > > > @@ -0,0 +1,263 @@
> > > > +/*
> > > > + * Copyright (c) 2016 Atana
> > > > + *
> > > > + * This file is part of FFmpeg.
> > > > + *
> > > > + * FFmpeg is free software; you can redistribute it and/or
> > > > + * modify it under the terms of the GNU Lesser General Public
> > > > + * License as published by the Free Software Foundation; either
> > > > + * version 2.1 of the License, or (at your option) any later
> version.
> > > > + *
> > > > + * FFmpeg is distributed in the hope that it will be useful,
> > > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > > > + * Lesser General Public License for more details.
> > > > + *
> > > > + * You should have received a copy of the GNU Lesser General Public
> > > > + * License along with FFmpeg; if not, write to the Free Software
> > > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> > > 02110-1301 USA
> > > > + */
> > > > +
> > > > +#include "libavcodec/avcodec.h"
> > > > +#include "libavcodec/avfft.h"
> > > > +#include "libavformat/avformat.h"
> > > > +#include "libswscale/swscale.h"
> > > > +#include "avfilter.h"
> > > > +#include "audio.h"
> > > > +#include "libavutil/opt.h"
> > > > +
> > > > +#define SIZECHECK 4096
> > > > +
> > > > +/* Structure to contain 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-04 Thread Michael Niedermayer
On Fri, Nov 04, 2016 at 05:27:34PM +0530, Pallavi Kumari wrote:
> patch attached.
> 
> On Fri, Nov 4, 2016 at 3:29 PM, Michael Niedermayer 
> wrote:
> 
> > On Fri, Nov 04, 2016 at 07:46:34AM +0530, Pallavi Kumari wrote:
> > > Updated patch attached. PFA
> > [...]
> >
> > >  Makefile|1
> > >  af_peakpoints.c |  263 ++
> > ++
> > >  allfilters.c|1
> > >  version.h   |2
> > >  4 files changed, 266 insertions(+), 1 deletion(-)
> > > 7f6affa8dcb632cdea162553a18ab1489f0783ce  0001-avfilter-added-
> > peakpoints-filter.patch
> > > From 46be941c87713f8afee686eed0262ca59a2896fd Mon Sep 17 00:00:00 2001
> > > From: Atana 
> > > Date: Fri, 4 Nov 2016 07:43:29 +0530
> > > Subject: [PATCH] avfilter: added peakpoints filter
> > >
> > > ---
> > >  libavfilter/Makefile|   1 +
> > >  libavfilter/af_peakpoints.c | 263 ++
> > ++
> > >  libavfilter/allfilters.c|   1 +
> > >  libavfilter/version.h   |   2 +-
> > >  4 files changed, 266 insertions(+), 1 deletion(-)
> > >  create mode 100644 libavfilter/af_peakpoints.c
> > >
> > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> > > index 7ed4696..1a18902 100644
> > > --- a/libavfilter/Makefile
> > > +++ b/libavfilter/Makefile
> > > @@ -96,6 +96,7 @@ OBJS-$(CONFIG_LADSPA_FILTER) +=
> > af_ladspa.o
> > >  OBJS-$(CONFIG_LOUDNORM_FILTER)   += af_loudnorm.o
> > >  OBJS-$(CONFIG_LOWPASS_FILTER)+= af_biquads.o
> > >  OBJS-$(CONFIG_PAN_FILTER)+= af_pan.o
> > > +OBJS-$(CONFIG_PEAKPOINTS_FILTER) += af_peakpoints.o
> > >  OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
> > >  OBJS-$(CONFIG_RESAMPLE_FILTER)   += af_resample.o
> > >  OBJS-$(CONFIG_RUBBERBAND_FILTER) += af_rubberband.o
> > > diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
> > > new file mode 100644
> > > index 000..da108ca
> > > --- /dev/null
> > > +++ b/libavfilter/af_peakpoints.c
> > > @@ -0,0 +1,263 @@
> > > +/*
> > > + * Copyright (c) 2016 Atana
> > > + *
> > > + * This file is part of FFmpeg.
> > > + *
> > > + * FFmpeg is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU Lesser General Public
> > > + * License as published by the Free Software Foundation; either
> > > + * version 2.1 of the License, or (at your option) any later version.
> > > + *
> > > + * FFmpeg is distributed in the hope that it will be useful,
> > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > > + * Lesser General Public License for more details.
> > > + *
> > > + * You should have received a copy of the GNU Lesser General Public
> > > + * License along with FFmpeg; if not, write to the Free Software
> > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> > 02110-1301 USA
> > > + */
> > > +
> > > +#include "libavcodec/avcodec.h"
> > > +#include "libavcodec/avfft.h"
> > > +#include "libavformat/avformat.h"
> > > +#include "libswscale/swscale.h"
> > > +#include "avfilter.h"
> > > +#include "audio.h"
> > > +#include "libavutil/opt.h"
> > > +
> > > +#define SIZECHECK 4096
> > > +
> > > +/* Structure to contain peak points context */
> > > +typedef struct {
> > > +const AVClass *class;
> > > +double *data;
> > > +int nsamples;
> > > +int index;
> > > +int isOnce;
> > > +int buffFlag;
> > > +double *peaks;
> > > +int size; // number of peaks
> > > +int windowSize;
> > > +//char *inputFile;
> > > +} PeakPointsContext;
> > > +
> > > +/* returns maximum value from an array conditioned on start and end
> > index */
> > > +static double getMax(double *res_arr, int startIndex, int endIndex) {
> > > +int i;
> > > +double max = res_arr[startIndex];
> > > +for (i = startIndex; i <= endIndex; i++) {
> > > + if (res_arr[i] > max) {
> > > + max = res_arr[i];
> > > + }
> > > +}
> >
> > tabs are forbidden in ffmpeg git
> >
> >
> > > +return max;
> > > +}
> > > +
> > > +/* Stores peak frequency for each window(of chunkSize) in peaks array */
> > > +static void getPeakPointInChunk(int chunkSize, double *res_arr, int
> > size, double *peaks) {
> > > +int i = 0, peakIndex = 0;
> > > +int startIndex = 0;
> > > +double max;
> > > +// get a chunk and find max value in it
> > > +while (i < size) {
> > > + if (i % chunkSize-1 == 0) {
> > > +max = getMax(res_arr, startIndex, i);
> > > + peaks[peakIndex++] = max;
> > > + startIndex = startIndex + chunkSize;
> > > + }
> > > +i += 1;
> > > +}
> > > +}
> > > +
> > > +/* Get peaks points from windowed frequency domain data*/
> > > +static int getPeakPoints(PeakPointsContext 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-04 Thread Michael Niedermayer
On Fri, Nov 04, 2016 at 07:46:34AM +0530, Pallavi Kumari wrote:
> Updated patch attached. PFA
[...]

>  Makefile|1 
>  af_peakpoints.c |  263 
> 
>  allfilters.c|1 
>  version.h   |2 
>  4 files changed, 266 insertions(+), 1 deletion(-)
> 7f6affa8dcb632cdea162553a18ab1489f0783ce  
> 0001-avfilter-added-peakpoints-filter.patch
> From 46be941c87713f8afee686eed0262ca59a2896fd Mon Sep 17 00:00:00 2001
> From: Atana 
> Date: Fri, 4 Nov 2016 07:43:29 +0530
> Subject: [PATCH] avfilter: added peakpoints filter
> 
> ---
>  libavfilter/Makefile|   1 +
>  libavfilter/af_peakpoints.c | 263 
> 
>  libavfilter/allfilters.c|   1 +
>  libavfilter/version.h   |   2 +-
>  4 files changed, 266 insertions(+), 1 deletion(-)
>  create mode 100644 libavfilter/af_peakpoints.c
> 
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index 7ed4696..1a18902 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -96,6 +96,7 @@ OBJS-$(CONFIG_LADSPA_FILTER) += af_ladspa.o
>  OBJS-$(CONFIG_LOUDNORM_FILTER)   += af_loudnorm.o
>  OBJS-$(CONFIG_LOWPASS_FILTER)+= af_biquads.o
>  OBJS-$(CONFIG_PAN_FILTER)+= af_pan.o
> +OBJS-$(CONFIG_PEAKPOINTS_FILTER) += af_peakpoints.o
>  OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
>  OBJS-$(CONFIG_RESAMPLE_FILTER)   += af_resample.o
>  OBJS-$(CONFIG_RUBBERBAND_FILTER) += af_rubberband.o
> diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
> new file mode 100644
> index 000..da108ca
> --- /dev/null
> +++ b/libavfilter/af_peakpoints.c
> @@ -0,0 +1,263 @@
> +/*
> + * Copyright (c) 2016 Atana
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#include "libavcodec/avcodec.h"
> +#include "libavcodec/avfft.h"
> +#include "libavformat/avformat.h"
> +#include "libswscale/swscale.h"
> +#include "avfilter.h"
> +#include "audio.h"
> +#include "libavutil/opt.h"
> +
> +#define SIZECHECK 4096
> +
> +/* Structure to contain peak points context */
> +typedef struct {
> +const AVClass *class;
> +double *data;
> +int nsamples;
> +int index;
> +int isOnce;
> +int buffFlag;
> +double *peaks;
> +int size; // number of peaks
> +int windowSize;
> +//char *inputFile;
> +} PeakPointsContext;
> +
> +/* returns maximum value from an array conditioned on start and end index */
> +static double getMax(double *res_arr, int startIndex, int endIndex) {
> +int i;
> +double max = res_arr[startIndex];
> +for (i = startIndex; i <= endIndex; i++) {
> + if (res_arr[i] > max) {
> + max = res_arr[i];
> + }
> +}

tabs are forbidden in ffmpeg git


> +return max;
> +}
> +
> +/* Stores peak frequency for each window(of chunkSize) in peaks array */
> +static void getPeakPointInChunk(int chunkSize, double *res_arr, int size, 
> double *peaks) {
> +int i = 0, peakIndex = 0;
> +int startIndex = 0;
> +double max;
> +// get a chunk and find max value in it
> +while (i < size) {
> + if (i % chunkSize-1 == 0) {
> +max = getMax(res_arr, startIndex, i);
> + peaks[peakIndex++] = max;
> + startIndex = startIndex + chunkSize;
> + }
> +i += 1;
> +}
> +}
> +
> +/* Get peaks points from windowed frequency domain data*/
> +static int getPeakPoints(PeakPointsContext *ppc) {
> +int i, m, k, size, chunkSize, pSize, chunkSampleSize, resSize;
> +double *fft_res;
> +void *avc;
> +RDFTContext *rdftC;
> +FFTSample *data;
> +
> +size = ppc->index;
> +m = log2(ppc->windowSize);
> +chunkSize = ppc->windowSize;
> +chunkSampleSize = size/chunkSize;
> +resSize = chunkSize * chunkSampleSize;
> +

> +fft_res = av_malloc_array(resSize, sizeof(double));

This seems never freed


> +
> +if (!fft_res) {
> +av_log(avc, AV_LOG_ERROR, "Cann't allocate memmory for storing fft 
> data\n");
> +return 0;
> +}
> +
> +
> +rdftC = av_rdft_init(m, DFT_R2C);
> +data = 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-03 Thread Pallavi Kumari
Updated patch attached. PFA

On Thu, Nov 3, 2016 at 2:00 AM, Michael Niedermayer 
wrote:

> On Thu, Nov 03, 2016 at 01:10:26AM +0530, Pallavi Kumari wrote:
> > Necessary changes has been done. PFA.
> >
> > Usage:
> >
> > ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=wsize=16 -f null -
> >
> > On Wed, Nov 2, 2016 at 6:14 AM, Michael Niedermayer
> 
> > wrote:
> >
> > > On Wed, Nov 02, 2016 at 05:00:09AM +0530, Pallavi Kumari wrote:
> > > > Hi Michael,
> > > >
> > > > I have attached a working patch with the mail. PFA.
> > > >
> > > > Usage:
> > > >
> > >
> > > > ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:
> wsize=16
> > >
> > > I realize now, theres a mistake in this, you must provide a output
> > > as in
> > > ./ffmpeg -i kpg.mp3 -af peakpoints -f null -
> > >
> > > without some output like  "-f null -" it wont read the file fully and
> > > wont pass it through filter_frame()
> > >
> > > you could see this failure as in:
> > > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect  -f null -
> > > vs.
> > > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect
> > >
> > > you get the histogram from the volume detect filter in the first case
> > > but not the 2nd.
> > >
> > > [...]
> > > --
> > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> 87040B0FAB
> > >
> > > Many things microsoft did are stupid, but not doing something just
> because
> > > microsoft did it is even more stupid. If everything ms did were stupid
> they
> > > would be bankrupt already.
> > >
>
> >  af_peakpoints.c |  226 ++
> ++
> >  1 file changed, 226 insertions(+)
> > 206d91b47bc6066dd01db1c3369d4674ac95f04c  0001-avfilter-added-
> peakpoints-filter.patch
> > From e10f73d363d0313774bcb132b3b1f2417fcfba11 Mon Sep 17 00:00:00 2001
> > From: Atana 
> > Date: Thu, 3 Nov 2016 01:05:51 +0530
> > Subject: [PATCH] avfilter: added peakpoints filter
> >
> > ---
> >  libavfilter/af_peakpoints.c | 226 ++
> ++
> >  1 file changed, 226 insertions(+)
> >  create mode 100644 libavfilter/af_peakpoints.c
>
> This is missing changes to the Makefile and libavfilter/allfilters*
>
>
> >
> > diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
> > new file mode 100644
> > index 000..9265c47
> > --- /dev/null
> > +++ b/libavfilter/af_peakpoints.c
> > @@ -0,0 +1,226 @@
> > +/*
> > + * Copyright (c) 2016 Atana
> > + *
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with FFmpeg; if not, write to the Free Software
> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301 USA
> > + */
> > +
> > +#include "libavcodec/avcodec.h"
> > +#include "libavcodec/avfft.h"
> > +#include "libavformat/avformat.h"
> > +#include "libswscale/swscale.h"
> > +#include "avfilter.h"
> > +#include "audio.h"
> > +#include "libavutil/opt.h"
> > +
> > +
> > +/* Structure to contain peak points context */
> > +typedef struct {
> > +const AVClass *class;
> > +double *data;
> > +int nsamples;
> > +int index;
> > +double *peaks;
> > +int size; // number of peaks
> > +int windowSize;
> > +//char *inputFile;
> > +} PeakPointsContext;
> > +
> > +/* returns maximum value from an array conditioned on start and end
> index */
> > +static double getMax(double *res_arr, int startIndex, int endIndex) {
> > +int i;
> > +double max = res_arr[startIndex];
> > +for (i = startIndex; i <= endIndex; i++) {
> > + if (res_arr[i] > max) {
> > + max = res_arr[i];
> > + }
> > +}
> > +return max;
> > +}
> > +
> > +/* Stores peak frequency for each window(of chunkSize) in peaks array */
> > +static void getPeakPointInChunk(int chunkSize, double *res_arr, int
> size, double *peaks) {
> > +int i = 0, peakIndex = 0;
> > +int startIndex = 0;
> > +double max;
> > +// get a chunk and find max value in it
> > +while (i < size) {
> > + if (i % chunkSize-1 == 0) {
> > +max = getMax(res_arr, startIndex, i);
> > + peaks[peakIndex++] = max;
> > + startIndex = startIndex + chunkSize;
> > + }
> > +i += 1;
> > +}
> > +}
> > +
> > +/* Get peaks points from windowed frequency 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-02 Thread Michael Niedermayer
On Thu, Nov 03, 2016 at 01:10:26AM +0530, Pallavi Kumari wrote:
> Necessary changes has been done. PFA.
> 
> Usage:
> 
> ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=wsize=16 -f null -
> 
> On Wed, Nov 2, 2016 at 6:14 AM, Michael Niedermayer 
> wrote:
> 
> > On Wed, Nov 02, 2016 at 05:00:09AM +0530, Pallavi Kumari wrote:
> > > Hi Michael,
> > >
> > > I have attached a working patch with the mail. PFA.
> > >
> > > Usage:
> > >
> >
> > > ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:wsize=16
> >
> > I realize now, theres a mistake in this, you must provide a output
> > as in
> > ./ffmpeg -i kpg.mp3 -af peakpoints -f null -
> >
> > without some output like  "-f null -" it wont read the file fully and
> > wont pass it through filter_frame()
> >
> > you could see this failure as in:
> > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect  -f null -
> > vs.
> > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect
> >
> > you get the histogram from the volume detect filter in the first case
> > but not the 2nd.
> >
> > [...]
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > Many things microsoft did are stupid, but not doing something just because
> > microsoft did it is even more stupid. If everything ms did were stupid they
> > would be bankrupt already.
> >

>  af_peakpoints.c |  226 
> 
>  1 file changed, 226 insertions(+)
> 206d91b47bc6066dd01db1c3369d4674ac95f04c  
> 0001-avfilter-added-peakpoints-filter.patch
> From e10f73d363d0313774bcb132b3b1f2417fcfba11 Mon Sep 17 00:00:00 2001
> From: Atana 
> Date: Thu, 3 Nov 2016 01:05:51 +0530
> Subject: [PATCH] avfilter: added peakpoints filter
> 
> ---
>  libavfilter/af_peakpoints.c | 226 
> 
>  1 file changed, 226 insertions(+)
>  create mode 100644 libavfilter/af_peakpoints.c

This is missing changes to the Makefile and libavfilter/allfilters*


> 
> diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
> new file mode 100644
> index 000..9265c47
> --- /dev/null
> +++ b/libavfilter/af_peakpoints.c
> @@ -0,0 +1,226 @@
> +/*
> + * Copyright (c) 2016 Atana
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#include "libavcodec/avcodec.h"
> +#include "libavcodec/avfft.h"
> +#include "libavformat/avformat.h"
> +#include "libswscale/swscale.h"
> +#include "avfilter.h"
> +#include "audio.h"
> +#include "libavutil/opt.h"
> +
> +
> +/* Structure to contain peak points context */
> +typedef struct {
> +const AVClass *class;
> +double *data;
> +int nsamples;
> +int index;
> +double *peaks;
> +int size; // number of peaks
> +int windowSize;
> +//char *inputFile;
> +} PeakPointsContext;
> +
> +/* returns maximum value from an array conditioned on start and end index */
> +static double getMax(double *res_arr, int startIndex, int endIndex) {
> +int i;
> +double max = res_arr[startIndex];
> +for (i = startIndex; i <= endIndex; i++) {
> + if (res_arr[i] > max) {
> + max = res_arr[i];
> + }
> +}
> +return max;
> +}
> +
> +/* Stores peak frequency for each window(of chunkSize) in peaks array */
> +static void getPeakPointInChunk(int chunkSize, double *res_arr, int size, 
> double *peaks) {
> +int i = 0, peakIndex = 0;
> +int startIndex = 0;
> +double max;
> +// get a chunk and find max value in it
> +while (i < size) {
> + if (i % chunkSize-1 == 0) {
> +max = getMax(res_arr, startIndex, i);
> + peaks[peakIndex++] = max;
> + startIndex = startIndex + chunkSize;
> + }
> +i += 1;
> +}
> +}
> +
> +/* Get peaks points from windowed frequency domain data*/
> +static int getPeakPoints(PeakPointsContext *ppc) {
> +int i, m, k, size, chunkSize, pSize, chunkSampleSize, resSize;
> +double *fft_res;
> +void *avc;
> +RDFTContext *rdftC;
> +FFTSample *data;
> +
> +size = ppc->index;
> +m = log2(ppc->windowSize);
> +chunkSize = ppc->windowSize;
> +chunkSampleSize = size/chunkSize;
> +resSize = 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-02 Thread Pallavi Kumari
Necessary changes has been done. PFA.

Usage:

./ffmpeg -i kpg.mp3 -filter_complex peakpoints=wsize=16 -f null -

On Wed, Nov 2, 2016 at 6:14 AM, Michael Niedermayer 
wrote:

> On Wed, Nov 02, 2016 at 05:00:09AM +0530, Pallavi Kumari wrote:
> > Hi Michael,
> >
> > I have attached a working patch with the mail. PFA.
> >
> > Usage:
> >
>
> > ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:wsize=16
>
> I realize now, theres a mistake in this, you must provide a output
> as in
> ./ffmpeg -i kpg.mp3 -af peakpoints -f null -
>
> without some output like  "-f null -" it wont read the file fully and
> wont pass it through filter_frame()
>
> you could see this failure as in:
> ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect  -f null -
> vs.
> ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect
>
> you get the histogram from the volume detect filter in the first case
> but not the 2nd.
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Many things microsoft did are stupid, but not doing something just because
> microsoft did it is even more stupid. If everything ms did were stupid they
> would be bankrupt already.
>
From e10f73d363d0313774bcb132b3b1f2417fcfba11 Mon Sep 17 00:00:00 2001
From: Atana 
Date: Thu, 3 Nov 2016 01:05:51 +0530
Subject: [PATCH] avfilter: added peakpoints filter

---
 libavfilter/af_peakpoints.c | 226 
 1 file changed, 226 insertions(+)
 create mode 100644 libavfilter/af_peakpoints.c

diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
new file mode 100644
index 000..9265c47
--- /dev/null
+++ b/libavfilter/af_peakpoints.c
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2016 Atana
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavcodec/avcodec.h"
+#include "libavcodec/avfft.h"
+#include "libavformat/avformat.h"
+#include "libswscale/swscale.h"
+#include "avfilter.h"
+#include "audio.h"
+#include "libavutil/opt.h"
+
+
+/* Structure to contain peak points context */
+typedef struct {
+const AVClass *class;
+double *data;
+int nsamples;
+int index;
+double *peaks;
+int size; // number of peaks
+int windowSize;
+//char *inputFile;
+} PeakPointsContext;
+
+/* returns maximum value from an array conditioned on start and end index */
+static double getMax(double *res_arr, int startIndex, int endIndex) {
+int i;
+double max = res_arr[startIndex];
+for (i = startIndex; i <= endIndex; i++) {
+	if (res_arr[i] > max) {
+	max = res_arr[i];
+	}
+}
+return max;
+}
+
+/* Stores peak frequency for each window(of chunkSize) in peaks array */
+static void getPeakPointInChunk(int chunkSize, double *res_arr, int size, double *peaks) {
+int i = 0, peakIndex = 0;
+int startIndex = 0;
+double max;
+// get a chunk and find max value in it
+while (i < size) {
+	if (i % chunkSize-1 == 0) {
+max = getMax(res_arr, startIndex, i);
+	peaks[peakIndex++] = max;
+	startIndex = startIndex + chunkSize;
+	}
+i += 1;
+}
+}
+
+/* Get peaks points from windowed frequency domain data*/
+static int getPeakPoints(PeakPointsContext *ppc) {
+int i, m, k, size, chunkSize, pSize, chunkSampleSize, resSize;
+double *fft_res;
+void *avc;
+RDFTContext *rdftC;
+FFTSample *data;
+
+size = ppc->index;
+m = log2(ppc->windowSize);
+chunkSize = ppc->windowSize;
+chunkSampleSize = size/chunkSize;
+resSize = chunkSize * chunkSampleSize;
+
+fft_res = av_malloc(sizeof(double) * resSize);
+
+if (!fft_res) {
+av_log(avc, AV_LOG_ERROR, "Cann't allocate memmory for storing fft data\n");
+return 0;
+}
+
+
+rdftC = av_rdft_init(m, DFT_R2C);
+data = av_malloc(sizeof(FFTSample)*chunkSize);
+
+if (!data) {
+av_log(avc, AV_LOG_ERROR, "Cann't allocate memmory for chunk fft data\n");
+return 0;
+}
+// FFT transform for windowed time domain data
+// window is of size chunkSize
+k = 0;
+while (k < resSize) {
+//copy data
+for (i = 0; i < chunkSize; i++) {
+data[i] = ppc->data[i+k];

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-01 Thread Michael Niedermayer
On Wed, Nov 02, 2016 at 05:00:09AM +0530, Pallavi Kumari wrote:
> Hi Michael,
> 
> I have attached a working patch with the mail. PFA.
> 
> Usage:
> 

> ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:wsize=16

I realize now, theres a mistake in this, you must provide a output
as in
./ffmpeg -i kpg.mp3 -af peakpoints -f null -

without some output like  "-f null -" it wont read the file fully and
wont pass it through filter_frame()

you could see this failure as in:
./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect  -f null -
vs.
./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -af volumedetect

you get the histogram from the volume detect filter in the first case
but not the 2nd.

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-01 Thread Michael Niedermayer
On Wed, Nov 02, 2016 at 05:00:09AM +0530, Pallavi Kumari wrote:
> Hi Michael,
> 
> I have attached a working patch with the mail. PFA.
> 
> Usage:
> 
> ./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:wsize=16
> 
> 
> Regards,
> Atana
> 
> On Fri, Oct 28, 2016 at 4:38 AM, Michael Niedermayer  > wrote:
> 
> > On Thu, Oct 27, 2016 at 11:38:27PM +0530, Pallavi Kumari wrote:
> > > Hi Michael,
> > >
> > > I have attached a patch with the mail.
> > >
> > > With `avcodec_get_frame_defaults ()` in the function readAudio
> > > program was working fine with old version in my system. But this function
> > > is not in the latest git repo so I used `av_frame_unref()` instead
> > > and the program segfaults. I am not sure why or how to fix this.
> >
> > theres "AVFrame frame;"
> >
> > thats bad, as it depends on sizef(AVFrame) to allocat frame on the
> > stack.
> > you should always allocate/clone/... one if one is not already
> > available, each of these would be setup correctly and not need
> > avcodec_get_frame_defaults()
> >
> >
> > >
> > > Also, I haven't properly understood the input and output flow of
> > > libavfilters (how to write input and output links? and overall flow).
> > Could
> > > you explain it to me?
> >
> > see existing filters, af_*.c
> > maybe libavfilter/af_astats.c has a similar structure to the filter
> > here
> >
> > theres also
> > doc/filter_design.txt
> >
> >
> > >
> > >
> > >
> > > On Thu, Oct 27, 2016 at 3:24 AM, Michael Niedermayer
> >  > > > wrote:
> > >
> > > > On Thu, Oct 27, 2016 at 12:40:53AM +0530, Pallavi Kumari wrote:
> > > > > I mean deciding a timeline for the opw project. Which is to be
> > mentioned
> > > > in
> > > > > application
> > > >
> > > > its your application, you can choose whatever timeline you feel makes
> > > > sense.
> > > > As far as iam concered whats important is to finish the qualification
> > > > task well before we have to choose the applicant(s) we accept this
> > > > year.
> > > >
> > > > The timeline for the main project in dec-mar can be segmented as you
> > > > like but leave plenty of time toward the end, problems always occur
> > > > and things get delayed.
> > > > Also both for qualification and the main project submit code early
> > > > if you have questions ask early,
> > > > if you dont get satisfactory reply from me on something ask again and
> > > > louder/clearer ... i do sometimes also forget to reply until i then
> > > > remember again days later ...
> > > >
> > > > also i think the architecture wasnt discussed much yet
> > > > do you have some plans about it ?
> > > >
> > > > I mean for example there could be a avfilter that passes audio through
> > > > and adds fingerint(s) as metadata into thf AVFrame
> > > > (as with avpriv_frame_get_metadatap in vf_idet.c) and also print the
> > > > fingerprints via av_log()
> > > >
> > > > a 2nd filter could then look these fingerprints from the metadata
> > > > up in some file/database
> > > >
> > > > a 3rd one could add the fingerprints to the file/database
> > > >
> > > > or these also could all be in one filter of course
> > > >
> > > > this can be extended in the future to for example have a filter
> > > > delay the audio until lookup succeeds and then once identified
> > > > lookup lyrics online and add them or such (this of course would be a
> > > > future thing after outreachy/opw)
> > > >
> > > > but maybe you have a different plan on how the components would
> > > > interact ?
> > > >
> > > > thx
> > > >
> > > > >
> > > > > On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer
> > > >  > > > > > wrote:
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > > > > > > Hi Michael,
> > > > > > >
> > > > > > > I figured out the use of fft. Help me with the time line setting.
> > > > Thanks
> > > > > >
> > > > > > I dont understand the question,
> > > > > > if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this
> > for
> > > > > > now, its not needed
> > > > > >
> > > > > > [...]
> > > > > > --
> > > > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> > > > 87040B0FAB
> > > > > >
> > > > > > Rewriting code that is poorly written but fully understood is good.
> > > > > > Rewriting code that one doesnt understand is a sign that one is
> > less
> > > > smart
> > > > > > then the original author, trying to rewrite it will not make it
> > better.
> > > > > >
> > > > > ___
> > > > > ffmpeg-devel mailing list
> > > > > ffmpeg-devel@ffmpeg.org
> > > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >
> > > > --
> > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> > 87040B0FAB
> > > >
> > > > He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
> > > >
> > > > ___
> > > > ffmpeg-devel mailing list
> > 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-11-01 Thread Pallavi Kumari
Hi Michael,

I have attached a working patch with the mail. PFA.

Usage:

./ffmpeg -i kpg.mp3 -filter_complex peakpoints=input=kpg.mp3:wsize=16


Regards,
Atana

On Fri, Oct 28, 2016 at 4:38 AM, Michael Niedermayer  wrote:

> On Thu, Oct 27, 2016 at 11:38:27PM +0530, Pallavi Kumari wrote:
> > Hi Michael,
> >
> > I have attached a patch with the mail.
> >
> > With `avcodec_get_frame_defaults ()` in the function readAudio
> > program was working fine with old version in my system. But this function
> > is not in the latest git repo so I used `av_frame_unref()` instead
> > and the program segfaults. I am not sure why or how to fix this.
>
> theres "AVFrame frame;"
>
> thats bad, as it depends on sizef(AVFrame) to allocat frame on the
> stack.
> you should always allocate/clone/... one if one is not already
> available, each of these would be setup correctly and not need
> avcodec_get_frame_defaults()
>
>
> >
> > Also, I haven't properly understood the input and output flow of
> > libavfilters (how to write input and output links? and overall flow).
> Could
> > you explain it to me?
>
> see existing filters, af_*.c
> maybe libavfilter/af_astats.c has a similar structure to the filter
> here
>
> theres also
> doc/filter_design.txt
>
>
> >
> >
> >
> > On Thu, Oct 27, 2016 at 3:24 AM, Michael Niedermayer
>  > > wrote:
> >
> > > On Thu, Oct 27, 2016 at 12:40:53AM +0530, Pallavi Kumari wrote:
> > > > I mean deciding a timeline for the opw project. Which is to be
> mentioned
> > > in
> > > > application
> > >
> > > its your application, you can choose whatever timeline you feel makes
> > > sense.
> > > As far as iam concered whats important is to finish the qualification
> > > task well before we have to choose the applicant(s) we accept this
> > > year.
> > >
> > > The timeline for the main project in dec-mar can be segmented as you
> > > like but leave plenty of time toward the end, problems always occur
> > > and things get delayed.
> > > Also both for qualification and the main project submit code early
> > > if you have questions ask early,
> > > if you dont get satisfactory reply from me on something ask again and
> > > louder/clearer ... i do sometimes also forget to reply until i then
> > > remember again days later ...
> > >
> > > also i think the architecture wasnt discussed much yet
> > > do you have some plans about it ?
> > >
> > > I mean for example there could be a avfilter that passes audio through
> > > and adds fingerint(s) as metadata into thf AVFrame
> > > (as with avpriv_frame_get_metadatap in vf_idet.c) and also print the
> > > fingerprints via av_log()
> > >
> > > a 2nd filter could then look these fingerprints from the metadata
> > > up in some file/database
> > >
> > > a 3rd one could add the fingerprints to the file/database
> > >
> > > or these also could all be in one filter of course
> > >
> > > this can be extended in the future to for example have a filter
> > > delay the audio until lookup succeeds and then once identified
> > > lookup lyrics online and add them or such (this of course would be a
> > > future thing after outreachy/opw)
> > >
> > > but maybe you have a different plan on how the components would
> > > interact ?
> > >
> > > thx
> > >
> > > >
> > > > On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer
> > >  > > > > wrote:
> > > >
> > > > > Hi
> > > > >
> > > > > On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > > > > > Hi Michael,
> > > > > >
> > > > > > I figured out the use of fft. Help me with the time line setting.
> > > Thanks
> > > > >
> > > > > I dont understand the question,
> > > > > if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this
> for
> > > > > now, its not needed
> > > > >
> > > > > [...]
> > > > > --
> > > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> > > 87040B0FAB
> > > > >
> > > > > Rewriting code that is poorly written but fully understood is good.
> > > > > Rewriting code that one doesnt understand is a sign that one is
> less
> > > smart
> > > > > then the original author, trying to rewrite it will not make it
> better.
> > > > >
> > > > ___
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel@ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > > --
> > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> 87040B0FAB
> > >
> > > He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
> > >
> > > ___
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > >
>
> >  Makefile|1
> >  af_peakpoints.c |  263 ++
> ++
> >  allfilters.c|1
> >  version.h   |2
> >  4 files changed, 266 insertions(+), 1 deletion(-)
> > 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-27 Thread Michael Niedermayer
On Thu, Oct 27, 2016 at 11:38:27PM +0530, Pallavi Kumari wrote:
> Hi Michael,
> 
> I have attached a patch with the mail.
> 
> With `avcodec_get_frame_defaults ()` in the function readAudio
> program was working fine with old version in my system. But this function
> is not in the latest git repo so I used `av_frame_unref()` instead
> and the program segfaults. I am not sure why or how to fix this.

theres "AVFrame frame;"

thats bad, as it depends on sizef(AVFrame) to allocat frame on the
stack.
you should always allocate/clone/... one if one is not already
available, each of these would be setup correctly and not need
avcodec_get_frame_defaults()


> 
> Also, I haven't properly understood the input and output flow of
> libavfilters (how to write input and output links? and overall flow). Could
> you explain it to me?

see existing filters, af_*.c
maybe libavfilter/af_astats.c has a similar structure to the filter
here

theres also
doc/filter_design.txt


> 
> 
> 
> On Thu, Oct 27, 2016 at 3:24 AM, Michael Niedermayer  > wrote:
> 
> > On Thu, Oct 27, 2016 at 12:40:53AM +0530, Pallavi Kumari wrote:
> > > I mean deciding a timeline for the opw project. Which is to be mentioned
> > in
> > > application
> >
> > its your application, you can choose whatever timeline you feel makes
> > sense.
> > As far as iam concered whats important is to finish the qualification
> > task well before we have to choose the applicant(s) we accept this
> > year.
> >
> > The timeline for the main project in dec-mar can be segmented as you
> > like but leave plenty of time toward the end, problems always occur
> > and things get delayed.
> > Also both for qualification and the main project submit code early
> > if you have questions ask early,
> > if you dont get satisfactory reply from me on something ask again and
> > louder/clearer ... i do sometimes also forget to reply until i then
> > remember again days later ...
> >
> > also i think the architecture wasnt discussed much yet
> > do you have some plans about it ?
> >
> > I mean for example there could be a avfilter that passes audio through
> > and adds fingerint(s) as metadata into thf AVFrame
> > (as with avpriv_frame_get_metadatap in vf_idet.c) and also print the
> > fingerprints via av_log()
> >
> > a 2nd filter could then look these fingerprints from the metadata
> > up in some file/database
> >
> > a 3rd one could add the fingerprints to the file/database
> >
> > or these also could all be in one filter of course
> >
> > this can be extended in the future to for example have a filter
> > delay the audio until lookup succeeds and then once identified
> > lookup lyrics online and add them or such (this of course would be a
> > future thing after outreachy/opw)
> >
> > but maybe you have a different plan on how the components would
> > interact ?
> >
> > thx
> >
> > >
> > > On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer
> >  > > > wrote:
> > >
> > > > Hi
> > > >
> > > > On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > > > > Hi Michael,
> > > > >
> > > > > I figured out the use of fft. Help me with the time line setting.
> > Thanks
> > > >
> > > > I dont understand the question,
> > > > if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this for
> > > > now, its not needed
> > > >
> > > > [...]
> > > > --
> > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> > 87040B0FAB
> > > >
> > > > Rewriting code that is poorly written but fully understood is good.
> > > > Rewriting code that one doesnt understand is a sign that one is less
> > smart
> > > > then the original author, trying to rewrite it will not make it better.
> > > >
> > > ___
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >

>  Makefile|1 
>  af_peakpoints.c |  263 
> 
>  allfilters.c|1 
>  version.h   |2 
>  4 files changed, 266 insertions(+), 1 deletion(-)
> 5cc989fc1ba9466043f833059ee82efcaa3cf898  
> 0001-avfilter-add-peakpoints-filter.patch
> From 60429fb7d83d11d6dd733c3477950a940bd0d84a Mon Sep 17 00:00:00 2001
> From: Atana 
> Date: Mon, 24 Oct 2016 17:16:09 +0530
> Subject: [PATCH] avfilter: add peakpoints filter
> 
> ---
>  libavfilter/Makefile|   1 +
>  libavfilter/af_peakpoints.c | 263 
> 
>  libavfilter/allfilters.c|   1 +
>  libavfilter/version.h   |   2 +-
>  4 files changed, 266 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-27 Thread Pallavi Kumari
Hi Michael,

I have attached a patch with the mail.

With `avcodec_get_frame_defaults ()` in the function readAudio
program was working fine with old version in my system. But this function
is not in the latest git repo so I used `av_frame_unref()` instead
and the program segfaults. I am not sure why or how to fix this.

Also, I haven't properly understood the input and output flow of
libavfilters (how to write input and output links? and overall flow). Could
you explain it to me?



On Thu, Oct 27, 2016 at 3:24 AM, Michael Niedermayer  wrote:

> On Thu, Oct 27, 2016 at 12:40:53AM +0530, Pallavi Kumari wrote:
> > I mean deciding a timeline for the opw project. Which is to be mentioned
> in
> > application
>
> its your application, you can choose whatever timeline you feel makes
> sense.
> As far as iam concered whats important is to finish the qualification
> task well before we have to choose the applicant(s) we accept this
> year.
>
> The timeline for the main project in dec-mar can be segmented as you
> like but leave plenty of time toward the end, problems always occur
> and things get delayed.
> Also both for qualification and the main project submit code early
> if you have questions ask early,
> if you dont get satisfactory reply from me on something ask again and
> louder/clearer ... i do sometimes also forget to reply until i then
> remember again days later ...
>
> also i think the architecture wasnt discussed much yet
> do you have some plans about it ?
>
> I mean for example there could be a avfilter that passes audio through
> and adds fingerint(s) as metadata into thf AVFrame
> (as with avpriv_frame_get_metadatap in vf_idet.c) and also print the
> fingerprints via av_log()
>
> a 2nd filter could then look these fingerprints from the metadata
> up in some file/database
>
> a 3rd one could add the fingerprints to the file/database
>
> or these also could all be in one filter of course
>
> this can be extended in the future to for example have a filter
> delay the audio until lookup succeeds and then once identified
> lookup lyrics online and add them or such (this of course would be a
> future thing after outreachy/opw)
>
> but maybe you have a different plan on how the components would
> interact ?
>
> thx
>
> >
> > On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer
>  > > wrote:
> >
> > > Hi
> > >
> > > On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > > > Hi Michael,
> > > >
> > > > I figured out the use of fft. Help me with the time line setting.
> Thanks
> > >
> > > I dont understand the question,
> > > if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this for
> > > now, its not needed
> > >
> > > [...]
> > > --
> > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> 87040B0FAB
> > >
> > > Rewriting code that is poorly written but fully understood is good.
> > > Rewriting code that one doesnt understand is a sign that one is less
> smart
> > > then the original author, trying to rewrite it will not make it better.
> > >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
From 60429fb7d83d11d6dd733c3477950a940bd0d84a Mon Sep 17 00:00:00 2001
From: Atana 
Date: Mon, 24 Oct 2016 17:16:09 +0530
Subject: [PATCH] avfilter: add peakpoints filter

---
 libavfilter/Makefile|   1 +
 libavfilter/af_peakpoints.c | 263 
 libavfilter/allfilters.c|   1 +
 libavfilter/version.h   |   2 +-
 4 files changed, 266 insertions(+), 1 deletion(-)
 create mode 100644 libavfilter/af_peakpoints.c

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 7ed4696..1a18902 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -96,6 +96,7 @@ OBJS-$(CONFIG_LADSPA_FILTER) += af_ladspa.o
 OBJS-$(CONFIG_LOUDNORM_FILTER)   += af_loudnorm.o
 OBJS-$(CONFIG_LOWPASS_FILTER)+= af_biquads.o
 OBJS-$(CONFIG_PAN_FILTER)+= af_pan.o
+OBJS-$(CONFIG_PEAKPOINTS_FILTER) += af_peakpoints.o
 OBJS-$(CONFIG_REPLAYGAIN_FILTER) += af_replaygain.o
 OBJS-$(CONFIG_RESAMPLE_FILTER)   += af_resample.o
 OBJS-$(CONFIG_RUBBERBAND_FILTER) += af_rubberband.o
diff --git a/libavfilter/af_peakpoints.c b/libavfilter/af_peakpoints.c
new file mode 100644
index 000..84b51da
--- /dev/null
+++ b/libavfilter/af_peakpoints.c
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2016 Pallavi Kumari
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free 

Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-26 Thread Michael Niedermayer
On Thu, Oct 27, 2016 at 12:40:53AM +0530, Pallavi Kumari wrote:
> I mean deciding a timeline for the opw project. Which is to be mentioned in
> application

its your application, you can choose whatever timeline you feel makes
sense.
As far as iam concered whats important is to finish the qualification
task well before we have to choose the applicant(s) we accept this
year.

The timeline for the main project in dec-mar can be segmented as you
like but leave plenty of time toward the end, problems always occur
and things get delayed.
Also both for qualification and the main project submit code early
if you have questions ask early,
if you dont get satisfactory reply from me on something ask again and
louder/clearer ... i do sometimes also forget to reply until i then
remember again days later ...

also i think the architecture wasnt discussed much yet
do you have some plans about it ?

I mean for example there could be a avfilter that passes audio through
and adds fingerint(s) as metadata into thf AVFrame
(as with avpriv_frame_get_metadatap in vf_idet.c) and also print the
fingerprints via av_log()

a 2nd filter could then look these fingerprints from the metadata
up in some file/database

a 3rd one could add the fingerprints to the file/database

or these also could all be in one filter of course

this can be extended in the future to for example have a filter
delay the audio until lookup succeeds and then once identified
lookup lyrics online and add them or such (this of course would be a
future thing after outreachy/opw)

but maybe you have a different plan on how the components would
interact ?

thx

> 
> On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer  > wrote:
> 
> > Hi
> >
> > On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > > Hi Michael,
> > >
> > > I figured out the use of fft. Help me with the time line setting. Thanks
> >
> > I dont understand the question,
> > if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this for
> > now, its not needed
> >
> > [...]
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > Rewriting code that is poorly written but fully understood is good.
> > Rewriting code that one doesnt understand is a sign that one is less smart
> > then the original author, trying to rewrite it will not make it better.
> >
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-26 Thread Pallavi Kumari
I mean deciding a timeline for the opw project. Which is to be mentioned in
application

On Wed, Oct 26, 2016 at 6:01 PM, Michael Niedermayer  wrote:

> Hi
>
> On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> > Hi Michael,
> >
> > I figured out the use of fft. Help me with the time line setting. Thanks
>
> I dont understand the question,
> if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this for
> now, its not needed
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> then the original author, trying to rewrite it will not make it better.
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-26 Thread Michael Niedermayer
Hi

On Mon, Oct 17, 2016 at 02:06:26PM +0530, Pallavi Kumari wrote:
> Hi Michael,
> 
> I figured out the use of fft. Help me with the time line setting. Thanks

I dont understand the question,
if its about AVFILTER_FLAG_SUPPORT_TIMELINE*, please ignore this for
now, its not needed

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-15 Thread Pallavi Kumari
I will makes the necessary changes.

On Sat, Oct 15, 2016 at 5:45 AM, Michael Niedermayer  wrote:

> On Sat, Oct 15, 2016 at 03:33:27AM +0530, Pallavi Kumari wrote:
> > Hi Michael,
> >
> > Please find the task at https://github.com/atana1/audio_stream
>
> The code should be a avfilter in libavfilter
> also it should be using the existing fft code
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> It is dangerous to be right in matters on which the established authorities
> are wrong. -- Voltaire
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-14 Thread Michael Niedermayer
On Sat, Oct 15, 2016 at 03:33:27AM +0530, Pallavi Kumari wrote:
> Hi Michael,
> 
> Please find the task at https://github.com/atana1/audio_stream

The code should be a avfilter in libavfilter
also it should be using the existing fft code

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-14 Thread Pallavi Kumari
Hi Michael,

Please find the task at https://github.com/atana1/audio_stream


Regards,
Pallavi
nick - atana

On Wed, Oct 12, 2016 at 6:26 AM, Michael Niedermayer  wrote:

> On Tue, Oct 11, 2016 at 11:54:04PM +0200, Michael Niedermayer wrote:
> > On Tue, Oct 11, 2016 at 09:52:08PM +0530, Pallavi Kumari wrote:
> > > >> added the entry with the sugested addition
> > >
> > > >> also you didnt list "Expected results" so i added some
> > >
> > > Thank you.
> > >
> > > Is the preferred language C for this kind of filter? C++ ?
> >
> > C (optional assembly optimizations are welcome too for speed critical
> > parts)
> >
> >
> > >
> > > I don't see a qualification task on the wiki. Let me know so that that
> I
> > > can start with it  and with writing the application.
> >
> > added something
> >
> > also submit your code early! there likely will be some comments and
> > suggestions to change this and that. early submission means less work
> > changing things
>
> also when you start working on a qualification task please add
> yourself to
> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12-Qualis
>
> [...]
>
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The greatest way to live with honor in this world is to be what we pretend
> to be. -- Socrates
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-11 Thread Michael Niedermayer
On Tue, Oct 11, 2016 at 11:54:04PM +0200, Michael Niedermayer wrote:
> On Tue, Oct 11, 2016 at 09:52:08PM +0530, Pallavi Kumari wrote:
> > >> added the entry with the sugested addition
> > 
> > >> also you didnt list "Expected results" so i added some
> > 
> > Thank you.
> > 
> > Is the preferred language C for this kind of filter? C++ ?
> 
> C (optional assembly optimizations are welcome too for speed critical
> parts)
> 
> 
> > 
> > I don't see a qualification task on the wiki. Let me know so that that I
> > can start with it  and with writing the application.
> 
> added something
> 
> also submit your code early! there likely will be some comments and
> suggestions to change this and that. early submission means less work
> changing things

also when you start working on a qualification task please add
yourself to
https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12-Qualis

[...]


-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-11 Thread Michael Niedermayer
On Tue, Oct 11, 2016 at 09:52:08PM +0530, Pallavi Kumari wrote:
> >> added the entry with the sugested addition
> 
> >> also you didnt list "Expected results" so i added some
> 
> Thank you.
> 
> Is the preferred language C for this kind of filter? C++ ?

C (optional assembly optimizations are welcome too for speed critical
parts)


> 
> I don't see a qualification task on the wiki. Let me know so that that I
> can start with it  and with writing the application.

added something

also submit your code early! there likely will be some comments and
suggestions to change this and that. early submission means less work
changing things


thanks

> 
> 
> Regards,
> Pallavi
> -atana
> 
> 
> On Tue, Oct 11, 2016 at 6:01 AM, Michael Niedermayer  > wrote:
> 
> > On Mon, Oct 10, 2016 at 10:48:19PM +0530, Pallavi Kumari wrote:
> > > Hi Nicholas,
> > >
> > > The use cases proposed by you is certainly very useful. You are welcome
> > to
> > > add it with the wiki content. Thanks again for your input :)
> >
> > added the entry with the sugested addition
> >
> > also you didnt list "Expected results" so i added some
> >
> > thx
> >
> > [...]
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > Those who are best at talking, realize last or never when they are wrong.
> >
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-11 Thread Pallavi Kumari
>> added the entry with the sugested addition

>> also you didnt list "Expected results" so i added some

Thank you.

Is the preferred language C for this kind of filter? C++ ?

I don't see a qualification task on the wiki. Let me know so that that I
can start with it  and with writing the application.


Regards,
Pallavi
-atana


On Tue, Oct 11, 2016 at 6:01 AM, Michael Niedermayer  wrote:

> On Mon, Oct 10, 2016 at 10:48:19PM +0530, Pallavi Kumari wrote:
> > Hi Nicholas,
> >
> > The use cases proposed by you is certainly very useful. You are welcome
> to
> > add it with the wiki content. Thanks again for your input :)
>
> added the entry with the sugested addition
>
> also you didnt list "Expected results" so i added some
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Those who are best at talking, realize last or never when they are wrong.
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-10 Thread Michael Niedermayer
On Mon, Oct 10, 2016 at 10:48:19PM +0530, Pallavi Kumari wrote:
> Hi Nicholas,
> 
> The use cases proposed by you is certainly very useful. You are welcome to
> add it with the wiki content. Thanks again for your input :)

added the entry with the sugested addition

also you didnt list "Expected results" so i added some

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are best at talking, realize last or never when they are wrong.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-10 Thread Pallavi Kumari
Hi Nicholas,

The use cases proposed by you is certainly very useful. You are welcome to
add it with the wiki content. Thanks again for your input :)

On Mon, Oct 10, 2016 at 10:33 PM, Nicolas George  wrote:

> Le nonidi 19 vendémiaire, an CCXXV, Pallavi Kumari a écrit :
> > Implementing filters for ffmpeg that would give different audio
> > fingerprints for an audio which could be reused by other people for
> variety
> > of applications. Goal of this system is given a song as an input, it
> would
> > spits out similar sounding songs. Some of its applications are:
> >
> > * detecting duplicate songs
> > * retrieving similar songs
> > * can be used for recommending songs
> > * clustering songs based on content/tags
>
> Sorry I did not follow up earlier in the discussion: maybe you could
> consider adding:
>
> * identifying a fragment of a recording
>
> I do not think this is covered by the other cases. My idea is this: imagine
> you have several recordings of some event (maybe a speech, or a concert),
> and you want to identify a small portion for something, a comment for
> example. If there were a reference recording available for anyone, you
> could
> just give the timing. But if not, you could identify the portion by its
> fingerprint. Then anyone who has a recording can look for the portion using
> the finger print.
>
> Another use case would be subtitles. It could look like catering for
> piracy,
> since official sources of subtitles certainly have all the timing
> information they need. But I can see legitimate reasons to take subtitles
> from the web even with a legal copy of the program: maybe living in a
> foreign country where the TV broadcasts do not have subtitles in the
> appropriate language.
>
> Regards,
>
> --
>   Nicolas George
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-10 Thread Nicolas George
Le nonidi 19 vendémiaire, an CCXXV, Pallavi Kumari a écrit :
> Implementing filters for ffmpeg that would give different audio
> fingerprints for an audio which could be reused by other people for variety
> of applications. Goal of this system is given a song as an input, it would
> spits out similar sounding songs. Some of its applications are:
> 
> * detecting duplicate songs
> * retrieving similar songs
> * can be used for recommending songs
> * clustering songs based on content/tags

Sorry I did not follow up earlier in the discussion: maybe you could
consider adding:

* identifying a fragment of a recording

I do not think this is covered by the other cases. My idea is this: imagine
you have several recordings of some event (maybe a speech, or a concert),
and you want to identify a small portion for something, a comment for
example. If there were a reference recording available for anyone, you could
just give the timing. But if not, you could identify the portion by its
fingerprint. Then anyone who has a recording can look for the portion using
the finger print.

Another use case would be subtitles. It could look like catering for piracy,
since official sources of subtitles certainly have all the timing
information they need. But I can see legitimate reasons to take subtitles
from the web even with a legal copy of the program: maybe living in a
foreign country where the TV broadcasts do not have subtitles in the
appropriate language.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-10 Thread Pallavi Kumari
>> its probably better if i add it but you can post a suggested wiki
>> marked up text here and ill add it to the page if it looks ok
>> ... my lazyness is limitless

Below is the content.

Audio Fingerprinting Filters for FFmpeg
**

Implementing filters for ffmpeg that would give different audio
fingerprints for an audio which could be reused by other people for variety
of applications. Goal of this system is given a song as an input, it would
spits out similar sounding songs. Some of its applications are:

* detecting duplicate songs
* retrieving similar songs
* can be used for recommending songs
* clustering songs based on content/tags


>> and that changes done during the project do improve this.
>> It should not be implemented and after that tested that would be bad
>> the earlier there is something that can be tested an compared against
>> competing solutions the better and easier it would be to tune things
>> and easily try modifications ...

I agree. This is something to consider while making a timeline.

>> frame rate ? you mean sample rate ?
Yes.

>> am i correct that with peaks you mean peaks in a frequency/time 2d
array ?
Yes.

On Sat, Oct 8, 2016 at 8:06 AM, Michael Niedermayer 
wrote:

> On Fri, Oct 07, 2016 at 10:49:42PM +0530, Pallavi Kumari wrote:
> > >> iam interrested, i intend to mentor only one applicant though
> > >> iam also the mentor for "Improve Selftest coverage"
> > >> (hint  if someone wants to take mentoring that over for example
> ...)
> >
> > Thank you for your interest :)
> > Is there any applicant for ''Improve Selftest coverage'' ?
>
> There were several applicants who contacted me and i told all to
> add themselfs to
> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12-Qualis
> (same as previous years)
> the page is still empty so iam not sure we have an applicant
>
>
> >
> > >> Do you have a suggeted entry for
> > >> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12
> > >> for this project ?
> >
> > This idea was proposed by me. I wanted to check first if it's relevant to
> > community. The community has show immense interest so, I was looking for
> > mentor(s). I would be happy to add this idea on the link mentioned above
> > (if I have permission) or some one with the edit permission can do it.
>
> its probably better if i add it but you can post a suggested wiki
> marked up text here and ill add it to the page if it looks ok
> ... my lazyness is limitless
>
> also with a project like this its important to carefuly test the
> fingerprinting to ensure degraded songs can be quickly and reliably
> be matched up in a large set of reference fingerprints/songs
>
> and that changes done during the project do improve this.
> It should not be implemented and after that tested that would be bad
> the earlier there is something that can be tested an compared against
> competing solutions the better and easier it would be to tune things
> and easily try modifications ...
>
>
> >
> >
> > >> also, important, we need a qualification task which should be a small
> > >> part of the whole that shows that the applicant is qualified/able to
> > >> do the project, any suggestion ?
> >
> > A small task could be writing a module that reads a sound file extract
> > sound information and frame rate also find point of interests (peak
>
> frame rate ? you mean sample rate ?
>
>
> > intensity points) and plot it on graph. Also add a unit test for this
> > module.
> >
> > what do you think?
>
> that "module" can be a audio->video libavfilter
> am i correct that with peaks you mean peaks in a frequency/time 2d
> array ?
>
> thx
>
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The misfortune of the wise is better than the prosperity of the fool.
> -- Epicurus
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-07 Thread Michael Niedermayer
On Fri, Oct 07, 2016 at 10:49:42PM +0530, Pallavi Kumari wrote:
> >> iam interrested, i intend to mentor only one applicant though
> >> iam also the mentor for "Improve Selftest coverage"
> >> (hint  if someone wants to take mentoring that over for example ...)
> 
> Thank you for your interest :)
> Is there any applicant for ''Improve Selftest coverage'' ?

There were several applicants who contacted me and i told all to
add themselfs to
https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12-Qualis
(same as previous years)
the page is still empty so iam not sure we have an applicant


> 
> >> Do you have a suggeted entry for
> >> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12
> >> for this project ?
> 
> This idea was proposed by me. I wanted to check first if it's relevant to
> community. The community has show immense interest so, I was looking for
> mentor(s). I would be happy to add this idea on the link mentioned above
> (if I have permission) or some one with the edit permission can do it.

its probably better if i add it but you can post a suggested wiki
marked up text here and ill add it to the page if it looks ok
... my lazyness is limitless

also with a project like this its important to carefuly test the
fingerprinting to ensure degraded songs can be quickly and reliably
be matched up in a large set of reference fingerprints/songs

and that changes done during the project do improve this.
It should not be implemented and after that tested that would be bad
the earlier there is something that can be tested an compared against
competing solutions the better and easier it would be to tune things
and easily try modifications ...


> 
> 
> >> also, important, we need a qualification task which should be a small
> >> part of the whole that shows that the applicant is qualified/able to
> >> do the project, any suggestion ?
> 
> A small task could be writing a module that reads a sound file extract
> sound information and frame rate also find point of interests (peak

frame rate ? you mean sample rate ?


> intensity points) and plot it on graph. Also add a unit test for this
> module.
> 
> what do you think?

that "module" can be a audio->video libavfilter
am i correct that with peaks you mean peaks in a frequency/time 2d
array ?

thx

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-07 Thread Pallavi Kumari
>> iam interrested, i intend to mentor only one applicant though
>> iam also the mentor for "Improve Selftest coverage"
>> (hint  if someone wants to take mentoring that over for example ...)

Thank you for your interest :)
Is there any applicant for ''Improve Selftest coverage'' ?

>> Do you have a suggeted entry for
>> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12
>> for this project ?

This idea was proposed by me. I wanted to check first if it's relevant to
community. The community has show immense interest so, I was looking for
mentor(s). I would be happy to add this idea on the link mentioned above
(if I have permission) or some one with the edit permission can do it.


>> also, important, we need a qualification task which should be a small
>> part of the whole that shows that the applicant is qualified/able to
>> do the project, any suggestion ?

A small task could be writing a module that reads a sound file extract
sound information and frame rate also find point of interests (peak
intensity points) and plot it on graph. Also add a unit test for this
module.

what do you think?


Thanks and regards,
Pallavi


On Fri, Oct 7, 2016 at 7:14 AM, Michael Niedermayer 
wrote:

> On Wed, Oct 05, 2016 at 11:23:11PM +0530, Pallavi Kumari wrote:
> > I am looking for mentor(s). Kindly let me know if anyone interested.
>
> iam interrested, i intend to mentor only one applicant though
> iam also the mentor for "Improve Selftest coverage"
> (hint  if someone wants to take mentoring that over for example ...)
>
> Do you have a suggeted entry for
> https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12
> for this project ?
>
> also, important, we need a qualification task which should be a small
> part of the whole that shows that the applicant is qualified/able to
> do the project, any suggestion ?
>
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Let us carefully observe those good qualities wherein our enemies excel us
> and endeavor to excel them, by avoiding what is faulty, and imitating what
> is excellent in them. -- Plutarch
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-06 Thread Michael Niedermayer
On Wed, Oct 05, 2016 at 11:23:11PM +0530, Pallavi Kumari wrote:
> I am looking for mentor(s). Kindly let me know if anyone interested.

iam interrested, i intend to mentor only one applicant though
iam also the mentor for "Improve Selftest coverage"
(hint  if someone wants to take mentoring that over for example ...)

Do you have a suggeted entry for
https://trac.ffmpeg.org/wiki/SponsoringPrograms/Outreachy/2016-12
for this project ?

also, important, we need a qualification task which should be a small
part of the whole that shows that the applicant is qualified/able to
do the project, any suggestion ?


thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-10-05 Thread Pallavi Kumari
I am looking for mentor(s). Kindly let me know if anyone interested.

On Tue, Sep 27, 2016 at 2:22 PM, Pallavi Kumari 
wrote:

> Lou, Jean thanks for your suggestions. I will go through them meanwhile I
> have finished a rough sketch of the idea. Please find it at [1].
>
> [1]  https://wiki.mozilla.org/Atana/idea
>
> On Tue, Sep 27, 2016 at 11:33 AM, Jean First  wrote:
>
>> On Sun Sep 25 2016 14:32:25 GMT+0200 (CEST), Pallavi Kumari wrote:
>>
>> [...]
>>
>> > I want to propose the idea of implementing filters for ffmpeg that would
>> > give different audio fingerprints for an audio which could be reused by
>> > other people for variety of applications. Goal of this system is given a
>> > song as a input, it would spits out similar sounding songs. Some of its
>> > applications are:
>> [...]
>>
>> Hi Pallavi,
>>
>> Your work could also be useful for applications similar to
>> https://github.com/stendardo/shenidam
>> Good luck with your work.
>>
>> Kind Regards,
>> Jean
>> ___
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-27 Thread Pallavi Kumari
Lou, Jean thanks for your suggestions. I will go through them meanwhile I
have finished a rough sketch of the idea. Please find it at [1].

[1]  https://wiki.mozilla.org/Atana/idea

On Tue, Sep 27, 2016 at 11:33 AM, Jean First  wrote:

> On Sun Sep 25 2016 14:32:25 GMT+0200 (CEST), Pallavi Kumari wrote:
>
> [...]
>
> > I want to propose the idea of implementing filters for ffmpeg that would
> > give different audio fingerprints for an audio which could be reused by
> > other people for variety of applications. Goal of this system is given a
> > song as a input, it would spits out similar sounding songs. Some of its
> > applications are:
> [...]
>
> Hi Pallavi,
>
> Your work could also be useful for applications similar to
> https://github.com/stendardo/shenidam
> Good luck with your work.
>
> Kind Regards,
> Jean
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-27 Thread Jean First
On Sun Sep 25 2016 14:32:25 GMT+0200 (CEST), Pallavi Kumari wrote:

[...]

> I want to propose the idea of implementing filters for ffmpeg that would
> give different audio fingerprints for an audio which could be reused by
> other people for variety of applications. Goal of this system is given a
> song as a input, it would spits out similar sounding songs. Some of its
> applications are:
[...]

Hi Pallavi,

Your work could also be useful for applications similar to
https://github.com/stendardo/shenidam
Good luck with your work.

Kind Regards,
Jean
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-26 Thread Lou Logan
Hi,

On Sun, Sep 25, 2016, at 04:32 AM, Pallavi Kumari wrote:
[...]
> I want to propose the idea of implementing filters for ffmpeg that would
> give different audio fingerprints for an audio which could be reused by
> other people for variety of applications.

chromaprint comes to mind. It may be of interest to you:
https://ffmpeg.org/ffmpeg-formats.html#chromaprint
https://acoustid.org/chromaprint
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-26 Thread Pallavi Kumari
Thanks for the inspiring reply Nicholas :) I am glad that you find the idea
very interesting.

>> I think this could be a very interesting project, but maybe also very
hard.
>> I myself do not have the skills or knowledge to help in any way in that
area.

I have been reading few papers related to such field and have some basic
idea as my research interest is in the area of information retrieval, ML
and Deep learning. I think this could be doable. Also, looking forward for
mentor(s) for this project.

>> OTOH, there is one use that I have in mind that may not be covered by
existing algorithms: fingerprinting a short
>> segment of audio to search for it efficiently and accurately in a larger
footage without access to the original
>> segment, and even if it was subjected to a different lossy codec or even
small changes in pitch or speed. To be
>> honest, I do not know if it is even possible, but it would be very
useful.

This was something in my mind too. Music application like Shazam does a
pretty good job for this purpose.  Given a piece of music from an audio (or
humming manual) it finds exact song and the similar songs.

Algorithms for the above scenario can be done by doing spectrum analysis
(fingerprinting) technique. Let me make a draft explaining algorithmic
steps in details.

Looking forward to more interesting views/opinions.


Regards,
Pallavi,
IRC - atana

On Mon, Sep 26, 2016 at 10:33 PM, Nicolas George  wrote:

> Le quartidi 4 vendémiaire, an CCXXV, Pallavi Kumari a écrit :
> > I want to propose the idea of implementing filters for ffmpeg that would
> > give different audio fingerprints for an audio which could be reused by
> > other people for variety of applications. Goal of this system is given a
> > song as a input, it would spits out similar sounding songs. Some of its
> > applications are:
> >
> > * detecting duplicate songs
> > * retrieving similar songs
> > * can be used for recommending songs
> > * clustering songs based on content/tags
>
> > Kindly, let me know if the proposed idea sounds interesting and relevant
> to
> > the community. I would be happy to share a rough draft containing
> details.
>
> I think this could be a very interesting project, but maybe also very hard.
> I myself do not have the skills or knowledge to help in any way in that
> area.
>
> I think a few fingerprinting algorithms of the kind exist. Implementing
> them
> with ffmpeg's DSP infrastructure would probably be easier than designing
> one
> from scratch.
>
> OTOH, there is one use that I have in mind that may not be covered by
> existing algorithms: fingerprinting a short segment of audio to search for
> it efficiently and accurately in a larger footage without access to the
> original segment, and even if it was subjected to a different lossy codec
> or
> even small changes in pitch or speed. To be honest, I do not know if it is
> even possible, but it would be very useful.
>
> Regards,
>
> --
>   Nicolas George
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-26 Thread Nicolas George
Le quartidi 4 vendémiaire, an CCXXV, Pallavi Kumari a écrit :
> I want to propose the idea of implementing filters for ffmpeg that would
> give different audio fingerprints for an audio which could be reused by
> other people for variety of applications. Goal of this system is given a
> song as a input, it would spits out similar sounding songs. Some of its
> applications are:
> 
> * detecting duplicate songs
> * retrieving similar songs
> * can be used for recommending songs
> * clustering songs based on content/tags

> Kindly, let me know if the proposed idea sounds interesting and relevant to
> the community. I would be happy to share a rough draft containing details.

I think this could be a very interesting project, but maybe also very hard.
I myself do not have the skills or knowledge to help in any way in that
area.

I think a few fingerprinting algorithms of the kind exist. Implementing them
with ffmpeg's DSP infrastructure would probably be easier than designing one
from scratch.

OTOH, there is one use that I have in mind that may not be covered by
existing algorithms: fingerprinting a short segment of audio to search for
it efficiently and accurately in a larger footage without access to the
original segment, and even if it was subjected to a different lossy codec or
even small changes in pitch or speed. To be honest, I do not know if it is
even possible, but it would be very useful.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [OPW] OPW Project Proposal

2016-09-25 Thread Pallavi Kumari
Hi folks,

I am Pallavi Kumari, a recent graduate in Computer Science from IIIT
Hyderabad, India. My areas of interest includes Information Retrieval and
Extraction, Machine learning, Deep learning , algorithms. I have sound
knowledge C, C++, Python and am familiar with various open source
technologies like Git, Django, elastic search, redis, mongodb etc. I have
some experience with open source contributions and have contributed to some
organizations like Mozilla, Ubuntu, Fedora. Built a text based search
engine from scratch on Wikipedia dump.

I want to propose the idea of implementing filters for ffmpeg that would
give different audio fingerprints for an audio which could be reused by
other people for variety of applications. Goal of this system is given a
song as a input, it would spits out similar sounding songs. Some of its
applications are:

* detecting duplicate songs
* retrieving similar songs
* can be used for recommending songs
* clustering songs based on content/tags

I had discuss this idea with Compn on #ffmpeg-devel irc which he finds
interesting and suggested me to put it on the mailing list. I am excited
about this project and would like to contribute to it and would be glad to
know your views on it.

Kindly, let me know if the proposed idea sounds interesting and relevant to
the community. I would be happy to share a rough draft containing details.

Let me know the further procedure. Your guidance is highly appreciated.


Regards,
Pallavi
IRC - atana
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel