iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
458 stars 30 forks source link

[help wanted] MPV on Mac - v1.0.0-beta.5 #65

Closed prabapro closed 4 years ago

prabapro commented 4 years ago

Hey @iamkroot,

Updated to beta5 but still getting an error with MPV monitoring.

2020-05-25 15:01:40,770 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-25 15:01:40,787 - INFO - MainThread - monitor - Started monitor for vlc
2020-05-25 15:01:40,794 - ERROR - MainThread - monitor - Config value autoload failed for mpv.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 789, in get
    value = d[option]
  File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 891, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 883, in __missing__
    raise KeyError(key)
KeyError: 'input-ipc-server'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/monitor.py", line 17, in __new__
    cls.config = cls.autoload_cfg()
  File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/monitor.py", line 47, in autoload_cfg
    monitor_cfg[param] = param_loader()
  File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/mpv.py", line 59, in <lambda>
    "ipc_path": lambda: mpv_conf.get("root", "input-ipc-server")
  File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'input-ipc-server' in section: 'root'
2020-05-25 15:01:40,797 - INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running.
2020-05-25 15:01:40,802 - WARNING - MainThread - main - Could not start monitor for mpv

So I added [root] to the mpv.conf & got rid of the errors. The log is as below;

2020-05-25 15:07:15,482 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-25 15:07:15,500 - INFO - MainThread - monitor - Started monitor for vlc
2020-05-25 15:07:15,505 - INFO - MainThread - monitor - Started monitor for mpv
2020-05-25 15:07:15,506 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.

Could you please let me know what value should go in the mpv.conf please? I tried below options & couldn't success with any (Sorry for not understanding the guide properly); input-ipc-server=<path> input-ipc-server=/Users/codechilli/.config/mpv/mpv.conf input-ipc-server=/tmp/mpvsocket

Please help.

Thanks, Praba.

iamkroot commented 4 years ago

The file should simply look like:

input-ipc-server=/tmp/mpvsocket

No need to add [root] into the mpv.conf file. Try recreating the file?

prabapro commented 4 years ago

Hi,

Recreated the conf file & added input-ipc-server=/tmp/mpvsocket. Same error, please refer below log;

Log ``` 2020-05-25 18:18:58,657 - INFO - MainThread - scrobbler - Started scrobbler thread. 2020-05-25 18:18:58,674 - ERROR - MainThread - monitor - Config value autoload failed for mpv. Traceback (most recent call last): File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 789, in get value = d[option] File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 891, in __getitem__ return self.__missing__(key) # support subclasses that define __missing__ File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/collections/__init__.py", line 883, in __missing__ raise KeyError(key) KeyError: 'input-ipc-server' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/monitor.py", line 17, in __new__ cls.config = cls.autoload_cfg() File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/monitor.py", line 47, in autoload_cfg monitor_cfg[param] = param_loader() File "/Users/codechilli/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/mpv.py", line 59, in "ipc_path": lambda: mpv_conf.get("root", "input-ipc-server") File "/usr/local/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/configparser.py", line 792, in get raise NoOptionError(option, section) configparser.NoOptionError: No option 'input-ipc-server' in section: 'root' 2020-05-25 18:18:58,679 - WARNING - MainThread - main - Could not start monitor for mpv 2020-05-25 18:18:58,680 - INFO - MainThread - monitor - Started monitor for vlc ```
iamkroot commented 4 years ago

Hmm that's really weird. Did the scrobbling work when you added [root] to the file and played using mpv?

prabapro commented 4 years ago

Once added the [root], getting below log;

2020-05-25 19:13:21,538 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-25 19:13:21,551 - INFO - MainThread - monitor - Started monitor for vlc
2020-05-25 19:13:21,556 - INFO - MainThread - monitor - Started monitor for mpv
2020-05-25 19:13:21,557 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2020-05-25 19:13:21,561 - INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running.
prabapro commented 4 years ago

Hey @iamkroot,

Here's an update. When I'm playing files using mpv gui player, nothing happens. But tried to run it on my terminal, scrobble started.

mpv /Users/codechilli/Movies/The\ Internship\ \[2013\]/The\ Internship\ \[2013\].mp4 --input-ipc-server=/tmp/mpvsocket

2020-05-25 21:03:50,262 - DEBUG - mpv - file_info - Filepath '/Users/codechilli/Movies/The Internship [2013]/The Internship [2013].mp4'
2020-05-25 21:03:50,263 - DEBUG - mpv - file_info - Trying to match custom regex.
2020-05-25 21:03:50,264 - DEBUG - mpv - file_info - Using guessit module to match.
2020-05-25 21:03:50,299 - DEBUG - mpv - file_info - MatchesDict([('title', 'The Internship'), ('year', 2013), ('container', 'mp4'), ('mimetype', 'video/mp4'), ('type', 'movie')])
2020-05-25 21:03:50,300 - DEBUG - scrobbler - scrobbler - Progress: 50.31%
2020-05-25 21:03:50,301 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-05-25 21:03:50,301 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 81433}}}
2020-05-25 21:03:52,006 - INFO - scrobbler - scrobbler - Scrobble start successful for The Internship
iamkroot commented 4 years ago

Yeah, that's pretty much expected. When you add [root] to the file, mpv can't parse it. It's needed because the Python parser requires a section, so we add a dummy one. For some reason, it's not picking up this on your system. Did you have auto-detect enabled for the previous version of the config too?

iamkroot commented 4 years ago

One more thing, what file are you modifying exactly? It should be /Users/codechilli/.config/mpv/mpv.conf.

Open up python3 in your terminal and paste this. Let's see what the output is.

from pathlib import Path
conf_path = Path.home() / ".config" / "mpv" / "mpv.conf"
print(conf_path)
print(conf_path.read_text())
prabapro commented 4 years ago

Yup, editing /Users/codechilli/.config/mpv/mpv.conf

Below is the output as requested;

