Page 1 of 1

Which libvlc_new() parameters do you use?

Posted: 11 Jul 2010 19:59
by Rémi Denis-Courmont
For mostly historical reasons, libvlc_new() accept a list of strings like command line parameters. This is inherited from VLC, which relies on LibVLC to parse its command line. Those parameters depend on the version, platform and included plugins, so it is generally a good idea to not use them. There is always a risk that it will break if LibVLC is upgraded, a plugin is removed, or refactored,

Unfortunately, some parameters have become part of some kind of programming cargo cult. For instance, "--ignore-config" is often listed there. This is useless as it is the default. Similarly the pair of "-I", "dummy" is useless, as LibVLC does not attempt to start an interface by default; it only does that if you do call libvlc_add_intf() explicitly. Then there is "--plugin-path" which should be avoided unless your software ships with its own plugins - LibVLC automatically scans the plugins directory from wherever it is installed. And libvlc_set_log_verbosity() should be favored over "-v".

In the long term, most useful parameters should be converted to new explicit semantic API extensions to LibVLC. So which ones do you use/need?

Re: Which libvlc_new() parameters do you use?

Posted: 11 Jul 2010 20:28
by sherington
I use the ones that prevent things from displaying via the OSD, like --no-video-title-show, or --no-osd.

Sorry, edited to say "--no-video-title-show" rather than "--no-video-title".

If I do not pass that value to libvlc_new() I will get the video title overlayed on top of the video for a few seconds. I don't want that so I turn it off using this parameter value - and it does work.

(Edit) I've searched the source code briefly and I'm actually confused as to how it works, but it does seem to.

Re: Which libvlc_new() parameters do you use?

Posted: 11 Jul 2010 20:52
by sherington
Is there a direct link between the logging verbosity parameter "-v" and the libvlc_set_log_verbosity(level) method?

The reason I ask is that I often do use "-vvv" because it makes getting the debug output very simple, but if I call libvlc_set_log_verbosity(1) (or whatever level value) it does not seem to cause the same logging to be generated. Am I supposed to do something else to actually get the log output when using the API log verbosity methods, like iterating the log and sending the messages to the console myself?

I'm clearly not doing something I'm supposed to be doing - anyway I just wanted to say I do actually use "-vvv" rather than the API at the moment.

Re: Which libvlc_new() parameters do you use?

Posted: 11 Jul 2010 21:38
by Rémi Denis-Courmont
--no-video-title does not exist that I know. --video-title is a string, and is only used if the video is not "embedded" in a widget.

Re: Which libvlc_new() parameters do you use?

Posted: 12 Jul 2010 00:01
by MichaelMc
Depending on the media I use a combination of:

-q
--aspect-ratio=16:9
--effect-width/height
--audio-filter=visual, --effect-list=spectrometer/spectrum/visual/scope
--audio-filter=goom, --goom-width/height
--vout=vmem, --vmem-width/height/pitch/chroma, --vmem-lock/unlock/data
--no-overlay, --ignore config, --plugin-path=plugins, --no-stats, --no-media-library
--spu
--sub-fps=25, --sub-type=auto, --sub-language=english, --sub-autodetect-file, --sub-autodetect-path=.\\subs
--dshow-tuner-channel=, --dshow-tuner-country=, --dshow-caching=, --dshow-tuner-input=, --dshow-chroma=
--dshow-audio-samplerate=, --dshow-audio-bitspersample=, --dshow-audio-channels=
--dshow-fps=25, --audio-desync=, --aout-rate=44100

Re: Which libvlc_new() parameters do you use?

Posted: 15 Jul 2010 03:23
by gnosygnu
I use the following for video files...
(1) --video-title-timeout=0 // else file_name will show when playback begins
(2) --no-snapshot-preview // else mini-snapshot will show in upper-left corner of screens
(3) --aout=waveout // flv files will drop sound every 6-15 seconds; waveout behaves "better" than directx/video

I wish there was a counterpart to (2) that would also suppress the filename from showing up on the main screen when taking a snapshot. I'd submit a patch for it if anyone else is interested....

For dvds, I use (1) and (2) and...
(3) --directx-audio-speaker=Quad // default is 5.1 but will not play 2 channel tracks; EX: Spider-Man 2 Tracks 1-2 (may be system related: though I have 5.1)

Out of curiosity is libvlc_media_add_option() also susceptible to the same issues as libvlc_new()? It also takes command-line params.
If so, I occasionally use:
(1) --aspect-ratio=16:9 // some videos need to be forced to the right aspect-ratio

Also, for anyone interested, I've noticed that deinterlacing command args have very odd behavior. I would recommend using the API rather than any combination of...
(1) --deinterlace-needed=1 // has some effect; but does not do interlacing
(2) --deinterlace-mode=yadif2x // sets deinterlacing-mode, does not enable
(3) --deinterlace=1 // enables deinterlacing, but reverts back to non deinterlace-mode

Hope this is useful.

Re: Which libvlc_new() parameters do you use?

Posted: 22 Jul 2010 10:33
by Sébastien Escudier
I am using :
-v, --no-plugins-cache, --extraintf=logger, --no-sout-mp4-faststart, --plugin-path, --ipv4-timeout, --{rtsp,http,sout-mux}-caching

Re: Which libvlc_new() parameters do you use?

Posted: 14 Feb 2011 21:21
by danirk
Regarding Sherington's question (Is there a direct link between the logging verbosity parameter "-v" and the libvlc_set_log_verbosity(level) method? ...)

libvlc_set_log_verbosity does work, but: To make it effective you need to reopen the log after that (libvlc_log_open and libvlc_log_close).