chachmu/mpvDLNA

"Cannot find main.* for any supported scripting backend in" error

Closed this issue · 7 comments

First of all I congratulate you on your project.
I am on Ubuntu 20.04 platform. Though it has mpv 0.32.0 in the repository, I built the latest mpv 0.33.0-121-gf665149fc8 from github to test your plugin via mpv-build
I followed the instructions you wrote in README file.
I also installed upnpclient

   python3 -m pip install  upnpclient

However, I get the following error:

 Cannot find main.* for any supported scripting backend in: /home/kenn/.config/mpv/scripts/mpvDLNA

I'm glad to see people are actually interested in using this project!

Could you run mpv -v and post its list of enabled features? I think the most likely explanation would be that mpv compiled with lua support but not javascript support so it doesn't see the main.js file.

@chachmu Thank you for responding and for your help. I think you are right, Default mpv-build is missing javascript support.

        mpv -v
        [cplayer] Command line options: '-v'
        [cplayer] mpv 0.33.0-121-gf665149fc8 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
        [cplayer]  built on Wed Apr 21 13:36:29 +03 2021
        [cplayer] FFmpeg library versions:
        [cplayer]    libavutil       56.73.100
        [cplayer]    libavcodec      58.136.101
        [cplayer]    libavformat     58.78.100
        [cplayer]    libswscale      5.10.100
        [cplayer]    libavfilter     7.111.100
        [cplayer]    libswresample   3.10.100
        [cplayer] FFmpeg version: N-102003-g718e03e5f2
        [cplayer] 
        [cplayer] Configuration: ./waf configure
        [cplayer] List of enabled features: alsa asm build-date cplayer cplugins debug-build drm egl egl-helpers egl-x11 ffmpeg gl gl-wayland glibc-thread-name glob glob-posix gpl iconv jack jpeg libarchive libass libavdevice libdl libm librt linux-fstatfs linux-input-event-codes memfd_create optimize posix posix-or-mingw pthreads pulse stdatomic uchardet vaapi vaapi-egl vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vt.h wayland wayland-protocols x11 xv zlib
        [cplayer] Reading config file /usr/local/etc/mpv/encoding-profiles.conf
        [cplayer] Applying profile 'default'...
        [cplayer] Setting option 'v' = '' (flags = 8)
        [file] Opening /home/kenn/.config/mpv/input.conf
        [input] Parsing input config file /home/kenn/.config/mpv/input.conf
        [input] Input config file /home/kenn/.config/mpv/input.conf parsed: 3 binds
        [cplayer] mpv 0.33.0-121-gf665149fc8 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
        [cplayer]  built on Wed Apr 21 13:36:29 +03 2021
        [cplayer] FFmpeg library versions:
        [cplayer]    libavutil       56.73.100
        [cplayer]    libavcodec      58.136.101
        [cplayer]    libavformat     58.78.100
        [cplayer]    libswscale      5.10.100
        [cplayer]    libavfilter     7.111.100
        [cplayer]    libswresample   3.10.100
        [cplayer] FFmpeg version: N-102003-g718e03e5f2
        [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] 

If you install MuJS and try building it again the build process for mpv should automatically compile with javascript support as long as it manages to find the MuJS installation. I had to manually add the install location for MuJS to my $PKG_CONFIG_PATH before it detected it.

I rebuilt it again. It seems to be using javascript but I hit another error:

      [mpvDLNA] Error: Cannot find module file 'Options.js'
      [mpvDLNA] 	at resolve_module_file (@/defaults.js:503)
      [mpvDLNA] 	at require (@/defaults.js:571)
      [mpvDLNA] 	at /home/kenn/.config/mpv/scripts/mpvDLNA/main.js:6
      [mpvDLNA] 	at run_script (native)
      [mpvDLNA] Could not load javascript /home/kenn/.config/mpv/scripts/mpvDLNA/main.js
       (+) Video --vid=1 (*) (h264 640x360 30.000fps)
       (+) Audio --aid=1 (*) (aac 2ch 44100Hz)
      AO: [pulse] 44100Hz stereo 2ch float
      VO: [gpu] 640x360 yuv420p

Sorry about that, I should have mentioned this in my earlier post. I found an issue with importing modules on non-Windows operating systems while trying to test the issue you were having earlier. I already pushed a fix for it so you should be able to git pull or download the new release (V3.0.1)

@chachmu Thank you for your help. It doesn't print any error . I fixed a few windows back slash path to //mpvDLNA.py in main.js
I couldn't test it on local dlna server.
I close the issue now.
Regards.

Great, glad everything is working!