Expand ``` # vim: syntax=config ########### # General # ########### #input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket load-stats-overlay=no # use local stats.lua save-position-on-quit # handled by a script no-border # no window title bar msg-module # prepend module name to log messages msg-color # color log messages on terminal term-osd-bar # display a progress bar on the terminal use-filedir-conf # look for additional config files in the directory of the opened file #pause # no autoplay keep-open # keep the player open when a file's end is reached autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen input-media-keys=no # enable/disable OSX media keys cursor-autohide=1000 # autohide the curser after 1s prefetch-playlist=yes force-seekable=yes screenshot-format=png screenshot-png-compression=8 screenshot-template='~/Desktop/%F (%P) %n' hls-bitrate=max # use max quality for HLS streams [ytdl-desktop] profile-desc=cond:is_desktop() ytdl-format=bestvideo[height<=?2160]+bestaudio/best [ytdl-laptop] profile-desc=cond:is_laptop() ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best [default] #########c # Cache # ######### # Configure the cache to be really big (multiple GBs) # We have a lot of memory, so why not use it for something cache=yes cache-default=4000000 # size in KB cache-backbuffer=250000 # size in KB demuxer-max-bytes=114748364 # ~100 MiB in bytes ############# # OSD / OSC # ############# osd-level=1 # enable osd and display --osd-status-msg on interaction osd-duration=2500 # hide the osd after x ms osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}' osd-font='Avenir Book' osd-font-size=20 osd-color='#CCFFFFFF' # ARGB format osd-border-color='#DD322640' # ARGB format #osd-shadow-offset=1 # pixel width for osd text and progress bar osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom) osd-border-size=2 # size for osd text and progress bar osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height osd-bar-w=60 # width of " " " ############# # Subtitles # ############# sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload sub-file-paths-append=ass # search for external subs in these relative subdirectories sub-file-paths-append=srt sub-file-paths-append=sub sub-file-paths-append=subs sub-file-paths-append=subtitles demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking embeddedfonts=yes # use embedded fonts for SSA/ASS subs sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases) sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts sub-use-margins sub-ass-force-margins # the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT) sub-font='Avenir Book' sub-font-size=36 sub-color="#FFFFFF" sub-border-color="#000000" sub-border-size=2 sub-shadow-offset=1 sub-shadow-color="#33000000" sub-spacing=0.5 sub-pos=95 ############# # Languages # ############# slang=enm,en,eng,de,deu,ger # automatically select these subtitles (decreasing priority) alang=ja,jp,jpn,en,eng,de,deu,ger # automatically select these audio tracks (decreasing priority) ######### # Audio # ######### audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed volume-max=200 # maximum volume in %, everything above 100 results in amplification volume=100 # default volume, 100 = unchanged ################ # Video Output # ################ # Active VOs (and some other options) are set conditionally # See here for more information: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua # on_battery(), is_laptop() and is_dektop() are my own additional functions imported from scripts/auto-profiles-functions.lua # Defaults for all profiles vo=libmpv # gpu-api=opengl tscale=oversample # [sharp] oversample <-> linear (triangle) <-> catmull_rom <-> mitchell <-> gaussian <-> bicubic [smooth] opengl-early-flush=no opengl-pbo=no # "yes" is currently bugged: https://github.com/mpv-player/mpv/issues/4988 icc-profile-auto icc-contrast=1000 # silence some warning because the profile is bad hwdec=no [high-quality] profile-desc=cond:is_high(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) # hanning with this radius is broken on OSX due to OpenGL driver bug #scale=ewa_hanning #scale-radius=3.2383154841662362 scale=ewa_lanczossharp cscale=ewa_lanczossoft dscale=mitchell scale-antiring=0 cscale-antiring=0 dither-depth=auto correct-downscaling=yes sigmoid-upscaling=yes deband=yes glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" [mid-quality] profile-desc=cond:is_mid(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) scale=spline36 cscale=spline36 dscale=mitchell scale-antiring=1.0 cscale-antiring=1.0 dither-depth=auto correct-downscaling=yes sigmoid-upscaling=yes deband=yes glsl-shaders-set="" [low-quality] profile-desc=cond:is_low(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) scale=bilinear cscale=bilinear dscale=bilinear scale-antiring=0 cscale-antiring=0 dither-depth=no correct-downscaling=no sigmoid-upscaling=no deband=no glsl-shaders-set="" [4K-lavc-threads] profile-desc=cond:get('width', -math.huge) >= 3840 vd-lavc-threads=32 [4K-lavc-threads-inverted] profile-desc=cond:get('width', math.huge) < 3840 vd-lavc-threads=0 ################################### # Protocol Specific Configuration # ################################### [protocol.https] cache=yes user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0' [protocol.http] cache=yes user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0' [root] input-ipc-server=/tmp/mpvsocket >>> ```

Also, sharing the track config file content for your ref;

trakts config list ``` Prabas-MacBook-Air:~ codechilli$ trakts config list players.monitored = ['mpv', 'vlc'] fileinfo.whitelist = ['/Users/codechilli/Movies'] version = 1.0 Prabas-MacBook-Air:~ codechilli$ ```
trakts config list --all ``` Prabas-MacBook-Air:~ codechilli$ trakts config list --all players.mpv.ipc_path = auto-detect players.mpv.poll_interval = 10 players.monitored = ['mpv', 'vlc'] players.skip_interval = 5 players.mpc-be.ip = localhost players.mpc-be.port = auto-detect players.mpc-be.poll_interval = 10 players.mpc-hc.ip = localhost players.mpc-hc.port = auto-detect players.mpc-hc.poll_interval = 10 players.vlc.ip = localhost players.vlc.port = auto-detect players.vlc.password = auto-detect players.vlc.poll_interval = 10 players.plex.ip = localhost players.plex.port = 32400 players.plex.poll_interval = 10 fileinfo.whitelist = ['/Users/codechilli/Movies'] fileinfo.include_regexes.movie = [] fileinfo.include_regexes.episode = [] version = 1.0 general.enable_notifs = True backlog.clear_interval = 1800 backlog.expiry = 2592000 Prabas-MacBook-Air:~ codechilli$ ```
iamkroot commented 4 years ago

Bro you have put the input-ipc-server entry at the wrong position! Basically, you put the line inside the [protocol.http] section (when you didn't put [root]). If you look carefully, you'll see that the input-ipc-server option is literally at the top of the config file, and that is what you should be editing (simply uncomment the line). I recommend reading how config files work.

prabapro commented 4 years ago

Hey bro, actually it was there in the very first line & I commented It out & added to the last line referring to the getting started guide as it says add input-ipc-server=<path> to the end of the mpv.conf file. I misunderstood this, sorry about it mate :)

