[FFmpeg-devel] [PATCH] lavfi: add audio eval signal source
Nicolas George
nicolas.george at normalesup.org
Sun Oct 16 12:09:03 CEST 2011
Le quartidi 24 vendémiaire, an CCXX, Stefano Sabatini a écrit :
> Extended. I opted for the syntax:
> expr1|expr2|...|exprN:opts
>
> Assumptions: ":" and "|" must not appear in the expressions.
I like Michael's suggestion slightly better: expr1:expr2::opts.
> $ ffplay -f lavfi "aevalsrc=abs(sin(1/10*2*PI*t))*sin(440*2*PI*t)|(1-abs(sin(1/10*t*2*PI)))*sin(450*2*PI*t + PI*sin(2*PI*t)), aconvert=s16:stereo:packed"
>
> note that the aconvert=s16:stereo:packed is (unfortunately) required
> or there will be a conversion to mono, as the auto-inserted aconvert
> merges all the formats supported by aconvert with the output filter
> formats, and this is done *before* to merge the formats supported by
> aevalsrc and aconvert (but I'm thinking to add a new aconvert mode for
> forcing aconvert to use the same input formats whenever it's
> possible).
I am not sure I understand exactly the problem, but it looks like a serious
misfeature. Why does the auto-inserted aconvert squish this particular case
of stereo, and not all stereo files?
> + at item
> +Generate two signals in the left and right channel:
> + at example
> +aevalsrc=sin(440*2*PI*t)|sin(450*2*PI*t + PI*sin(2*PI*t))
> + at end example
Maybe a more practically useful example:
+ at item
+Generate 2.5 Hz binaural beats on a 360 Hz carrier:
+ at example
+aevalsrc=0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)
+ at end example
(one day, I'll try to rewrite sbagen as a ffmpeg format/codec...)
Apart from that, it looks really fine.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111016/9cd1a3ef/attachment.asc>
More information about the ffmpeg-devel
mailing list