Mpv: Do I need to install some package to make lua script work?

Created on 9 Apr 2017  路  9Comments  路  Source: mpv-player/mpv

mpv version and platform

mpv git-759ac6cc93 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
 built on Mon Apr 10 01:29:24 CST 2017
ffmpeg library versions:
   libavutil       55.34.101
   libavcodec      57.64.101
   libavformat     57.56.101
   libswscale      4.2.100
   libavfilter     6.65.100
   libswresample   2.3.100
ffmpeg version: 3.2.4

Reproduction steps

Shift+i to enable the stats.lua

Expected behavior

show the info

Actual behavior

nothing

Log file

[cplayer] Command line options: '-v' 'dts_x_all_around_us_lossless-DWEU.mkv'
[cplayer] mpv git-759ac6cc93 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Mon Apr 10 01:29:24 CST 2017
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.34.101
[cplayer]    libavcodec      57.64.101
[cplayer]    libavformat     57.56.101
[cplayer]    libswscale      4.2.100
[cplayer]    libavfilter     6.65.100
[cplayer]    libswresample   2.3.100
[cplayer] ffmpeg version: 3.2.4
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-zsh-comp --enable-libmpv-shared
[cplayer] List of enabled features: alsa asm atomics audio-input build-date c11-tls caca cplayer debug-build dlopen drm dvbin egl-drm egl-helpers egl-x11 encoding fchmod gbm gbm.h gcc-tls gl gl-wayland gl-x11 glibc-thread-name glob gnuc iconv is_ffmpeg jack jpeg lcms2 libass libass-osd libav libavcodec libavdevice libbluray libdl libm libmpv-shared librt libv4l2 linux-fstatfs nanosleep optimize oss-audio oss-audio-native plain-gl posix posix-or-mingw posix-spawn pthreads pulse shm sse4-intrinsics stdatomic subprocess termios tv tv-v4l2 vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-hwaccel vaapi-hwaccel-old vaapi-wayland vaapi-x-egl vaapi-x11 vapoursynth vapoursynth-core vdpau vdpau-gl-x11 vdpau-hwaccel vdpau-hwaccel-old videodev vt.h wayland x11 xext xinerama xrandr xv zlib zsh-comp
[global] config path: '' -> '/home/laichiaheng/.config/mpv'
[global] config path: 'mpv.conf' -> '/home/laichiaheng/.config/mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/laichiaheng/.config/mpv/config'
[global] config path: 'mpv.conf' -/-> '/home/laichiaheng/.mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/laichiaheng/.mpv/config'
[global] config path: 'mpv.conf' -/-> '/etc/mpv/mpv.conf'
[global] config path: 'config' -/-> '/etc/mpv/config'
[cplayer] Reading config file /home/laichiaheng/.config/mpv/mpv.conf
[cplayer] Setting option 'vo' = 'opengl' (flags = 4)
[cplayer] Setting option 'input-ipc-server' = '/tmp/mpvsocket' (flags = 4)
[cplayer] Setting option 'sub-auto' = 'fuzzy' (flags = 4)
[cplayer] Setting option 'sub-font' = 'TW-MOE-Std-Kai' (flags = 4)
[cplayer] Setting option 'sub-border-size' = '1.5' (flags = 4)
[cplayer] Setting option 'stretch-image-subs-to-screen' = 'yes' (flags = 4)
[cplayer] Setting option 'fs' = '' (flags = 4)
[cplayer] Setting option 'sub-use-margins' = 'no' (flags = 4)
[cplayer] Setting option 'sub-bold' = 'yes' (flags = 4)
[cplayer] Setting option 'sub-shadow-offset' = '1.0' (flags = 4)
[cplayer] Setting option 'sub-shadow-color' = '000000' (flags = 4)
[cplayer] Setting option 'audio-device' = 'pulse/alsa_output.pci-0000_00_1b.0.analog-stereo' (flags = 4)
[cplayer] Setting option 'video-sync' = 'display-resample' (flags = 4)
[cplayer] Setting option 'v' = '' (flags = 8)
[global] config path: 'input.conf' -/-> '/home/laichiaheng/.config/mpv/input.conf'
[global] config path: 'input.conf' -/-> '/home/laichiaheng/.mpv/input.conf'
[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'
[global] user path: '/tmp/mpvsocket' -> '/tmp/mpvsocket'
[ipc] Starting IPC master
[global] config path: 'scripts' -> '/home/laichiaheng/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/laichiaheng/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[ipc] Listening to IPC socket.
[cplayer] Can't load unknown script: /home/laichiaheng/.config/mpv/scripts/stats.lua
[cplayer] Can't load unknown script: /home/laichiaheng/.config/mpv/scripts/auto-profiles.lua
[cplayer] Can't load unknown script: /home/laichiaheng/.config/mpv/scripts/autospeed.lua
[global] config path: 'watch_later' -> '/home/laichiaheng/.config/mpv/watch_later'
[cplayer] Playing: dts_x_all_around_us_lossless-DWEU.mkv
[bdmv/bluray] Opening dts_x_all_around_us_lossless-DWEU.mkv
[file] Opening dts_x_all_around_us_lossless-DWEU.mkv
[file] Stream opened successfully.
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: libebml v1.3.3 + libmatroska v1.4.4
[mkv] | + writing app: mkvmerge v8.8.0 ('Wind at my back') 64bit
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 49.344s
[mkv] | + segment uid 8c c2 30 63 39 de 96 c8 8a 54 e5 08 1e e3 ba 8b
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Display width: 1920
[mkv] |   + Display height: 1080
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEG4/ISO/AVC
[mkv] |  + CodecPrivate, length 41
[mkv] |  + Default duration: 41.708ms ( = 23.976 fps)
[mkv] | + a track...
[mkv] |  + Track number: 2
[mkv] |  + Track type: Audio
[mkv] |  + Audio track
[mkv] |   + Sampling frequency: 48000.000000
[mkv] |   + Channels: 8
[mkv] |  + Codec ID: A_DTS
[mkv] |  + Default duration: 10.667ms ( = 93.750 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: dts_x_all_around_us_lossless-DWEU.mkv
[find_files] Loading external files in .
[global] config path: 'sub' -/-> '/home/laichiaheng/.config/mpv/sub'
[global] config path: 'sub' -/-> '/home/laichiaheng/.mpv/sub'
[global] config path: 'sub' -/-> '/etc/mpv/sub'
[global] config path: 'audio' -/-> '/home/laichiaheng/.config/mpv/audio'
[global] config path: 'audio' -/-> '/home/laichiaheng/.mpv/audio'
[global] config path: 'audio' -/-> '/etc/mpv/audio'
[cplayer]  (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
[cplayer]  (+) Audio --aid=1 --alang=eng (*) (dts 8ch 48000Hz)
[vo/opengl] Initializing OpenGL backend 'wayland'
[vo/opengl/wayland] failed to connect to a wayland server: check if a wayland compositor is running
[vo/opengl] Initializing OpenGL backend 'x11probe'
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 1920x1080 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (HDMI-A-0): [0, 0, 1920, 1080] @ 60.000000 FPS
[vo/opengl/x11] Current display FPS: 60.000000
[vo/opengl] GLX chose FB config with ID 0xbf
[vo/opengl] GLX chose visual with ID 0x315
[vo/opengl] Creating OpenGL 3.3 context...
[vo/opengl] GL_VERSION='4.5 (Core Profile) Mesa 17.0.2'
[vo/opengl] Detected desktop OpenGL 4.5.
[vo/opengl] GL_VENDOR='X.Org'
[vo/opengl] GL_RENDERER='Gallium 0.4 on AMD POLARIS11 (DRM 3.9.0 / 4.10.8-1-ARCH, LLVM 3.9.1)'
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/opengl] Loaded extension GLX_SGI_swap_control.
[vo/opengl] Loaded extension GLX_SGI_video_sync.
[vo/opengl] Loaded extension GL_NV_vdpau_interop.
[vo/opengl] 16 bit texture depth: 16.
[vo/opengl] Testing FBO format 0x805b
[vo/opengl] Create FBO: 16x16 (16x16)
[vo/opengl] Using FBO format 0x805b.
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Assuming 60.000000 FPS for display sync.
[vd] Container reported FPS: 23.976025
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd] Opening video decoder h264
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected video codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
[ad] Codec list:
[ad]     dca (dts) - DCA (DTS Coherent Acoustics)
[ad] Opening audio decoder dca
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: dca (DCA (DTS Coherent Acoustics))
[cplayer] Starting playback...
[vo/opengl/x11] Disabling screensaver.
[vo/opengl/x11] Setting DMPS: off.
[ffmpeg/audio] dca: Forcing XLL recovery mode
[af] Audio filter chain:
[af]   [in] 48000Hz 7.1 8ch s32p
[af]   [out] 48000Hz 7.1 8ch s32p
[af]   [ao] 48000Hz 7.1 8ch s32p
[ao] Trying audio driver 'pulse'
[ao] Using preferred device 'alsa_output.pci-0000_00_1b.0.analog-stereo'
[ao/pulse] requested format: 48000 Hz, 7.1 channels, s32p
[ffmpeg/video] h264: Reinit context to 1920x1088, pix_fmt: yuv420p
[ao/pulse] Library version: 10.0.0
[ao/pulse] Proto: 32
[ao/pulse] Server proto: 4294967295
[ao/pulse] Channel layouts:
[ao/pulse]  - #fl
[ao/pulse]  - #fr
[ao/pulse]  - #fc
[ao/pulse]  - #lfe
[ao/pulse]  - #bl
[ao/pulse]  - #br
[ao/pulse]  - #flc
[ao/pulse]  - #frc
[ao/pulse]  - #bc
[ao/pulse]  - #sl
[ao/pulse]  - #sr
[ao/pulse]  - #tc
[ao/pulse]  - #tfl
[ao/pulse]  - #tfc
[ao/pulse]  - #tfr
[ao/pulse]  - #tbl
[ao/pulse]  - #tbc
[ao/pulse]  - #tbr
[ao/pulse] result: 7.1
[ao/pulse] device buffer: 1500 samples.
[ao/pulse] using soft-buffer of 9600 samples.
[cplayer] AO: [pulse] 48000Hz 7.1 8ch s32
[cplayer] AO: Description: PulseAudio audio output
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 48000Hz 7.1 8ch s32p
[af]   [lavrresample] 48000Hz 7.1 8ch s32 [a]
[af]   [out] 48000Hz 7.1 8ch s32
[af]   [ao] 48000Hz 7.1 8ch s32
[ipc_0] Client connected
[vo/opengl/x11] Disabling screensaver failed (4). Make sure the xdg-screensaver script is installed.
[vd] Decoder format: 1920x1080 [0:1] yuv420p auto/auto/auto/auto CL=mpeg2/4/h264
[vd] Using container aspect ratio.
[vf] Video filter chain:
[vf]   [in] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[vf]   [out] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[cplayer] VO: [opengl] 1920x1080 yuv420p
[cplayer] VO: Description: Extended OpenGL Renderer
[vo/opengl/x11] not waiting for MapNotify
[vo/opengl] Resize: 1920x1080
[vo/opengl] Window size: 1920x1080
[vo/opengl] Video source: 1920x1080 (1:1)
[vo/opengl] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/opengl] Video scale: 1.000000/1.000000
[vo/opengl] OSD borders: l=0 t=0 r=0 b=0
[vo/opengl] Video borders: l=0 t=0 r=0 b=0
[vo/opengl] Testing FBO format 0x805b
[vo/opengl] Create FBO: 16x16 (16x16)
[vo/opengl] Using FBO format 0x805b.
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Texture for plane 0: 1920x1080
[vo/opengl] Texture for plane 1: 960x540
[vo/opengl] Texture for plane 2: 960x540
[cplayer] set video colors output-levels=0 
[vo/opengl] Reported display depth: 8
[vo/opengl] new shader program:
[vo/opengl] [  1] color.r = 1.000000 * vec4(texture(texture0, texcoord0)).r;
[vo/opengl] [  2] color.g = 1.000000 * vec4(texture(texture1, texcoord1)).r;
[vo/opengl] [  3] color.b = 1.000000 * vec4(texture(texture2, texcoord2)).r;
[vo/opengl] [  4] // color conversion
[vo/opengl] [  5] color = color.rgba;
[vo/opengl] [  6] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/opengl] [  7] color.a = 1.0;
[vo/opengl] [  8] // color mapping
[cplayer] first video frame after restart shown
[cplayer] starting audio playback
[cplayer] playback restart complete
[cplayer] Change display sync audio drift: -1
[statusline] AV: 00:00:00 / 00:00:49 (1%) A-V: -0.014 DS: 2.750/1
[cplayer] Run command: vf, flags=0, args=[add, vapoursynth=/home/laichiaheng/.local/share/SVP4/scripts/8836d9ef.py:4:7]
[vf] Opening video filter: [vapoursynth file=/home/laichiaheng/.local/share/SVP4/scripts/8836d9ef.py buffered-frames=4 concurrent-frames=7]
[vapoursynth] Setting option 'file' = '/home/laichiaheng/.local/share/SVP4/scripts/8836d9ef.py' (flags = 0)
[vapoursynth] Setting option 'buffered-frames' = '4' (flags = 0)
[vapoursynth] Setting option 'concurrent-frames' = '7' (flags = 0)
[global] user path: '/home/laichiaheng/.local/share/SVP4/scripts/8836d9ef.py' -> '/home/laichiaheng/.local/share/SVP4/scripts/8836d9ef.py'
[vapoursynth] using 7 concurrent requests.
[vf] Video filter chain:
[vf]   [in] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[vf]   [vapoursynth] "vapoursynth.00" 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[vf]   [out] 1920x1080 yuv420p bt.709/bt.709/bt.1886/limited CL=mpeg2/4/h264
[statusline] AV: 00:00:00 / 00:00:49 (1%) A-V: -0.160 DS: 2.706/1
[cplayer] Change display sync audio drift: 1
[statusline] AV: 00:00:02 / 00:00:49 (5%) A-V:  0.009 DS: 0.990/3 Dropped: 16
[cplayer] Run command: show-text, flags=9, args=[${filename}, -1, 0]
[statusline] AV: 00:00:02 / 00:00:49 (5%) A-V:  0.009 DS: 0.990/3 Dropped: 16
[global] config path: 'fonts' -/-> '/home/laichiaheng/.config/mpv/fonts'
[global] config path: 'fonts' -/-> '/home/laichiaheng/.mpv/fonts'
[global] config path: 'fonts' -/-> '/etc/mpv/fonts'
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.4.5 (COMPLEX)
[global] config path: 'subfont.ttf' -/-> '/home/laichiaheng/.config/mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/home/laichiaheng/.mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/etc/mpv/subfont.ttf'
[global] config path: 'fonts.conf' -/-> '/home/laichiaheng/.config/mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/home/laichiaheng/.mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/etc/mpv/fonts.conf'
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSansCJK-DemiLight.ttc, 3, NotoSansCJKtc-DemiLight
[vo/opengl] Reallocating OSD texture to 2048x256.
[vo/opengl] new shader program:
[vo/opengl] [  1] // OSD (libass)
[vo/opengl] [  2] color = vec4(ass_color.rgb, ass_color.a * texture(osdtex, texcoord).r);
[vo/opengl] [  3] // color mapping
[statusline] AV: 00:00:04 / 00:00:49 (10%) A-V:  0.007 DS: 1.000/3 Dropped: 1[statusline] AV: 00:00:05 / 00:00:49 (10%) A-V:  0.007 DS: 1.000/3 Dropped: 16
[cplayer] Run command: quit, flags=9, args=[0]
[cplayer] EOF code: 6  
[ad] Uninit audio decoder.
[af] Removing filter lavrresample 
[vd] Uninit video.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[vo/opengl/x11] Enabling screensaver.
[vo/opengl/x11] Setting DMPS: on.
[ipc_0] Exiting...
[ao/pulse] draining...
[vo/opengl] flushing shader cache
[vo/opengl/x11] uninit ...


question

All 9 comments

Your mpv is compiled without lua support.

Yes. Lua 5.1, 5.2 or luajit.
And recompile mpv.

@wiiaboo how about lua5.3.4-1?

By the way, It is working with luajit now, thanks.

No support yet.

The thing with Lua 5.3 is that it's a different language from 5.1 or 5.2, so it won't be supported to avoid breaking all scripts. (5.1 and 5.2 are also different, but the differences are relatively minor.)

Ok. I see on brew that [email protected] and luajit are both available. Which one is better to install? [email protected] or luajit? I didn't need to do this before, so any help here would be useful for me.

Once I have installed lua with brew, e.g. with brew install luajit

Should I just install mpv this way then?: brew install --with-lua --with-bundle mpv

luajit is a bit faster, might be useful for heavy scripts like the OSC.

Afaik mpv (or at least the brew formula) does not support luajit on OSX.
@gbstan please ask brew people about how to use brew and formula details. mpv people have no relation to this formula whatsoever. package manager != the software it builds.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

laichiaheng picture laichiaheng  路  3Comments

532910 picture 532910  路  3Comments

sant527 picture sant527  路  4Comments

thebunnyrules picture thebunnyrules  路  3Comments