mpv_scripts icon indicating copy to clipboard operation
mpv_scripts copied to clipboard

autospeedwin causes mpv 0.23 to crash on exit, autospeed-exitrate not working

Open Quantum00 opened this issue 7 years ago • 22 comments

Greetings! Can anything be done for the above issue? Thanks!

Quantum00 avatar Dec 29 '16 20:12 Quantum00

Do you have any log information?

kevinlekiller avatar Dec 31 '16 19:12 kevinlekiller

No, how would I get that? It happens everytime so it easy to get u a log

Quantum00 avatar Dec 31 '16 19:12 Quantum00

If you run mpv from the terminal, for example mpv example.mkv when it crashes it should output some info in the terminal. You can use the -v option for mpv to output more info, mpv -v example.mkv.

kevinlekiller avatar Dec 31 '16 19:12 kevinlekiller

I am on windows and I just open a video from explorer so not sure what terminal is. I put v and log-file=mpvlog.txt in the config file. This is an example.

mpvlog.txt

If autospeedwin is enabled mpv hangs when I press X and I have to terminate it from task manager.

Quantum00 avatar Dec 31 '16 20:12 Quantum00

Alright, the log doesn't show anything.

In windows you can use powershell or command prompt for a terminal.

kevinlekiller avatar Dec 31 '16 20:12 kevinlekiller

I'll have to try this myself to see if I can replicate, will report back when I do.

kevinlekiller avatar Dec 31 '16 20:12 kevinlekiller

ok, many thanks!

Quantum00 avatar Dec 31 '16 20:12 Quantum00

Ok I found one issue, mpv seems to be parsing options differently now, instead of autospeed-rates="50,60,72", you need to use some other separator, like autospeed-rates="50;60;72", I will update the documentation on this. I will update the readme for this.

Other than that I found no issues, mpv is not crashing or staying stuck:

PS C:\Users\kvm\Documents\mpv> ls


    Directory: C:\Users\kvm\Documents\mpv


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       12/31/2016  12:38 PM          13812 autospeedwin.lua
-a----       12/31/2016  12:16 PM      220514438 big_buck_bunny_480p_surround-fix.avi
-a----       12/25/2016   6:04 AM        4488896 d3dcompiler_43.dll
-a----       12/25/2016   6:02 AM         571258 manual.pdf
-a----       12/25/2016   6:04 AM          22528 mpv.com
-a----       12/25/2016   6:04 AM       35883032 mpv.exe
-a----       12/31/2016  12:16 PM         115200 nircmdc.exe


