Dudemanguy / mpv-manga-reader

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

Bug in continuous mode #3

Closed NightMachinery closed 3 years ago

NightMachinery commented 3 years ago
❯ command mpv --no-config --load-scripts=no --script=~/.config/mpv/scripts/mpv-manga-reader/manga-reader.lua '/Users/evar/Documents/Mangas/ultimate rockpaper/Manga/Ultimate Rock-Paper-Scissors/vol_001-English.zip' --image-display-duration=inf

2020-10-17 21:33:04.958 mpv[60771:26767653] This NSLayoutConstraint is being configured with a constant that exceeds internal limits.  A smaller value will be substituted, but this problem should be fixed. Break on BOOL _NSLayoutConstraintNumberExceedsLimit(void) to debug.  This will be logged only once.  This may break in the future.

Playing: archive:///Users/evar/Documents/Mangas/ultimate rockpaper/Manga/Ultimate Rock-Paper-Scissors/vol_001-English.zip|/000_x1.jpeg
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
VO: [libmpv] 727x1000 yuv444p
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Behavior of playlist-pos when writing the same value will change (currently restarts, it will stop doing this).

Playing: archive:///Users/evar/Documents/Mangas/ultimate rockpaper/Manga/Ultimate Rock-Paper-Scissors/vol_001-English.zip|/000_x1.jpeg
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
VO: [libmpv] 727x1000 yuv444p
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=4 [P] '003_x4.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=4 [P] '003_x4.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=5 [P] '004_x5.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=4 [P] '003_x4.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=5 [P] '004_x5.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=6 [P] '005_x6.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=4 [P] '003_x4.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=5 [P] '004_x5.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=6 [P] '005_x6.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=7 [P] '006_x7.jpeg' (mjpeg 650x950 1.000fps) (external)
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Track added:
 (+) Video --vid=1 (mjpeg 727x1000 1.000fps)
     Video --vid=2 [P] '001_x2.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=3 [P] '002_x3.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=4 [P] '003_x4.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=5 [P] '004_x5.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=6 [P] '005_x6.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=7 [P] '006_x7.jpeg' (mjpeg 650x950 1.000fps) (external)
     Video --vid=8 [P] '007_x8.jpeg' (mjpeg 650x950 1.000fps) (external)
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
[libarchive] possibly unsupported seeking - switching to reopening
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
VO: [libmpv] 727x7650 yuv444p
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s

Playing: archive:///Users/evar/Documents/Mangas/ultimate rockpaper/Manga/Ultimate Rock-Paper-Scissors/vol_001-English.zip|/007_x8.jpeg
[ffmpeg] vstack: Value 1.000000 for parameter 'inputs' out of range [2 - 2.14748e+09]
[ffmpeg] vstack: Value 1.000000 for parameter 'inputs' out of range [2 - 2.14748e+09]
[ffmpeg] vstack: Error setting option inputs to value 1.
[ffmpeg] Parsed_vstack_0: Error applying options to the filter.
[ffmpeg] AVFilterGraph: Error initializing filter 'vstack' with args 'inputs=1'
[lavfi] parsing the filter graph failed

Exiting... (Some errors happened)
^C

BTW, without --image-display-duration=inf the images would auto-play.

❯ mpv --version
mpv 0.32.0-750-ge1536193cb Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on Mon Sep 28 14:02:04 UTC 2020
FFmpeg library versions:
   libavutil       56.51.100
   libavcodec      58.91.100
   libavformat     58.45.100
   libswscale      5.7.100
   libavfilter     7.85.100
   libswresample   3.7.100
FFmpeg version: 4.3.1

❯ ffmpeg -version
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.62)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100
Dudemanguy commented 3 years ago

BTW, without --image-display-duration=inf the images would auto-play.

That's expected. Do you mean uploading a sample somewhere?

NightMachinery commented 3 years ago

@Dudemanguy commented on Oct 17, 2020, 9:52 PM GMT+3:30:

BTW, without --image-display-duration=inf the images would auto-play.

That's expected.

Why wouldn't manga-mode set that option then :-?

Do you mean uploading a sample somewhere?

vol_001-English.zip

NightMachinery commented 3 years ago

BTW, is there any prefetching (and pre-decoding) on normal, non-continuous mode?

NightMachinery commented 3 years ago

If I start with the continuous mode off, then turn it on manually, and then never use next-page or prev-page, it seems to work correctly.

Dudemanguy commented 3 years ago

Apologies for the late reply.

Why wouldn't manga-mode set that option then :-?

Yeah good point. It does that now.

BTW, is there any prefetching (and pre-decoding) on normal, non-continuous mode?

Not sure what you mean exactly but probably not.

As for this particular issue, I made some small fixes to continuous mode which could trigger some lavfi-complex related errors in certain cases. Unfortunately, I never figured out a way to always get correct page dimensions (since getting properties is async) so it's possible there are still lingering lavfi-complex errors. Continuous mode is more susceptible to this since there's more pages to deal with at a time.

Dudemanguy commented 3 years ago

I think I'm going to close this one now with the last round of commits. I don't believe there's anymore problems with continuous mode. That said, I have seen at least one pad-related error on one weird edge case but that is entirely unrelated and I believe it's some ffmpeg-related bug/error of some sort (because it really makes no sense). That can be investigated later if the need arises.