Page 1 of 1
audio visual effect issue
Posted: 14 Nov 2010 15:10
by XilasZ
Hi,
I've just noticed that in the latest version of libvlc, the audio visual effect can be set only once.
With the same vlc instance, i use libvlc_media_new_location and libvlc_media_player_set_media to change media.
I also add a few options on the media (audio_track_id, audio-visual, deinterlace, ...), depending if the media is video or audio.
So i use libvlc_media_add_option(p_media, "audio-visual=visualizer") for audio streams/files only.
Until version 1.0.5, it was working fine, i could change media, the visual effect appears only for audio streams/files.
But in libvlc 1.1.5, it's not working anymore. Only the audio-visual setting of the first media played is taking into account.
if the first media played is audio, i set "audio-visual=visualizer", and the visual effect will be displayed for all media (video and audio), even without calling libvlc_media_add_option for those media.
if the first media played is video, i don't set "audio-visual=visualizer", and the visual effect will be never be displayed for all media (video and audio), even with calling libvlc_media_add_option for those media.
VLC 1.1.5 doesn't have this issue, only libvlc does.
By the way, as the goom effect is very old and unstable on windows (it crashs often on startup, and disabling/renabling hardware acceleration make it start again, but only once) i was thinking about using projectM.
I know it's not working yet on windows, but as i've managed to make my own plugin from VS2008 (an audio output plugin, based on directx plugin and ac3filter's lib to convert the audio signal to any number of channels from 1to6 , apply gain and delay per channel, DRC, ...), maybe i can help.
What do i need to compile and test the plugin ?
Thanks for your help.
Re: audio visual effect issue
Posted: 14 Nov 2010 16:53
by MichaelMc
With my libvlc based media player, which is in use daily, the Goom effect (or related) has never crashed. Could it be your system and/or software?
Re: audio visual effect issue
Posted: 14 Nov 2010 20:07
by XilasZ
It may be related to the video card. i had an nvidia before and it was working fine, but now i got an ati, and it crashes, as if something is not initialized/released correctly.
It only affects the goom effect of vlc, all games and 3d related programs works fine, so i assume there is a bug inside goom.
Re: audio visual effect issue
Posted: 17 Nov 2010 07:43
by heng
I've also noticed the mentioned problem. If your first media is using the "audio-visual=visualizer" option, you get stuck with this visual effect, even if you open a new media w/o any options. It looks like a bug in the new 1.1.5 version.
I found a quick workaround, you may add the "effect-list=none" option to all media files that don't need any visual effects.
However, if I open a media file w/o visual-effect, any subsequent use of visual-effect will not show the required effect.
A better workaround (but uglier and less efficient) would be to add the following lines before you open a media file:
Code: Select all
libvlc_media_player_release(m_pMediaPlayer);
m_pMediaPlayer = libvlc_media_player_new(m_pVLCInstance);
libvlc_media_player_set_hwnd(m_pMediaPlayer, m_pHwnd);
I hope they fix this bug for the next version...
Re: audio visual effect issue
Posted: 17 Nov 2010 21:02
by XilasZ
nice try, but the "effect-list=none" fix doesn't always work.
For instance, if the first media is a video with "effect-list=none", visual effects won't work for another media, even with "audio-visual=visualizer".
But yes, if the first media is an audio one with "audio-visual=visualizer", "effect-list=none" will prevent visual effects from being shown if not needed.
Re: audio visual effect issue
Posted: 18 Nov 2010 15:45
by mangokm40
I'm using libvlc 1.1.4. It has the same issue.
However, I just use:
libvlc_media_add_option(p_media, "audio-visual=visual");
libvlc_media_add_option(p_media, "effect-list=scope");
OR
libvlc_media_add_option(p_media, "audio-visual=visual");
libvlc_media_add_option(p_media, "effect-list=none");
This is working as expected.
Re: audio visual effect issue
Posted: 18 Nov 2010 15:49
by mangokm40
I updated to version 1.1.5. The above still works fine & I'm able to show visualization only when I want it.
I noticed that libvlc_get_version() is returning "1.1.0 The Lugagge." Is this a 'bug'?
I forgot to mention, I also have the issue where "goom" only works once and then crashes after that.
In case it matters, It's working with WinXP SP3 or Win7 64 with VC2008.
Re: audio visual effect issue
Posted: 18 Nov 2010 21:25
by XilasZ
Arf, i feel stupid, i forgot, i already tried "audio-visual=visual" on audio files, and "effect-list=none" on videos, but of course "effect-list=none" alone does nothing, as it's just a subsetting of the "visual" module.
Thanks for the tip.
Working perfectly fine now with the "visual" module. But it doesn't solve the issue if i want to use the goom effect (i switch to visual because of the crash) :p
By the way, a 100% way of making goom work again on windows is to disable and then renable the hardware acceleration of the graphic card.
I'm currently cross compiling vlc for windows from ubuntu, i'll try to take a llok at the issue, and/or goom (which crashes) and/or projectM (which doesn't work at all).
Re: audio visual effect issue
Posted: 19 Nov 2010 02:06
by Jean-Baptiste Kempf
I noticed that libvlc_get_version() is returning "1.1.0 The Lugagge." Is this a 'bug'?
Or a miscompilation
I forgot to mention, I also have the issue where "goom" only works once and then crashes after that.
Goom is crap code, I am not surprised.
Re: audio visual effect issue
Posted: 19 Nov 2010 06:50
by XilasZ
i got "1.1.5 The Lugagge" on windows from libvlc_get_version. But it's true that the version in the properties of libvlccore.dll file is still "1.1.0".
About goom, there was no crash when i had an nvidia. but since i got an ati, it happens. So i think it's related to some release of opengl components which works on nvidia only.
j-b, do you have an idea where the issue (the visual effect module which stays across media) might be located in the code ?
PS: nice conference on tuesday, i was there, but i couldn't stay to talk, i had to go back to work
Re: audio visual effect issue
Posted: 20 Nov 2010 00:51
by Jean-Baptiste Kempf
i got "1.1.5 The Lugagge" on windows from libvlc_get_version. But it's true that the version in the properties of libvlccore.dll file is still "1.1.0".
This is bug in the .rc files that is fixed in 1.2.0
About goom, there was no crash when i had an nvidia. but since i got an ati, it happens. So i think it's related to some release of opengl components which works on nvidia only.
Oh, ok.
j-b, do you have an idea where the issue (the visual effect module which stays across media) might be located in the code ?
modules/visualisation/goom.c
Re: audio visual effect issue
Posted: 20 Nov 2010 01:26
by XilasZ
j-b, do you have an idea where the issue (the visual effect module which stays across media) might be located in the code ?
modules/visualisation/goom.c
I was talking about a more general issue, which affects both goom and visual effects. the core seems to load the "audio-visual" option, and never release it when changing media. It's a regressing in 1.1.x, as it was working 1.0.x.
I've successfully cross compiled vlc from ubuntu, everything is ready, so i'll start to do some digging in the core soon. I'll contact you on IRC if i find something or have a question.