PS C:\Users\kvm\Documents\mpv> ./mpv.com -v --script=autospeedwin.lua --script-opts=autospeed-nircmd=true,autospeed-dwidth=1920,autospeed-dheight=1080,autospeed-bdepth=32,autospeed-rates="50;60",autospeed-exitrate=60,autospeed-nircmdc="nircmdc.exe,autospeed-osd=true" --n
o-audio .\big_buck_bunny_480p_surround-fix.avi
[cplayer] Command line options: '-v' '--script=autospeedwin.lua' '--script-opts=autospeed-nircmd=true,autospeed-dwidth=1920,autospeed-dheight=1080,autospeed-bdepth=32,autospeed-rates=50;60,autospeed-exitrate=60,autospeed-nircmdc=nircmdc.exe,autospeed-osd=true' '--no-audi
o' '.\big_buck_bunny_480p_surround-fix.avi'
[cplayer] mpv 0.23.0-git-10a005d (C) 2000-2016 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Sun Dec 25 15:01:44 CET 2016
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.43.100
[cplayer]    libavcodec      57.70.100
[cplayer]    libavformat     57.61.100
[cplayer]    libswscale      4.3.101
[cplayer]    libavfilter     6.68.100
[cplayer]    libswresample   2.4.100
[cplayer] ffmpeg version: N-82928-g77856a8
[cplayer]
[cplayer] Configuration: /home/lachs0r/mingw-w64-cmake/buildroot/build64/packages/mpv-prefix/src/mpv/waf configure --enable-static-build --enable-pdf-build --disable-manpage-build --enable-libmpv-shared --enable-encoding --enable-egl-angle-lib --enable-lua --enable-libar
chive --enable-libass --enable-libbluray --enable-dvdread --enable-dvdnav --enable-uchardet --enable-rubberband --enable-lcms2 --prefix=/home/lachs0r/mingw-w64-cmake/buildroot/build64/prefix/mingw
[cplayer] List of enabled features: asm atomics avcodec-chroma-pos-api avframe-metadata avframe-skip-samples avutil-mastering-metadata build-date c11-tls cplayer cuda-hwaccel d3d-hwaccel debug-build direct3d dlopen dos-paths dvdnav dvdread egl-angle egl-angle-lib encodin
g gcc-tls gl gl-dxinterop gl-win32 glob-win32-replacement gnuc iconv jpeg lcms2 libarchive libass libass-osd libav libavdevice libavfilter libbluray libm libmpv-shared libswresample lua mingw noexecstack optimize posix-or-mingw resampler rubberband sse4-intrinsics static
-build stdatomic subprocess tv uchardet wasapi win32 win32-internal-pthreads zlib
[global] config path: '' -> 'C:\Users\kvm\AppData\Roaming/mpv'
[global] config path: 'mpv.conf' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/mpv.conf'
[global] config path: 'config' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/config'
[global] config path: 'mpv.conf' -/-> 'C:/Users/kvm/Documents/mpv/mpv.conf'
[global] config path: 'config' -/-> 'C:/Users/kvm/Documents/mpv/config'
[global] config path: 'mpv.conf' -/-> 'C:/Users/kvm/Documents/mpv/mpv/mpv.conf'
[global] config path: 'config' -/-> 'C:/Users/kvm/Documents/mpv/mpv/config'
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Setting option 'script' = 'autospeedwin.lua' (flags = 8)
[cplayer] Setting option 'script-opts' = 'autospeed-nircmd=true,autospeed-dwidth=1920,autospeed-dheight=1080,autospeed-bdepth=32,autospeed-rates=50;60,autospeed-exitrate=60,autospeed-nircmdc=nircmdc.exe,autospeed-osd=true' (flags = 8)
[cplayer] Setting option 'audio' = 'no' (flags = 8)
[global] config path: 'input.conf' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/input.conf'
[global] config path: 'input.conf' -/-> 'C:/Users/kvm/Documents/mpv/input.conf'
[global] config path: 'input.conf' -/-> 'C:/Users/kvm/Documents/mpv/mpv/input.conf'
[osc] Loading script @osc.lua...
[global] config path: 'scripts' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/scripts'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/scripts'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/mpv/scripts'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] config path: 'lua-settings/osc.conf' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> 'C:/Users/kvm/Documents/mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> 'C:/Users/kvm/Documents/mpv/mpv/lua-settings/osc.conf'
[osc] lua-settings/osc.conf not found.
[cplayer] Run command: define-section, flags=0, args=[showhide, mouse_move script-binding osc/__keybinding1
[cplayer] mouse_leave script-binding osc/__keybinding2
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[showhide, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input, mouse_btn0 script-binding osc/__keybinding3
[cplayer] shift+mouse_btn0 script-binding osc/__keybinding4
[cplayer] mouse_btn2 script-binding osc/__keybinding5
[cplayer] mouse_btn0_dbl ignore
[cplayer] shift+mouse_btn0_dbl ignore
[cplayer] mouse_btn2_dbl ignore
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[cplayer] Run command: define-section, flags=0, args=[input_osc, del script-binding osc/__keybinding6
[cplayer] , default]
[cplayer] Run command: enable-section, flags=0, args=[input_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input_forced_osc, , force]
[cplayer] Run command: enable-section, flags=0, args=[input_forced_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Done loading @osc.lua.
[ytdl_hook] Loading script @ytdl_hook.lua...
[global] config path: 'scripts' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/scripts'
[cplayer] Run command: disable-section, flags=0, args=[input]
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/scripts'
[global] config path: 'fonts' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/fonts'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/mpv/scripts'
[ytdl_hook] loading mp.defaults
[global] config path: 'fonts' -/-> 'C:/Users/kvm/Documents/mpv/fonts'
[ytdl_hook] loading @ytdl_hook.lua
[global] config path: 'fonts' -/-> 'C:/Users/kvm/Documents/mpv/mpv/fonts'
[cplayer] Run command: hook-add, flags=0, args=[on_load, 1, 10]
[cplayer] Run command: hook-add, flags=0, args=[on_preloaded, 2, 10]
[cplayer] Done loading @ytdl_hook.lua.
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.3.4 (COMPLEX)
[autospeedwin] Loading script autospeedwin.lua...
[global] config path: 'subfont.ttf' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/subfont.ttf'
[global] config path: 'scripts' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/scripts'
[global] config path: 'subfont.ttf' -/-> 'C:/Users/kvm/Documents/mpv/subfont.ttf'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/scripts'
[global] config path: 'subfont.ttf' -/-> 'C:/Users/kvm/Documents/mpv/mpv/subfont.ttf'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/mpv/scripts'
[global] config path: 'fonts.conf' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/fonts.conf'
[autospeedwin] loading mp.defaults
[global] config path: 'fonts.conf' -/-> 'C:/Users/kvm/Documents/mpv/fonts.conf'
[global] user path: 'autospeedwin.lua' -> 'autospeedwin.lua'
[autospeedwin] loading file autospeedwin.lua
[global] config path: 'fonts.conf' -/-> 'C:/Users/kvm/Documents/mpv/mpv/fonts.conf'
[osd/libass] Setting up fonts...
[cplayer] Done loading autospeedwin.lua.
[global] config path: 'scripts' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/scripts'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/scripts'
[global] config path: 'scripts' -/-> 'C:/Users/kvm/Documents/mpv/mpv/scripts'
[global] config path: 'watch_later' -> 'C:\Users\kvm\AppData\Roaming/mpv/watch_later'
[osd/libass] Using font provider directwrite
[osd/libass] Done.
[cplayer] Playing: .\big_buck_bunny_480p_surround-fix.avi
[cplayer] Running hook: ytdl_hook/on_load
[cplayer] Run command: hook-ack, flags=0, args=[on_load]
[ifo] Opening .\big_buck_bunny_480p_surround-fix.avi
[ifo/dvdnav] Opening .\big_buck_bunny_480p_surround-fix.avi
[bdmv/bluray] Opening .\big_buck_bunny_480p_surround-fix.avi
[file] Opening .\big_buck_bunny_480p_surround-fix.avi
[file] Stream opened successfully.
[demux] Trying demuxers for level=normal.
[lavf] Found 'avi' at score=100 size=2048.
[lavf] avformat_find_stream_info() finished after 41300 bytes.
[demux] Detected file format: avi (libavformat)
[find_files] Loading external files in .\
[global] config path: 'sub/' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/sub/'
[global] config path: 'sub/' -/-> 'C:/Users/kvm/Documents/mpv/sub/'
[global] config path: 'sub/' -/-> 'C:/Users/kvm/Documents/mpv/mpv/sub/'
[global] config path: 'audio/' -/-> 'C:\Users\kvm\AppData\Roaming/mpv/audio/'
[global] config path: 'audio/' -/-> 'C:/Users/kvm/Documents/mpv/audio/'
[global] config path: 'audio/' -/-> 'C:/Users/kvm/Documents/mpv/mpv/audio/'
[cplayer] Running hook: ytdl_hook/on_preloaded
[cplayer] Run command: hook-ack, flags=0, args=[on_preloaded]
[cplayer]  (+) Video --vid=1 (mpeg4)
[cplayer]      Audio --aid=1 (ac3)
[vo/opengl] Initializing OpenGL backend 'angle'
[vo/opengl] Rendering flipped.
[vo/opengl] Using DirectComposition.
[vo/opengl] GL_VERSION='OpenGL ES 3.0 (ANGLE 2.1.0.0448ec847db2)'
[vo/opengl] Detected GLES 3.0.
[vo/opengl] GL_VENDOR='Google Inc.'
[vo/opengl] GL_RENDERER='ANGLE (NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0)'
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.0448ec847db2)'
[vo/opengl] Loaded extension GL_EXT_texture_norm16.
[vo/opengl] Loaded extension GL_EXT_color_buffer_half_float.
[vo/opengl] Loaded extension GL_EXT_disjoint_timer_query.
[vo/opengl] Loaded extension GL_ANGLE_translated_shader_source.
[vo/opengl] swap_control extension missing.
[vo/opengl] Reported display depth: R=8, G=8, B=8
[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/win32] display-fps: 59.852000
[vo/opengl/win32] color-profile: C:\Windows\system32\spool\drivers\color\GW2760HS.icm
[vo/opengl] Assuming 59.852000 FPS for display sync.
[vd] Container reported FPS: 24.000000
[vd] Codec list:
[vd]     mpeg4 - MPEG-4 part 2
[vd]     mpeg4_cuvid (mpeg4) - Nvidia CUVID MPEG4 decoder
[vd] Opening video decoder mpeg4
[vd] Not trying to use hardware decoding: codec mpeg4 is not on whitelist, or does not support hardware acceleration.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected video codec: mpeg4 (MPEG-4 part 2)
[cplayer] Starting playback...
[vd] Decoder format: 854x480 yuv420p auto/auto/auto/auto CL=mpeg2/4/h264
[vf] Video filter chain:
[vf]   [in] 854x480 yuv420p bt.601/bt.601-525/bt.1886/limited CL=mpeg2/4/h264
[vf]   [out] 854x480 yuv420p bt.601/bt.601-525/bt.1886/limited CL=mpeg2/4/h264
[cplayer] VO: [opengl] 854x480 yuv420p
[cplayer] VO: Description: Extended OpenGL Renderer
[vo/opengl/win32] reset window bounds: 525:269:870:519
[vo/opengl/win32] resize window: 854:480
[vo/opengl] Resize: 854x480
[vo/opengl] Window size: 854x480
[vo/opengl] Video source: 854x480 (1:1)
[vo/opengl] Video display: (0, 0) 854x480 -> (0, 0) 854x480
[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: 854x480
[vo/opengl] Texture for plane 1: 427x240
[vo/opengl] Texture for plane 2: 427x240
[cplayer] set video colors output-levels=0
[vo/opengl] Resize: 854x480
[vo/opengl] Window size: 854x480
[vo/opengl] Video source: 854x480 (1:1)
[vo/opengl] Video display: (0, 0) 854x480 -> (0, 0) 854x480
[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] recompiling a 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.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/opengl] [  6] color.a = 1.0;
[vo/opengl] [  7] // color mapping
[vo/opengl] shader link log (status=1):
[vo/opengl]
[vo/opengl]
[vo/opengl]
[osd/libass] fontselect: (sans-serif, 400, 0) -> ArialMT, 0, ArialMT
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[statusline] V: 00:00:00 / 00:09:56 (0%)
[cplayer] Run command: define-section, flags=0, args=[input_autospeedwin, y script-binding autospeedwin/autospeedwin
[cplayer] , default]
[cplayer] Run command: enable-section, flags=0, args=[input_autospeedwin, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input_forced_autospeedwin, , force]
[cplayer] Run command: enable-section, flags=0, args=[input_forced_autospeedwin, allow-hide-cursor+allow-vo-dragging]
[statusline] V: 00:00:00 / 00:09:56 (0%)
[vo/opengl/win32] display-fps: 49.850000
[statusline] V: 00:00:00 / 00:09:56 (0%) Dropped: 1
[vo/opengl] Assuming 49.850000 FPS for display sync.
[statusline] V: 00:00:00 / 00:09:56 (0%) Dropped: 1
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding1]
[statusline] V: 00:00:00 / 00:09:56 (0%) Dropped: 2
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[statusline] V: 00:00:00 / 00:09:56 (0%) Dropped: 2
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/opengl] Reallocating OSD texture to 1024x128.
[vo/opengl] recompiling a 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
[vo/opengl] shader link log (status=1):
[vo/opengl]
[vo/opengl]
[vo/opengl]
[statusline] V: 00:00:00 / 00:09:56 (0%) Dropped: 2
[cplayer] Run command: disable-section, flags=0, args=[input]
[statusline] V: 00:00:02 / 00:09:56 (0%) Dropped: 2
[cplayer] Run command: quit, flags=9, args=[0]
[cplayer] EOF code: 6
[vd] Uninit video.
[cplayer] finished playback, success (reason 3)
[cplayer]
[cplayer]
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[osc] Exiting...
[vo/opengl/win32] display-fps: 59.852000
[vo/opengl] Assuming 59.852000 FPS for display sync.
[autospeedwin] Exiting...
[vo/opengl] flushing shader cache
[vo/opengl/win32] uninit
PS C:\Users\kvm\Documents\mpv>

