Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question/bug?] about the --include option #4673

Closed
paoloschi opened this issue Jul 27, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@paoloschi
Copy link

commented Jul 27, 2017

from the manual:

--include=<configuration-file>
    Specify configuration file to be parsed after the default ones.

I can't use this option. I'm on Void Linux, running mpv from the official package:

[cplayer] mpv 0.26.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Tue Jul 18 23:16:01 UTC 2017
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.58.100
[cplayer]    libavcodec      57.89.100
[cplayer]    libavformat     57.71.100
[cplayer]    libswscale      4.6.100
[cplayer]    libavfilter     6.82.100
[cplayer]    libswresample   2.7.100
[cplayer] ffmpeg version: 3.3.2
[cplayer] 
[cplayer] Configuration: waf configure --prefix=/usr --confdir=/etc/mpv --docdir=/usr/share/examples/mpv --enable-dvdread --enable-dvdnav --enable-cdda --enable-libmpv-shared --disable-oss-audio --disable-sdl2 --disable-vapoursynth --enable-zsh-comp
[cplayer] List of enabled features: 52 alsa asm atomics avutil-imgcpy-uc build-date cdda cplayer cplugins cuda-hwaccel debug-build drm dvdnav dvdread dvdread-common egl-drm egl-helpers egl-x11 encoding fchmod gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name gnuc iconv is_ffmpeg jack jpeg lcms2 libass libass-osd libav libavcodec libavdevice libbluray libdl libm libmpv-shared librt linux-fstatfs lua nanosleep optimize plain-gl posix posix-or-mingw posix-spawn pthreads pulse rubberband shm stdatomic termios vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-hwaccel vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vdpau-hwaccel vt.h wayland x11 xv zlib zsh-comp

Keeping my configuration in ~/.config/mpv/mpv.conf parsed, I'm trying to integrate mpv into a Bash script and add/change some directives with the --include option.
I've created the file /dev/shm/mpv-include.conf with these contents:

# mpv-include.conf
idle=yes
keep-open=yes
force-window=yes

fullscreen=no

and running

mpv -v --include='/dev/shm/mpv-include.conf'

I would expect to have the window on the desktop in idle mode, though not passing a file to play (If I put same options key=value I wrote in mpv-include.conf directly from command line, that's what I get..) but, for this example, it does not happen: mpv closes immediately without opening the window.
And any other configuration I can make in the file, I do not get any real application, always without errors in the logs.

My file mpv-include.conf is being parsed without any mistakes, it seems to me..

...
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Setting option 'ytdl' = 'no' (flags = 4)
[cplayer] Setting option 'load-scripts' = 'no' (flags = 4)
[cplayer] Setting option 'stop-screensaver' = '' (flags = 4)
[cplayer] Setting option 'screenshot-directory' = '/dev/shm' (flags = 4)
[cplayer] Setting option 'user-agent' = '' (flags = 4)
[cplayer] Setting option 'resume-playback' = 'no' (flags = 4)
[cplayer] Setting option 'vo' = 'opengl' (flags = 4)
[cplayer] Setting option 'hwdec' = 'vaapi' (flags = 4)
[cplayer] Setting option 'hwdec-codecs' = 'h264,vc1,wmv3,hevc,vp9' (flags = 4)
[cplayer] Setting option 'framedrop' = 'vo' (flags = 4)
[cplayer] Setting option 'deinterlace' = 'yes' (flags = 4)
[cplayer] Setting option 'audio-device' = 'alsa/default:CARD=PCH' (flags = 4)
[cplayer] Setting option 'ao' = 'alsa' (flags = 4)
[cplayer] Setting option 'autosync' = '30' (flags = 4)
[cplayer] Setting option 'monitoraspect' = '16:10' (flags = 4)
[cplayer] Setting option 'fullscreen' = 'yes' (flags = 4)
[cplayer] Setting option 'msg-level' = 'all=info' (flags = 4)
[cplayer] Setting option 'cache' = 'auto' (flags = 4)
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Setting option 'include' = '/dev/shm/mpv-include.conf' (flags = 8)
[global] user path: '/dev/shm/mpv-include.conf' -> '/dev/shm/mpv-include.conf'
[cplayer] Reading config file /dev/shm/mpv-include.conf
[global] config path: 'input.conf' -/-> '/home/user/.config/mpv/input.conf'
[global] config path: 'input.conf' -/-> '/home/user/.mpv/input.conf'
[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'
[cplayer] mpv 0.26.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Tue Jul 18 23:16:01 UTC 2017
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.58.100
[cplayer]    libavcodec      57.89.100
[cplayer]    libavformat     57.71.100
[cplayer]    libswscale      4.6.100
[cplayer]    libavfilter     6.82.100
[cplayer]    libswresample   2.7.100
[cplayer] ffmpeg version: 3.3.2
[cplayer] 
[cplayer] Usage:   mpv [options] [url|path/]filename
[cplayer] 
[cplayer] Basic options:
[cplayer]  --start=<time>    seek to given (percent, seconds, or hh:mm:ss) position
[cplayer]  --no-audio        do not play sound
[cplayer]  --no-video        do not play video
[cplayer]  --fs              fullscreen playback
[cplayer]  --sub-file=<file> specify subtitle file to use
[cplayer]  --playlist=<file> specify playlist file
[cplayer] 
[cplayer]  --list-options    list all mpv options
[cplayer]  --h=<string>      print options which contain the given string in their name
[cplayer] 

In fact, if I intentionally make a mistake in mpv-include.conf..

...
keep-open=maybe
...

..in the output i have the error interpretation:

...
[cplayer] Setting option 'include' = '/dev/shm/mpv-include.conf' (flags = 8)
[global] user path: '/dev/shm/mpv-include.conf' -> '/dev/shm/mpv-include.conf'
[cplayer] Reading config file /dev/shm/mpv-include.conf
[cplayer] Invalid value for option keep-open: maybe
[cplayer] Valid values are:
[cplayer]     no
[cplayer]     yes
[cplayer]     always
[cplayer] Error parsing option keep-open (option parameter could not be parsed)
[cplayer] /dev/shm/mpv-include.conf:4: setting option keep-open='maybe' failed.
...

In conclusion, the implementation of the '--include' option seems to be done fully but, on the practical side, mpv does not apply any directive I put in the additional configuration..

Is it just that I did not understand how this option works or is it a issue ??

@wm4

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2017

Seems broken when using --include on the command line.

@wm4 wm4 closed this in f7fb6e1 Aug 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.