Page 1 of 1

Disable libvlc debug output

Posted: 28 May 2008 19:50
by davidhoyt
Hi there,

I've compiled the latest version of VLC from the git repository and I have it up and running in both windows (XP) and linux (kubuntu 8.0.4). I'm using the latest JVLC compiled from source as well. Is there a way to disable the following output? I configured it with --enable-release but I'm still getting this:

[00000001] main libvlc debug: translation test: code is "C"
[00000680] main libvlc debug: VLC media player - version 0.9.0-git Grishenko - (c) 1996-2008 the VideoLAN team
[00000680] main libvlc debug: libvlc was configured with ./configure '--prefix=/work/vlc/compiled-vlc-linux-x86/' '--with-ffmpeg-tree=/work/ffmpeg/' '--with-dca-tree=/work/libdca/' '--with-fribidi-path=/work/fribidi/' '--with-x264-tree=/work/x264' '--enable-shared' '--disable-gtk' '--enable-nls' '--enable-ffmpeg' '--with-ffmpeg-mp3lame''--with-ffmpeg-faac' '--with-ffmpeg-zlib' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-live555' '--disable-cddax' '--disable-vcdx' '--enable-twolame' '--enable-dvdread' '--enable-dca' '--disable-mkv' '--disable-taglib' '--enable-release' '--enable-java-bindings' '--enable-shared-libvlc' '--enable-optimizations' '--enable-sse' '--enable-mmx' '--enable-v4l' '--enable-v4l2' '--enable-opengl' '--enable-sdl' '--enable-caca' '--enable-aa' '--enable-xvideo' '--enable-xinerama' '--enable-x11' '--enable-glx' '--enable-libmpeg2' '--enable-mad' '--enable-x264' '--enable-png' '--enable-alsa' '--enable-arts' '--enable-esd' '--enable-jack' '--enable-portaudio' '--enable-hd1000a' '--enable-oss' '--enable-realrtsp'
[00000680] main libvlc debug: translation test: code is "C"


I'd prefer if that wasn't being output at all. Thanks!

Re: Disable libvlc debug output

Posted: 30 May 2008 19:37
by davidhoyt
Anyone out there? Hello?

Re: Disable libvlc debug output

Posted: 30 May 2008 19:44
by Jean-Baptiste Kempf
I don't think you can without patching it.

Re: Disable libvlc debug output

Posted: 31 May 2008 00:26
by davidhoyt
This doesn't appear when running the executable under Windows at least. Where would I patch it? I don't even know where to begin...

Re: Disable libvlc debug output

Posted: 05 Jun 2008 17:38
by davidhoyt
Why is this text output by default? Doesn't make any sense. If you were to call something to return this info., that would be fine, but outputting to the console by default doesn't seem right. At any rate, I could still use some help with this one. Thanks!

Re: Disable libvlc debug output

Posted: 05 Jun 2008 19:41
by Rémi Denis-Courmont
This debug message comes before the verbosity level is determined (command line and config file parsing) . That's why it always comes.

Re: Disable libvlc debug output

Posted: 06 Jun 2008 18:42
by davidhoyt
So will it be fixed before the next release?

Re: Disable libvlc debug output

Posted: 30 Jun 2008 21:45
by davidhoyt
Hello? <Crickets chirping>

Re: Disable libvlc debug output

Posted: 30 Jun 2008 22:11
by Rémi Denis-Courmont
Probably not.

Re: Disable libvlc debug output

Posted: 01 Jul 2008 23:17
by davidhoyt
Wait. So you're saying that in the next release you'll have debug messages output to the screen? :shock: That doesn't make sense. Am I missing something here?

Where is this text output so I can just comment out those lines? And why, if I'm doing a release compile, is it outputting debug messages? Sounds like a bug to me... :?

Re: Disable libvlc debug output

Posted: 02 Jul 2008 09:18
by Jean-Baptiste Kempf
Wait. So you're saying that in the next release you'll have debug messages output to the screen? :shock: That doesn't make sense. Am I missing something here?

Where is this text output so I can just comment out those lines? And why, if I'm doing a release compile, is it outputting debug messages? Sounds like a bug to me... :?
Fix it!

Re: Disable libvlc debug output

Posted: 02 Jul 2008 16:55
by Rémi Denis-Courmont
Wait. So you're saying that in the next release you'll have debug messages output to the screen? :shock: That doesn't make sense. Am I missing something here?
You did not read the explanation, did you?

Re: Disable libvlc debug output

Posted: 02 Jul 2008 20:28
by davidhoyt
I read all the explanations and no one has actually ANSWERED MY QUESTIONS.

Let's review the history here:

1. I made the initial question.
2. I was told I would have to patch it.
3. I asked where to go to patch it.
4. Nobody told me where.
5. I asked why its output at all. In English, that means, "Why output this stuff if no one cares about it??"
6. Nobody answered that. Instead I was told, "This debug message comes before the verbosity level is determined" which doesn't answer the question.
7. I asked if this will be fixed before the next release because it seemed like a bug.
8. A month later I was told it would not be fixed.
9. I then asked why you would write out debug messages in a release build.
10. I was told to fix it. (What???!?? That answer makes NO sense! And it doesn't answer the question!)
11. I was told I didn't read the explanation.

So apparently I'm the only one who actually read the explanation. I will refer you to #3 above where I asked "where do I go to patch this?" VLC is a large project and I don't know where to begin. I'll gladly patch it, but I need to be pointed in the right direction. I don't have a lot of time every day to dedicate to sifting through the VLC source code. I hope you can appreciate that.

Re: Disable libvlc debug output

Posted: 02 Jul 2008 21:22
by Rémi Denis-Courmont
Some people do care about this. Just look for the number of debug logs in forum.

Re: Disable libvlc debug output

Posted: 16 Jul 2008 22:29
by davidhoyt
Um...yes, for debugging purposes, it's fine...but I'm doing a release build and it's still outputting debug information. That's a bug.

Re: Disable libvlc debug output

Posted: 16 Jul 2008 22:38
by davidhoyt
:? No offense - is there someone in the house who speaks English and could help out? I would really appreciate it. Thanks! :D

Re: Disable libvlc debug output

Posted: 17 Jul 2008 00:07
by pdherbemont
You can remove that output by setting the environement variable VLC_VERBOSE to 0 or -1

Re: Disable libvlc debug output

Posted: 17 Jul 2008 02:28
by davidhoyt
Holy cow I actually got an answer...

That's great, but I don't want to have to expect users to do that. If I define that env. variable and compile, will it be gone entirely? (IOW, it won't be compiled in anymore?)

Re: Disable libvlc debug output

Posted: 17 Jul 2008 02:40
by davidhoyt
While you're at it...do you think you could please take a look at my other posts that no one else has been able to answer? I would sure appreciate it. Mainly: viewtopic.php?f=2&t=47004 and viewtopic.php?f=2&t=47875.

Re: Disable libvlc debug output

Posted: 17 Jul 2008 19:35
by pdherbemont

Code: Select all

man 3 setenv

Code: Select all

int setenv(const char *name, const char *value, int overwrite); int unsetenv(const char *name); DESCRIPTION These functions set, unset and fetch environment variables from the host environment list. For compatibility with differing environment conventions, the given arguments name and value may be appended and prepended, respectively, with an equal sign ``=''. The getenv() function obtains the current value of the environment variable, name. The setenv() function inserts or resets the environment variable name in the current environment list. If the variable name does not exist in the list, it is inserted with the given value. If the variable does exist, the argument overwrite is tested; if overwrite is zero, the variable is not reset, otherwise it is reset to the given value.
setenv does exactly what you want. Put that in your code prior to init libvlc...

For the rest, you are on your own, please dig into the code, and try to modify to suit your needs.

Also, listening to others suggestions is always a good idea...
Holy cow I actually got an answer...
Please read how much replies you had to your topics. And even if you haven't always get the answers you wanted, you have had answers with some hints.

Please stop trolling.

Pierre.

Re: Disable libvlc debug output

Posted: 17 Jul 2008 21:41
by davidhoyt
1. Thank you for your response. I really appreciate it and it really helps point me in the right direction.

2. Don't be so quick to start labeling people. I'm not "trolling" (which to me implies intent) - I was genuinely glad that someone actually answered a question. Most of the answers I got had absolutely nothing to do w/ the topic. If I post the question, "what's 1+1?" and get the answer "Fix it!", does that make any sense to you?? That's what was happening if you read most of the posts for this topic. If anyone's trolling, it's the people that were replying. Definition of trolling (from Wikipedia):
An Internet troll, or simply troll in Internet slang, is someone who posts controversial and usually irrelevant or off-topic messages in an online community, such as an online discussion forum or chat room, with the intention of baiting other users into an emotional response or to generally disrupt normal on-topic discussion.
Was my post off-topic? The responses I got had nothing to do with the question and were therefore trolling. "Fix it!" has the intention of baiting another into an emotional response. So it's the pot calling the kettle black (La pelle se moque du fourgon).

People's reactions have to do w/ the quality of the response. Don't be surprised when someone's happy to finally get an answer 2 months after they posted their original question. I figured it was a language barrier issue, to be honest. I see lots of posts on here where the people give up because no one gives them any real help. "Fix it!" doesn't help someone who's completely unfamiliar with the environment. You can yell that at them until you're blue in the face, but it does no good. And then it does no good when the person asks, "how do I do that or where do I begin?" and then gets spammed.

Re: Disable libvlc debug output

Posted: 17 Jul 2008 21:41
by davidhoyt
A little more on-topic:

setenv() doesn't seem cross platform compatible. We're attempting to run this on Windows, Mac OSX, and Linux. Since I'm not familiar with the VLC environment (more than to just compile it), is there a call I could use there that would be universally applicable?

Re: Disable libvlc debug output

Posted: 17 Jul 2008 21:49
by pdherbemont
True it works on Linux and Mac OS X natively, but on windows you'll have to use cygwin or something.

Yet a simple google ("setenv+win32") gives

Code: Select all

SetEnvironmentVariable The SetEnvironmentVariable function sets the value of an environment variable for the current process. BOOL SetEnvironmentVariable( LPCTSTR lpName, // address of environment variable name LPCTSTR lpValue // address of new value for variable );
Pierre.

Re: Disable libvlc debug output

Posted: 17 Jul 2008 21:57
by davidhoyt
Okay, I was hoping VLC had some function call somewhere that already abstracted that out for me and I could just use it. This will do, though. Thanks again! :D

In summary (for those of you who don't want to read all the posts):

Before you initialize libvlc, call setenv() in linux/mac and SetEnvironmentVariable() in windows and set "VLC_VERBOSE" to "0" or "-1".

Re: Disable libvlc debug output

Posted: 17 Jul 2008 22:08
by pdherbemont
Okay, I was hoping VLC had some function call somewhere that already abstracted that out for me and I could just use it. This will do, though. Thanks again!
Actually that something we do want. I'll try to implement something.

Pierre.