kevinlekiller avatar Dec 31 '16 20:12 kevinlekiller

It still stucks for me when closing. Maybe it's because I'm using a custom version of mpv and vapoursynth that comes with SVP (Smooth Video Project) although this only happens when autospeedwin is loaded. I have tried opening an mp4 file through a terminal but there is no output when mpv gets stuck or when i kill it from task manager.

Quantum00 avatar Dec 31 '16 21:12 Quantum00

Alright, I'm not sure, maybe try changing this to true, but then the rate might not be reverted?

kevinlekiller avatar Dec 31 '16 21:12 kevinlekiller

Just tried, it still stucks with autospeedwin enabled and not if disabled

Quantum00 avatar Dec 31 '16 21:12 Quantum00

It works if you disable exitmode?

kevinlekiller avatar Dec 31 '16 21:12 kevinlekiller

No it does not, either with changing that "cancellable" to true or when set at false. I'm guessing something happens and mpv gets stuck before exitmode can activate.

Quantum00 avatar Dec 31 '16 21:12 Quantum00

Do you have a link to that custom mpv so I can try it?

kevinlekiller avatar Dec 31 '16 21:12 kevinlekiller

You can select it at the installation of SVP. You can download the free version of svp4 here. Note that I'm not running SVP when testing this issue to exclude it as a cause.

