Page 1 of 1

No way to redirect VLC debug output to file?

Posted: 08 Nov 2012 15:37
by kostyan
Hi,

I am trying to redirect VLC output to file on Android.
I do: vlc --file-logging --logfile /mnt/sdcard/VLCDebug/log.txt --log-verbose 2
However, it does not work.

Appreciate any hints!

Re: No way to redirect VLC debug output to file?

Posted: 08 Nov 2012 16:12
by Jean-Baptiste Kempf
You need to specify the --logmode file --logfile /mnt/sdcard/VLCDebug/log.txt --extraintf=logger

Re: No way to redirect VLC debug output to file?

Posted: 13 Nov 2012 11:40
by kostyan
Unfortunately, that does not work. Adding the logfile option causes VLC to crash like this:

3964:11-13 11:28:53.093: V/VLC/LibVLC(7670): Initializing LibVLC
3965:11-13 11:28:53.124: D/VLC(7670): [0x56f15048]: main libvlc VLC media player - 2.1.0-git Rincewind
3966:11-13 11:28:53.124: D/VLC(7670): [0x56f15048]: main libvlc Copyright © 1996-2012 the VideoLAN team
3967:11-13 11:28:53.124: D/VLC(7670): [0x56f15048]: main libvlc revision 1.3.0-git-4303-ge5c2aee
3968:11-13 11:28:53.124: D/VLC(7670): [0x56f15048]: main libvlc configured with ../configure '--host=arm-linux-androideabi' '--build=x86_64-unknown-linux' '--enable-neon' '--enable-live555' '--enable-realrtsp' '--enable-avformat' '--enable-swscale' '--enable-avcodec' '--enable-opus' '--enable-opensles' '--enable-android-surface' '--enable-mkv' '--enable-taglib' '--enable-dvbpsi' '--disable-vlc' '--disable-shared' '--disable-vlm' '--disable-dbus' '--disable-lua' '--disable-vcd' '--disable-v4l2' '--disable-gnomevfs' '--disable-dvdread' '--disable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-decklink' '--disable-libva' '--disable-dv1394' '--disable-mod' '--disable-sid' '--disable-gme' '--disable-tremor' '--disable-mad' '--disable-dca' '--disable-sdl-image' '--disable-zvbi' '--disable-fluidsynth' '--disable-jack' '--disable-pulse' '--disable-alsa' '--disable-samplerate' '--disable-sdl' '--disable-xcb' '--disable-atmo' '--disable-qt' '--disable-skins2' '--disable-mtp' '--disable-notify' '--enable-libass' '--disable-svg' '--disable-sqlite
3970:11-13 11:28:53.155: W/ActivityManager(742): Activity pause timeout for ActivityRecord{41e066a8 org.videolan.vlc/.gui.MainActivity}
3974:11-13 11:28:53.288: D/VLC(7670): [0x56f15048]: main libvlc plug-ins loaded: 212 modules
3975:11-13 11:28:53.288: D/VLC(7670): [0x56f15048]: main libvlc opening config file (/mnt/sdcard/.automatichandover/vlcrc)
3977:11-13 11:28:53.296: I/VLC/JNI/main(7670): LibVLC initialized: 0x0
3978:11-13 11:28:53.296: A/libc(7670): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 7670 (rg.videolan.vlc)

Specifically, when I edit libvlcjni.c to include the following command line arguments when creating the libvlc instance:

Code: Select all

const char *argv[] = { "-I", "dummy", "--no-osd", "--no-video-title-show", "--no-stats", "--no-plugins-cache", "--no-drop-late-frames", "--avcodec-fast", "--avcodec-threads=0", "--no-ignore-config", "--config", "/mnt/sdcard/.automatichandover/vlcrc", "--extraintf=logger", // "--logmode", "file", // "--logfile", "/mnt/sdcard/VLCDebug/log.txt", enable_time_stretch ? "--audio-time-stretch" : "--no-audio-time-stretch", use_opensles ? "--aout=opensles" : "--aout=android_audiotrack", }; libvlc_instance_t *instance = libvlc_new(sizeof(argv) / sizeof(*argv), argv);
I get:
D/VLC(6910): [0x56d034d8]: main interface no interface module matched "logger,none"
E/VLC(6910): [0x56d034d8]: main interface no suitable interface module

When I add the logmode and/or the logfile options, I get the crash as above.

Re: No way to redirect VLC debug output to file?

Posted: 20 Nov 2012 11:12
by kostyan
Any hints how to redirect VLC debug output to a file on Android?

Best,
Konstantin

Re: No way to redirect VLC debug output to file?

Posted: 20 Nov 2012 23:08
by edwardw

Re: No way to redirect VLC debug output to file?

Posted: 28 Nov 2012 15:02
by kostyan
The problem is that config_LoadCmdLine returns -1 in libvlc.c:203.

Re: No way to redirect VLC debug output to file?

Posted: 05 Dec 2012 17:06
by kostyan
To be more specific, vlc on android seems not to understand the options --logmode neither --logfile.

In cmdline.c, when the list of possible options is created, neither of those two options is included. That's why, the call to vlc_getopt_long returns 63 (which is '?').

Let me know if you need more info!

Thanks for your effort!

Best,
Konstantin

Re: No way to redirect VLC debug output to file?

Posted: 12 Dec 2012 12:21
by kostyan
Could you at least state if output to file is broken in Android or if it is working and the problem is on my side?

Re: No way to redirect VLC debug output to file?

Posted: 13 Dec 2012 00:49
by Jean-Baptiste Kempf
Probably broken on Android.

Re: No way to redirect VLC debug output to file?

Posted: 17 Dec 2012 02:34
by funman
It's rather that the file logging module is absent for size reasons (we don't use it so we don't ship it)