Dudemanguy / mpv-manga-reader

Manga reading script for mpv
GNU General Public License v3.0
119 stars 4 forks source link

Continuous mode on completely breaks video playback #24

Closed witchymary closed 10 months ago

witchymary commented 10 months ago

For some reason, continuous mode being on completely breaks normal video playback. I assume manga reader being off is not stopping the script from parsing for images?

Here's the log:

   cplayer: Can't load unknown script: /home/witchymary/.config/mpv/scripts/autoload.lua.bak
auto_profiles: Applying auto profile: nonsimulcast-autoprofile 
 manga_reader: 
 manga_reader: stack traceback:
 manga_reader:  /home/witchymary/.config/mpv/scripts/manga-reader.lua:248: in function 'set_lavfi_complex_continuous'
 manga_reader:  /home/witchymary/.config/mpv/scripts/manga-reader.lua:158: in function 'fn'
 manga_reader:  mp.defaults:599: in function 'handler'
 manga_reader:  mp.defaults:512: in function 'call_event_handlers'
 manga_reader:  mp.defaults:554: in function 'dispatch_events'
 manga_reader:  mp.defaults:505: in function <mp.defaults:504>
 manga_reader:  [C]: at 0x562e37531990
 manga_reader:  [C]: at 0x562e37532a30
 manga_reader: Lua error: /home/witchymary/.config/mpv/scripts/manga-reader.lua:58: attempt to perform arithmetic on local 'display_width' (a nil value)
      cplayer: client removed during hook handling
       ffmpeg: Parsed_vstack_0: Value 1.000000 for parameter 'inputs' out of range [2 - 2.14748e+09]
       ffmpeg: Parsed_vstack_0: Error setting option inputs to value 1.
       ffmpeg: AVFilterGraph: Error applying filter options
        lavfi: parsing the filter graph failed
      cplayer: Exiting... (Errors when loading file)

and my manga-reader.conf:

auto_start=no
continuous=yes
Dudemanguy commented 10 months ago

So two problems here.

  1. auto_start is actually ignored if you set double or continuous in your config and the hook will try to set the lavfi complex anyway.
  2. Part of the calculations for continuous mode tries to get the display-width/display-height before the mpv window even appears which cause it to operate on a nil value hence the error output you see.