Quantum00 avatar Dec 31 '16 21:12 Quantum00

Seems to require the "pro" version for mpv.

kevinlekiller avatar Dec 31 '16 21:12 kevinlekiller

ah damn. well, here is my config in case anything sticks out.

mpv.conf.txt

Quantum00 avatar Dec 31 '16 21:12 Quantum00

Thanks. Possibly the input-ipc-server ? I tried setting this but it didn't cause the lockup.

Not related, but some of your options are deprecated or not implemented anymore: prescale=superxbr, vo=opengl-hq

See here for superxbr : https://github.com/bjin/mpv-prescalers/tree/master

kevinlekiller avatar Dec 31 '16 22:12 kevinlekiller

Can you try changing these lines to os.execute(_global.options["nircmdc"] + " setdisplay " + _global.options["dwidth"] + " " + _global.options["dheight"] + " " + _global.options["bdepth"] + " " + _global.options["exitrate"])

kevinlekiller avatar Dec 31 '16 22:12 kevinlekiller

input-ipc-server has no effect on the stucking. Replacing those lines has no effect either. Still stucks.

Quantum00 avatar Dec 31 '16 22:12 Quantum00

Alright, I'm not sure then, I think this would be more a bug in mpv than the script, but without any indication of what is going wrong it's very hard to say.

kevinlekiller avatar Jan 01 '17 01:01 kevinlekiller

Ok, thanks for your time regardless!

Quantum00 avatar Jan 01 '17 15:01 Quantum00