[MPlayer-dev-eng] Audio visualization

Pavel Modilaynen kopli at mail.ru
Wed Feb 6 12:22:42 CET 2008


Tuesday, February 5, 2008, 7:18:12 PM, Reimar Doffinger wrote:
> On Tue, Feb 05, 2008 at 06:47:33PM +0300, Pavel Modilaynen wrote:
>> New files:
>>   - vz.c/vz.h - main audio visualization functionality (like ad.c,
>>   vf.c,.. ), table of visualizers, entries;
>>   - vz_xxx.c - visualizer's implementation itself / access to external
>>   libs (sticking to the conception of libmpcodecs)

> I don't see why you can't just use a normal video filter. Just add a new
> IMGFMT_AUDIO or so.

And how in this case will I work with audio path inside video filter?
It doesn't know and doesn't have to know about any audio.
This would be real mess if not. And IMGFMT_AUDIO sounds crazy IMHO :)

In my proposed approach video filter support, of course, remains.
And what is really important - it's exactly the same.
As I read in MPlayer documentation - the purpose of vf
is resize/reformat/recolor and not "generation of video or images".

So, I think, the best place for entry - is the audio demuxer
(or mplayer.c itself ??).
There is nothing awful in this - we just ask an audio demuxer -
would you please convert the audio going through to the video.
And it answers - yes, of course, which conversion do you want?
dimensions?fps?spectrum?

And you still have possibility to use any vf like in
case of true video.

>> And functionality might be the following:
>>   - in demux_audio.c: demux_audio_open() - check if visualization
>>     needed, and call vz_init () which calls appropriate
>>      vz_xxx.c: init ()
>>   - in demux_audio.c: demux_audio_fill_buffer () - check if
>>   visualization was enabled - pass control to vz_process() which
>>   calls vz_xxx.c: process ()
>> That is intuitively understandable imho.

> Well, I can overcome my personal opinions if necessary, but my honest
> and personal opinion is that it is a (if done right only small) mess for
> a useless feature ;-)
> Keep in mind that it is "MPlayer - The Movie Player" :-)

The future will judge the feature. :)
Why somebody is obliged to find some other libs to do this
simple task, wasting time and etc.
Yes it's certainly the Movie Player, but why it can't
be a little bit more powerfull :)

BTW, can you advice any fft lib that converts data to image
that can be used to help MPlayer to do the audio visualization.



Thank you for your consideration.
-- 
Pavel Modilaynen




More information about the MPlayer-dev-eng mailing list