Btw, now the conf file is corrected by removing [root] input-ipc-server=/tmp/mpvsocket & uncommented the first line. But the issue remains same :(

Here's the log ``` 2020-05-27 22:15:05,711 - INFO - MainThread - scrobbler - Started scrobbler thread. 2020-05-27 22:15:05,748 - INFO - MainThread - monitor - Started monitor for vlc 2020-05-27 22:15:05,753 - INFO - MainThread - monitor - Started monitor for mpv 2020-05-27 22:15:05,754 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path. 2020-05-27 22:15:05,759 - INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running. ```
Current mpv.conf file ``` # vim: syntax=config ########### # General # ########### input-ipc-server=/tmp/mpvsocket # listen for IPC on this socket load-stats-overlay=no # use local stats.lua save-position-on-quit # handled by a script no-border # no window title bar msg-module # prepend module name to log messages msg-color # color log messages on terminal term-osd-bar # display a progress bar on the terminal use-filedir-conf # look for additional config files in the directory of the opened file #pause # no autoplay keep-open # keep the player open when a file's end is reached autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen input-media-keys=no # enable/disable OSX media keys cursor-autohide=1000 # autohide the curser after 1s prefetch-playlist=yes force-seekable=yes screenshot-format=png screenshot-png-compression=8 screenshot-template='~/Desktop/%F (%P) %n' hls-bitrate=max # use max quality for HLS streams [ytdl-desktop] profile-desc=cond:is_desktop() ytdl-format=bestvideo[height<=?2160]+bestaudio/best [ytdl-laptop] profile-desc=cond:is_laptop() ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash_segments]+bestaudio/best [default] #########c # Cache # ######### # Configure the cache to be really big (multiple GBs) # We have a lot of memory, so why not use it for something cache=yes cache-default=4000000 # size in KB cache-backbuffer=250000 # size in KB demuxer-max-bytes=114748364 # ~100 MiB in bytes ############# # OSD / OSC # ############# osd-level=1 # enable osd and display --osd-status-msg on interaction osd-duration=2500 # hide the osd after x ms osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}' osd-font='Avenir Book' osd-font-size=20 osd-color='#CCFFFFFF' # ARGB format osd-border-color='#DD322640' # ARGB format #osd-shadow-offset=1 # pixel width for osd text and progress bar osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom) osd-border-size=2 # size for osd text and progress bar osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height osd-bar-w=60 # width of " " " ############# # Subtitles # ############# sub-auto=fuzzy # external subs don't have to match the file name exactly to autoload sub-file-paths-append=ass # search for external subs in these relative subdirectories sub-file-paths-append=srt sub-file-paths-append=sub sub-file-paths-append=subs sub-file-paths-append=subtitles demuxer-mkv-subtitle-preroll # try to correctly show embedded subs when seeking embeddedfonts=yes # use embedded fonts for SSA/ASS subs sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases) sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts sub-use-margins sub-ass-force-margins # the following options only apply to subtitles without own styling (i.e. not ASS but e.g. SRT) sub-font='Avenir Book' sub-font-size=36 sub-color="#FFFFFF" sub-border-color="#000000" sub-border-size=2 sub-shadow-offset=1 sub-shadow-color="#33000000" sub-spacing=0.5 sub-pos=95 ############# # Languages # ############# slang=enm,en,eng,de,deu,ger # automatically select these subtitles (decreasing priority) alang=ja,jp,jpn,en,eng,de,deu,ger # automatically select these audio tracks (decreasing priority) ######### # Audio # ######### audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed volume-max=200 # maximum volume in %, everything above 100 results in amplification volume=100 # default volume, 100 = unchanged ################ # Video Output # ################ # Active VOs (and some other options) are set conditionally # See here for more information: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua # on_battery(), is_laptop() and is_dektop() are my own additional functions imported from scripts/auto-profiles-functions.lua # Defaults for all profiles vo=libmpv # gpu-api=opengl tscale=oversample # [sharp] oversample <-> linear (triangle) <-> catmull_rom <-> mitchell <-> gaussian <-> bicubic [smooth] opengl-early-flush=no opengl-pbo=no # "yes" is currently bugged: https://github.com/mpv-player/mpv/issues/4988 icc-profile-auto icc-contrast=1000 # silence some warning because the profile is bad hwdec=no [high-quality] profile-desc=cond:is_high(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) # hanning with this radius is broken on OSX due to OpenGL driver bug #scale=ewa_hanning #scale-radius=3.2383154841662362 scale=ewa_lanczossharp cscale=ewa_lanczossoft dscale=mitchell scale-antiring=0 cscale-antiring=0 dither-depth=auto correct-downscaling=yes sigmoid-upscaling=yes deband=yes glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" glsl-shaders-append="~/.mpv/shaders/ravu-r3-rgb.hook" [mid-quality] profile-desc=cond:is_mid(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) scale=spline36 cscale=spline36 dscale=mitchell scale-antiring=1.0 cscale-antiring=1.0 dither-depth=auto correct-downscaling=yes sigmoid-upscaling=yes deband=yes glsl-shaders-set="" [low-quality] profile-desc=cond:is_low(get('width', 0), get('height', 0), get('estimated-vf-fps', 0)) scale=bilinear cscale=bilinear dscale=bilinear scale-antiring=0 cscale-antiring=0 dither-depth=no correct-downscaling=no sigmoid-upscaling=no deband=no glsl-shaders-set="" [4K-lavc-threads] profile-desc=cond:get('width', -math.huge) >= 3840 vd-lavc-threads=32 [4K-lavc-threads-inverted] profile-desc=cond:get('width', math.huge) < 3840 vd-lavc-threads=0 ################################### # Protocol Specific Configuration # ################################### [protocol.https] cache=yes user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0' [protocol.http] cache=yes user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:57.0) Gecko/20100101 Firefox/58.0' ```
iamkroot commented 4 years ago

referring to the getting started guide

You're right. That was incorrect. I've updated the README.

But the issue remains same

Well, you're not getting the No option 'input-ipc-server' in section: 'root' error in your log anymore I believe.

prabapro commented 4 years ago

Yes, I'm not getting the root error now.

But ipc bath error is still there;

2020-05-27 22:15:05,754 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.

iamkroot commented 4 years ago

But ipc bath error is still there;

That mostly means that mpv is not reading the config file properly. In a terminal, run mpv --log-file=~/mpv.log. Then open the log file /Users/username/mpv.log and search for input-ipc-server. The log file should also have a line like: Reading config file /Users/...

prabapro commented 4 years ago
[   0.014][v][cplayer] Reading config file /Users/codechilli/.config/mpv/mpv.conf
[   0.016][v][cplayer] Setting option 'input-ipc-server' = '/tmp/mpvsocket' (flags = 4)
[   0.022][v][ipc] Starting IPC master
[   0.023][v][ipc] Listening to IPC socket.
Full log ``` [ 0.011][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.011][v][cplayer] built on Fri Jan 31 11:28:05 CET 2020 [ 0.012][v][cplayer] ffmpeg library versions: [ 0.012][v][cplayer] libavutil 56.31.100 [ 0.012][v][cplayer] libavcodec 58.54.100 [ 0.012][v][cplayer] libavformat 58.29.100 [ 0.012][v][cplayer] libswscale 5.5.100 [ 0.012][v][cplayer] libavfilter 7.57.100 [ 0.012][v][cplayer] libswresample 3.5.100 [ 0.012][v][cplayer] ffmpeg version: 4.2.2 [ 0.012][v][cplayer] [ 0.012][v][cplayer] Configuration: waf configure --prefix=/Users/djinn/bajzkorw/build-0.32.0 --enable-manpage-build --disable-android --disable-tvos --disable-egl-android --disable-macos-media-player --disable-macos-10-12-2-features [ 0.012][v][cplayer] List of enabled features: 51deb asm atomics bsd-fstatfs build-date cocoa coreaudio cplayer cplugins debug-build drmprime fchmod ffmpeg gl gl-cocoa glob glob-posix gnuc gpl iconv javascript lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libdl libm lua macos-10-11-features macos-cocoa-cb macos-touchbar optimize osx-thread-name posix posix-or-mingw posix-spawn posix-spawn-native pthreads rubberband stdatomic uchardet videotoolbox-gl videotoolbox-hwaccel zlib [ 0.012][v][cplayer] Command line options: '--log-file=~/mpv.log' [ 0.012][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.012][v][cplayer] built on Fri Jan 31 11:28:05 CET 2020 [ 0.012][v][cplayer] ffmpeg library versions: [ 0.012][v][cplayer] libavutil 56.31.100 [ 0.012][v][cplayer] libavcodec 58.54.100 [ 0.012][v][cplayer] libavformat 58.29.100 [ 0.012][v][cplayer] libswscale 5.5.100 [ 0.012][v][cplayer] libavfilter 7.57.100 [ 0.012][v][cplayer] libswresample 3.5.100 [ 0.012][v][cplayer] ffmpeg version: 4.2.2 [ 0.012][v][cplayer] [ 0.012][v][cplayer] Configuration: waf configure --prefix=/Users/djinn/bajzkorw/build-0.32.0 --enable-manpage-build --disable-android --disable-tvos --disable-egl-android --disable-macos-media-player --disable-macos-10-12-2-features [ 0.012][v][cplayer] List of enabled features: 51deb asm atomics bsd-fstatfs build-date cocoa coreaudio cplayer cplugins debug-build drmprime fchmod ffmpeg gl gl-cocoa glob glob-posix gnuc gpl iconv javascript lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libdl libm lua macos-10-11-features macos-cocoa-cb macos-touchbar optimize osx-thread-name posix posix-or-mingw posix-spawn posix-spawn-native pthreads rubberband stdatomic uchardet videotoolbox-gl videotoolbox-hwaccel zlib [ 0.014][v][cplayer] Reading config file /Users/codechilli/.config/mpv/mpv.conf [ 0.015][e][cplayer] Error parsing option cache-default (option not found) [ 0.015][e][cplayer] /Users/codechilli/.config/mpv/mpv.conf:51: setting option cache-default='4000000' failed. [ 0.015][e][cplayer] Error parsing option cache-backbuffer (option not found) [ 0.015][e][cplayer] /Users/codechilli/.config/mpv/mpv.conf:52: setting option cache-backbuffer='250000' failed. [ 0.016][v][cplayer] Applying profile 'default'... [ 0.016][v][cplayer] Setting option 'input-ipc-server' = '/tmp/mpvsocket' (flags = 4) [ 0.016][v][cplayer] Setting option 'load-stats-overlay' = 'no' (flags = 4) [ 0.016][v][cplayer] Setting option 'save-position-on-quit' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'border' = 'no' (flags = 4) [ 0.016][v][cplayer] Setting option 'msg-module' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'msg-color' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'term-osd-bar' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'use-filedir-conf' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'keep-open' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'autofit-larger' = '100%x95%' (flags = 4) [ 0.016][v][cplayer] Setting option 'cursor-autohide-fs-only' = '' (flags = 4) [ 0.016][v][cplayer] Setting option 'input-media-keys' = 'no' (flags = 4) [ 0.016][v][cplayer] Setting option 'cursor-autohide' = '1000' (flags = 4) [ 0.016][v][cplayer] Setting option 'prefetch-playlist' = 'yes' (flags = 4) [ 0.016][v][cplayer] Setting option 'force-seekable' = 'yes' (flags = 4) [ 0.016][v][cplayer] Setting option 'screenshot-format' = 'png' (flags = 4) [ 0.016][v][cplayer] Setting option 'screenshot-png-compression' = '8' (flags = 4) [ 0.016][v][cplayer] Setting option 'screenshot-template' = '~/Desktop/%F (%P) %n' (flags = 4) [ 0.016][v][cplayer] Setting option 'hls-bitrate' = 'max' (flags = 4) [ 0.016][v][cplayer] Setting option 'cache' = 'yes' (flags = 4) [ 0.016][v][cplayer] Setting option 'demuxer-max-bytes' = '114748364' (flags = 4) [ 0.016][v][cplayer] Setting option 'osd-level' = '1' (flags = 4) [ 0.016][v][cplayer] Setting option 'osd-duration' = '2500' (flags = 4) [ 0.016][v][cplayer] Setting option 'osd-status-msg' = '${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}' (flags = 4) [ 0.016][v][cplayer] Setting option 'osd-font' = 'Avenir Book' (flags = 4) [ 0.016][v][cplayer] Setting option 'osd-font-size' = '20' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-color' = '#CCFFFFFF' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-border-color' = '#DD322640' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-bar-align-y' = '0' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-border-size' = '2' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-bar-h' = '2' (flags = 4) [ 0.017][v][cplayer] Setting option 'osd-bar-w' = '60' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-auto' = 'fuzzy' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-file-paths-append' = 'ass' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-file-paths-append' = 'srt' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-file-paths-append' = 'sub' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-file-paths-append' = 'subs' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-file-paths-append' = 'subtitles' (flags = 4) [ 0.017][v][cplayer] Setting option 'demuxer-mkv-subtitle-preroll' = '' (flags = 4) [ 0.017][v][cplayer] Setting option 'embeddedfonts' = 'yes' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-fix-timing' = 'no' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-ass-force-style' = 'Kerning=yes' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-use-margins' = '' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-ass-force-margins' = '' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-font' = 'Avenir Book' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-font-size' = '36' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-color' = '#FFFFFF' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-border-color' = '#000000' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-border-size' = '2' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-shadow-offset' = '1' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-shadow-color' = '#33000000' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-spacing' = '0.5' (flags = 4) [ 0.017][v][cplayer] Setting option 'sub-pos' = '95' (flags = 4) [ 0.017][v][cplayer] Setting option 'slang' = 'enm,en,eng,de,deu,ger' (flags = 4) [ 0.017][v][cplayer] Setting option 'alang' = 'ja,jp,jpn,en,eng,de,deu,ger' (flags = 4) [ 0.017][v][cplayer] Setting option 'audio-file-auto' = 'fuzzy' (flags = 4) [ 0.017][v][cplayer] Setting option 'audio-pitch-correction' = 'yes' (flags = 4) [ 0.017][v][cplayer] Setting option 'volume-max' = '200' (flags = 4) [ 0.017][v][cplayer] Setting option 'volume' = '100' (flags = 4) [ 0.017][v][cplayer] Setting option 'vo' = 'libmpv' (flags = 4) [ 0.017][v][cplayer] Setting option 'tscale' = 'oversample' (flags = 4) [ 0.017][v][cplayer] Setting option 'opengl-early-flush' = 'no' (flags = 4) [ 0.017][v][cplayer] Setting option 'opengl-pbo' = 'no' (flags = 4) [ 0.017][v][cplayer] Setting option 'icc-profile-auto' = '' (flags = 4) [ 0.017][v][cplayer] Setting option 'icc-contrast' = '1000' (flags = 4) [ 0.017][v][cplayer] Setting option 'hwdec' = 'no' (flags = 4) [ 0.017][v][cplayer] Setting option 'log-file' = '~/mpv.log' (flags = 8) [ 0.019][d][global] user path: '~/mpv.log' -> '/Users/codechilli/mpv.log' [ 0.020][d][osc] Loading lua script @osc.lua... [ 0.021][d][ytdl_hook] Loading lua script @ytdl_hook.lua... [ 0.021][d][console] Loading lua script @console.lua... [ 0.021][d][global] user path: '/tmp/mpvsocket' -> '/tmp/mpvsocket' [ 0.021][d][osc] loading mp.defaults [ 0.021][d][ytdl_hook] loading mp.defaults [ 0.021][i][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.021][i][cplayer] built on Fri Jan 31 11:28:05 CET 2020 [ 0.021][i][cplayer] ffmpeg library versions: [ 0.021][i][cplayer] libavutil 56.31.100 [ 0.021][i][cplayer] libavcodec 58.54.100 [ 0.021][i][cplayer] libavformat 58.29.100 [ 0.021][i][cplayer] libswscale 5.5.100 [ 0.021][i][cplayer] libavfilter 7.57.100 [ 0.021][i][cplayer] libswresample 3.5.100 [ 0.021][i][cplayer] ffmpeg version: 4.2.2 [ 0.021][i][cplayer] [ 0.021][i][cplayer] Usage: mpv [options] [url|path/]filename [ 0.021][i][cplayer] [ 0.021][i][cplayer] Basic options: [ 0.021][i][cplayer] --start=
georgeat8 commented 4 years ago

I can confirm the same error on Linux, Manjaro KDE 20.0.1.

If it helps, I open mpv using the shortcut, not from the terminal.

This is the mpv.conf:

###########
# General #
###########

input-ipc-server=/tmp/mpvsocket        # listen for IPC on this socket

pause                                   # no autoplay
keep-open                               # keep the player open when a file's end is reached
autofit-larger=100%x95%                 # resize window in case it's larger than W%xH% of the screen
cursor-autohide-fs-only                 # don't autohide the cursor in window mode, only fullscreen
input-media-keys=no                     # enable/disable OSX media keys
cursor-autohide=1000                    # autohide the curser after 1s

This is the trakts-scrobbler logs output:

2020-05-30 03:36:30,407 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-30 03:36:30,425 - INFO - MainThread - monitor - Started monitor for mpv
2020-05-30 03:36:30,425 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.

This is the mpv.log:

mpv.log ``` [ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.003][v][cplayer] built on UNKNOWN [ 0.003][v][cplayer] ffmpeg library versions: [ 0.003][v][cplayer] libavutil 56.31.100 [ 0.003][v][cplayer] libavcodec 58.54.100 [ 0.003][v][cplayer] libavformat 58.29.100 [ 0.003][v][cplayer] libswscale 5.5.100 [ 0.003][v][cplayer] libavfilter 7.57.100 [ 0.003][v][cplayer] libswresample 3.5.100 [ 0.003][v][cplayer] ffmpeg version: n4.2.2 [ 0.003][v][cplayer] [ 0.003][v][cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --disable-build-date [ 0.003][v][cplayer] List of enabled features: 52arch aligned_alloc alsa asm atomics caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm drmprime dvbin dvdnav egl egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libdl libm libmpv-shared libplacebo librt libsmbclient linux-fstatfs lua memfd_create optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib [ 0.003][v][cplayer] Command line options: '--log-file=~/mpv.log' [ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.003][v][cplayer] built on UNKNOWN [ 0.003][v][cplayer] ffmpeg library versions: [ 0.003][v][cplayer] libavutil 56.31.100 [ 0.003][v][cplayer] libavcodec 58.54.100 [ 0.003][v][cplayer] libavformat 58.29.100 [ 0.003][v][cplayer] libswscale 5.5.100 [ 0.003][v][cplayer] libavfilter 7.57.100 [ 0.003][v][cplayer] libswresample 3.5.100 [ 0.003][v][cplayer] ffmpeg version: n4.2.2 [ 0.003][v][cplayer] [ 0.003][v][cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --disable-build-date [ 0.003][v][cplayer] List of enabled features: 52arch aligned_alloc alsa asm atomics caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm drmprime dvbin dvdnav egl egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libdl libm libmpv-shared libplacebo librt libsmbclient linux-fstatfs lua memfd_create optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib [ 0.003][v][cplayer] Reading config file /etc/mpv/encoding-profiles.conf [ 0.030][v][cplayer] Applying profile 'default'... [ 0.030][v][cplayer] Reading config file /home/george/.config/mpv/mpv.conf [ 0.030][v][cplayer] Applying profile 'default'... [ 0.030][v][cplayer] Setting option 'input-ipc-server' = '/home/george/.config/mpv/mpvsocket' (flags = 4) [ 0.030][v][cplayer] Setting option 'pause' = '' (flags = 4) [ 0.030][v][cplayer] Setting option 'keep-open' = '' (flags = 4) [ 0.030][v][cplayer] Setting option 'autofit-larger' = '100%x95%' (flags = 4) [ 0.030][v][cplayer] Setting option 'cursor-autohide-fs-only' = '' (flags = 4) [ 0.030][v][cplayer] Setting option 'input-media-keys' = 'no' (flags = 4) [ 0.030][v][cplayer] Setting option 'cursor-autohide' = '1000' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-font' = 'Source Sans Pro Semibold' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-font-size' = '44' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-color' = '#FFFFFFFF' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-border-color' = '#000000' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-border-size' = '1' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-shadow-offset' = '1' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-shadow-color' = '#000000' (flags = 4) [ 0.030][v][cplayer] Setting option 'sub-spacing' = '0' (flags = 4) [ 0.030][v][cplayer] Setting option 'log-file' = '~/mpv.log' (flags = 8) [ 0.031][d][global] user path: '~/mpv.log' -> '/home/george/mpv.log' [ 0.031][d][osc] Loading lua script @osc.lua... [ 0.031][d][ytdl_hook] Loading lua script @ytdl_hook.lua... [ 0.031][d][stats] Loading lua script @stats.lua... [ 0.031][d][console] Loading lua script @console.lua... [ 0.031][d][global] user path: '/home/george/.config/mpv/mpvsocket' -> '/home/george/.config/mpv/mpvsocket' [ 0.031][d][osc] loading mp.defaults [ 0.031][i][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.031][i][cplayer] built on UNKNOWN [ 0.031][i][cplayer] ffmpeg library versions: [ 0.031][i][cplayer] libavutil 56.31.100 [ 0.031][i][cplayer] libavcodec 58.54.100 [ 0.031][i][cplayer] libavformat 58.29.100 [ 0.031][i][cplayer] libswscale 5.5.100 [ 0.031][i][cplayer] libavfilter 7.57.100 [ 0.031][i][cplayer] libswresample 3.5.100 [ 0.031][i][cplayer] ffmpeg version: n4.2.2 [ 0.031][i][cplayer] [ 0.031][i][cplayer] Usage: mpv [options] [url|path/]filename [ 0.031][i][cplayer] [ 0.031][i][cplayer] Basic options: [ 0.031][i][cplayer] --start=
iamkroot commented 4 years ago

@georgeat8 It seems there's some error on your side. Your mpv log file says [ 0.030][v][cplayer] Setting option 'input-ipc-server' = '/home/george/.config/mpv/mpvsocket' (flags = 4). The path should be /tmp/mpvsocket. Are you sure the option is not getting overriden somewhere else?

iamkroot commented 4 years ago

@prabapro Try restarting? Also, see if it works when you manually pass the option as a command line argument to mpv (like you did earlier)

prabapro commented 4 years ago

@prabapro Try restarting?

@iamkroot Did restart bro, but same error

2020-05-31 23:11:39,224 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-31 23:11:39,265 - INFO - MainThread - monitor - Started monitor for vlc
2020-05-31 23:11:39,269 - INFO - MainThread - monitor - Started monitor for mpv
2020-05-31 23:11:39,270 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.

Also, see if it works when you manually pass the option as a command line argument to mpv (like you did earlier)

Tried mpv /Users/codechilli/Movies/The\ Wolf\ of\ Wall\ Street\ \[2013\]/The\ Wolf\ of\ Wall\ Street\ \[2013\].mp4 --input-ipc-server=/tmp/mpvsocket Video plays but nothing in the trakts log

georgeat8 commented 4 years ago

@georgeat8 It seems there's some error on your side. Your mpv log file says [ 0.030][v][cplayer] Setting option 'input-ipc-server' = '/home/george/.config/mpv/mpvsocket' (flags = 4). The path should be /tmp/mpvsocket. Are you sure the option is not getting overriden somewhere else?

@iamkroot A mistake on my part, however, even after changing it to /tmp/mpvsocket, still nothing and the same error on trakts-scrobbler log:

2020-05-31 20:55:38,715 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-05-31 20:55:38,749 - INFO - MainThread - monitor - Started monitor for mpv
2020-05-31 20:55:38,751 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
New log for mpv.log ``` [ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.003][v][cplayer] built on UNKNOWN [ 0.003][v][cplayer] ffmpeg library versions: [ 0.003][v][cplayer] libavutil 56.31.100 [ 0.003][v][cplayer] libavcodec 58.54.100 [ 0.003][v][cplayer] libavformat 58.29.100 [ 0.003][v][cplayer] libswscale 5.5.100 [ 0.003][v][cplayer] libavfilter 7.57.100 [ 0.003][v][cplayer] libswresample 3.5.100 [ 0.003][v][cplayer] ffmpeg version: n4.2.3 [ 0.003][v][cplayer] [ 0.003][v][cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --disable-build-date [ 0.003][v][cplayer] List of enabled features: 52arch aligned_alloc alsa asm atomics caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm drmprime dvbin dvdnav egl egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libdl libm libmpv-shared libplacebo librt libsmbclient linux-fstatfs lua memfd_create optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib [ 0.003][v][cplayer] Command line options: '--log-file=~/mpv.log' [ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.003][v][cplayer] built on UNKNOWN [ 0.003][v][cplayer] ffmpeg library versions: [ 0.003][v][cplayer] libavutil 56.31.100 [ 0.003][v][cplayer] libavcodec 58.54.100 [ 0.003][v][cplayer] libavformat 58.29.100 [ 0.003][v][cplayer] libswscale 5.5.100 [ 0.003][v][cplayer] libavfilter 7.57.100 [ 0.003][v][cplayer] libswresample 3.5.100 [ 0.003][v][cplayer] ffmpeg version: n4.2.3 [ 0.003][v][cplayer] [ 0.003][v][cplayer] Configuration: /usr/bin/waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --disable-build-date [ 0.003][v][cplayer] List of enabled features: 52arch aligned_alloc alsa asm atomics caca cdda cplayer cplugins cuda-hwaccel cuda-interop debug-build drm drmprime dvbin dvdnav egl egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libdl libm libmpv-shared libplacebo librt libsmbclient linux-fstatfs lua memfd_create optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic uchardet vaapi vaapi-drm vaapi-egl vaapi-vulkan vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h vulkan wayland wayland-protocols x11 xv zlib [ 0.003][v][cplayer] Reading config file /etc/mpv/encoding-profiles.conf [ 0.004][v][cplayer] Applying profile 'default'... [ 0.004][v][cplayer] Reading config file /home/george/.config/mpv/mpv.conf [ 0.004][v][cplayer] Applying profile 'default'... [ 0.004][v][cplayer] Setting option 'input-ipc-server' = '/tmp/mpvsocket' (flags = 4) [ 0.004][v][cplayer] Setting option 'pause' = '' (flags = 4) [ 0.004][v][cplayer] Setting option 'keep-open' = '' (flags = 4) [ 0.004][v][cplayer] Setting option 'autofit-larger' = '100%x95%' (flags = 4) [ 0.004][v][cplayer] Setting option 'cursor-autohide-fs-only' = '' (flags = 4) [ 0.004][v][cplayer] Setting option 'input-media-keys' = 'no' (flags = 4) [ 0.004][v][cplayer] Setting option 'cursor-autohide' = '1000' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-font' = 'Source Sans Pro Semibold' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-font-size' = '44' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-color' = '#FFFFFFFF' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-border-color' = '#000000' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-border-size' = '1' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-shadow-offset' = '1' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-shadow-color' = '#000000' (flags = 4) [ 0.004][v][cplayer] Setting option 'sub-spacing' = '0' (flags = 4) [ 0.004][v][cplayer] Setting option 'log-file' = '~/mpv.log' (flags = 8) [ 0.005][d][global] user path: '~/mpv.log' -> '/home/george/mpv.log' [ 0.005][d][osc] Loading lua script @osc.lua... [ 0.005][d][ytdl_hook] Loading lua script @ytdl_hook.lua... [ 0.005][d][stats] Loading lua script @stats.lua... [ 0.005][d][console] Loading lua script @console.lua... [ 0.005][d][osc] loading mp.defaults [ 0.005][d][global] user path: '/tmp/mpvsocket' -> '/tmp/mpvsocket' [ 0.005][d][ytdl_hook] loading mp.defaults [ 0.005][d][stats] loading mp.defaults [ 0.005][v][ipc] Starting IPC master [ 0.006][i][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects [ 0.006][i][cplayer] built on UNKNOWN [ 0.006][i][cplayer] ffmpeg library versions: [ 0.006][i][cplayer] libavutil 56.31.100 [ 0.006][i][cplayer] libavcodec 58.54.100 [ 0.006][i][cplayer] libavformat 58.29.100 [ 0.006][i][cplayer] libswscale 5.5.100 [ 0.006][i][cplayer] libavfilter 7.57.100 [ 0.006][i][cplayer] libswresample 3.5.100 [ 0.006][i][cplayer] ffmpeg version: n4.2.3 [ 0.006][i][cplayer] [ 0.006][i][cplayer] Usage: mpv [options] [url|path/]filename [ 0.006][i][cplayer] [ 0.006][i][cplayer] Basic options: [ 0.006][i][cplayer] --start=
iamkroot commented 4 years ago

Let's see if trakts config set players.mpv.ipc_path /tmp/mpvsocket works.

prabapro commented 4 years ago

Let's see if trakts config set players.mpv.ipc_path /tmp/mpvsocket works.

Wow, this did the trick 🥇

2020-06-03 19:05:33,999 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 72, 'error': 'property unavailable'}
2020-06-03 19:05:33,999 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 74, 'error': 'property unavailable'}
2020-06-03 19:05:34,000 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 75, 'error': 'property unavailable'}
2020-06-03 19:05:43,919 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 77, 'error': 'property unavailable'}
2020-06-03 19:05:43,920 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 79, 'error': 'property unavailable'}
2020-06-03 19:05:43,920 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 80, 'error': 'property unavailable'}
2020-06-03 19:05:54,047 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 82, 'error': 'property unavailable'}
2020-06-03 19:05:54,047 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 84, 'error': 'property unavailable'}
2020-06-03 19:05:54,048 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 85, 'error': 'property unavailable'}
2020-06-03 19:05:57,493 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 89, 'error': 'property unavailable'}
2020-06-03 19:05:57,494 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 90, 'error': 'property unavailable'}
2020-06-03 19:05:57,807 - DEBUG - scrobbler - scrobbler - Progress: 21.56%
2020-06-03 19:05:57,807 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-03 19:05:57,807 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 75735}}}
2020-06-03 19:05:58,578 - INFO - scrobbler - scrobbler - Scrobble pause successful for The Wolf of Wall Street
2020-06-03 19:06:07,661 - DEBUG - scrobbler - scrobbler - Progress: 21.56%
2020-06-03 19:06:07,664 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-03 19:06:07,665 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 75735}}}
2020-06-03 19:06:08,690 - INFO - scrobbler - scrobbler - Scrobble start successful for The Wolf of Wall Street
2020-06-03 19:06:25,034 - DEBUG - scrobbler - scrobbler - Progress: 21.72%
2020-06-03 19:06:25,034 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-03 19:06:25,048 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 75735}}}
2020-06-03 19:06:25,052 - DEBUG - mpv - mpv - Sock closed
2020-06-03 19:06:25,755 - INFO - scrobbler - scrobbler - Scrobble stop successful for The Wolf of Wall Street
2020-06-03 19:06:26,127 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
iamkroot commented 4 years ago

Hmm that's weird, ideally the auto-detection should've worked. (I've been using mpv for a long time, and there's been no bugs in my case). @prabapro if you're up for some experimentation, let's try to get to the root of this.

First, undo the config change you did using trakts config unset players.mpv.ipc_path. Check again whether the scrobbler is picking up the changes.

Next, go to ~/.local/pipx/venvs/trakt-scrobbler/site-packages/trakt_scrobbler/player_monitors and open monitor.py in an editor. Then, add logger.debug(cls.config) on line 18 (create a new line before the except ...). Save, and re-run the scrobbler with trakts start -r. Send the new log contents here.

prabapro commented 4 years ago

@prabapro if you're up for some experimentation, let's try to get to the root of this.

Of course :)

My file path is bit different from you mentioned. ~/.local/pipx/venvs/trakt-scrobbler/lib/python3.8/site-packages/trakt_scrobbler/player_monitors/monitor.py

Anyways, I unset the path from the config file & edited the monitor.py

Output of trakts start -r

codechilli@Prabas-MacBook-Air:~/.local/pipx/venvs/trakt-scrobbler$ trakts start -r
Unrecognized target specifier. <service-target> takes a form of <domain-target>/<service-id>.
Please refer to `man launchctl` for explanation of the <domain-target> specifiers.
Usage: launchctl kickstart [-k] [-p] <service-target>
        -k      Terminates the service if it is already running.
        -p      Prints the PID of the service that was started.
        -s      Starts the service suspended so that a debugger may attach.

[CalledProcessError]
Command '['launchctl', 'kickstart', '-k', 'com.iamkroot.trakt-scrobbler']' returned non-zero exit status 64.

trakts start won't work for me anyway, what I usually do to is trakts autostart enable when I want to force start the scrobbler.

iamkroot commented 4 years ago

Filed another bug for that. For now, let's focus on the mpv issue. Could you send the log contents after restarting the scrobbler?

prabapro commented 4 years ago

@iamkroot Thank you for filing a new bug. Here's the log;

2020-06-07 17:06:50,225 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-06-07 17:06:50,269 - DEBUG - MainThread - monitor - {'ip': 'localhost', 'port': '8001', 'password': '**********', 'poll_interval': 10}
2020-06-07 17:06:50,269 - INFO - MainThread - monitor - Started monitor for vlc
2020-06-07 17:06:50,277 - DEBUG - MainThread - monitor - {'ipc_path': '/tmp/mpvsocket         # listen for IPC on this socket', 'poll_interval': 10}
2020-06-07 17:06:50,277 - INFO - MainThread - monitor - Started monitor for mpv
2020-06-07 17:06:50,279 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2020-06-07 17:06:50,282 - INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running.
iamkroot commented 4 years ago

wow. looks like it's not recognizing the comment, so the entire line is included as the path.

prabapro commented 4 years ago

wow. looks like it's not recognizing the comment, so the entire line is included as the path.

Indeed. Removed the comment from /Users/codechilli/.config/mpv/mpv.conf & all working fine :)

2020-06-07 18:05:43,863 - INFO - MainThread - scrobbler - Started scrobbler thread.
2020-06-07 18:05:43,887 - INFO - MainThread - monitor - Started monitor for mpv
2020-06-07 18:05:43,888 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2020-06-07 18:05:43,906 - INFO - MainThread - monitor - Started monitor for vlc
2020-06-07 18:05:43,915 - INFO - vlc - monitor - Unable to connect to vlc. Ensure that the web interface is running.
2020-06-07 18:06:04,067 - DEBUG - mpv - file_info - Filepath '/Users/codechilli/Movies/HIT The First Case [2020]/HIT The First Case [2020].mp4'
2020-06-07 18:06:04,068 - DEBUG - mpv - file_info - Trying to match custom regex.
2020-06-07 18:06:04,068 - DEBUG - mpv - file_info - Using guessit module to match.
2020-06-07 18:06:04,261 - DEBUG - mpv - file_info - MatchesDict([('title', 'HIT The First Case'), ('year', 2020), ('container', 'mp4'), ('mimetype', 'video/mp4'), ('type', 'movie')])
2020-06-07 18:06:04,262 - DEBUG - scrobbler - scrobbler - Progress: 6.45%
2020-06-07 18:06:04,263 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-07 18:06:04,263 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 517606}}}
2020-06-07 18:06:05,745 - INFO - scrobbler - scrobbler - Scrobble start successful for HIT: The First Case
2020-06-07 18:06:43,463 - DEBUG - scrobbler - scrobbler - Progress: 6.97%
2020-06-07 18:06:43,464 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-07 18:06:43,465 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 517606}}}
2020-06-07 18:06:44,712 - INFO - scrobbler - scrobbler - Scrobble pause successful for HIT: The First Case
2020-06-07 18:06:46,820 - DEBUG - scrobbler - scrobbler - Progress: 6.97%
2020-06-07 18:06:46,821 - DEBUG - mpv - mpv - Sock closed
2020-06-07 18:06:46,822 - DEBUG - scrobbler - trakt_interface - Searching cache.
2020-06-07 18:06:46,822 - DEBUG - scrobbler - trakt_interface - {'movie': {'ids': {'trakt': 517606}}}
2020-06-07 18:06:47,892 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2020-06-07 18:06:47,978 - INFO - scrobbler - scrobbler - Scrobble stop successful for HIT: The First Case
prabapro commented 4 years ago

wow. looks like it's not recognizing the comment, so the entire line is included as the path.

@georgeat8 Hope this one would help you too. What I did was removing the comment from mpv.conf