Which libvlc_new() parameters do you use?

This forum is about all development around libVLC.
Rémi Denis-Courmont
Developer
Developer
Posts: 15214
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Which libvlc_new() parameters do you use?

Postby Rémi Denis-Courmont » 11 Jul 2010 19:59

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?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: Which libvlc_new() parameters do you use?

Postby sherington » 11 Jul 2010 20:28

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.
Last edited by sherington on 11 Jul 2010 23:35, edited 3 times in total.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: Which libvlc_new() parameters do you use?

Postby sherington » 11 Jul 2010 20:52

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15214
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Which libvlc_new() parameters do you use?

Postby Rémi Denis-Courmont » 11 Jul 2010 21:38

--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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

MichaelMc
Blank Cone
Blank Cone
Posts: 63
Joined: 10 Jun 2009 17:55

Re: Which libvlc_new() parameters do you use?

Postby MichaelMc » 12 Jul 2010 00:01

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

gnosygnu
Blank Cone
Blank Cone
Posts: 45
Joined: 06 Jun 2010 16:06

Re: Which libvlc_new() parameters do you use?

Postby gnosygnu » 15 Jul 2010 03:23

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.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Which libvlc_new() parameters do you use?

Postby Sébastien Escudier » 22 Jul 2010 10:33

I am using :
-v, --no-plugins-cache, --extraintf=logger, --no-sout-mp4-faststart, --plugin-path, --ipv4-timeout, --{rtsp,http,sout-mux}-caching

danirk
New Cone
New Cone
Posts: 1
Joined: 14 Feb 2011 21:11

Re: Which libvlc_new() parameters do you use?

Postby danirk » 14 Feb 2011 21:21

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).


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 16 guests