Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interop issue with mpv-gallery-view #15

Closed
wants to merge 1 commit into from

Conversation

Holi0317
Copy link

I am quite new to mpv and may have done this fix incorrectly. Please check before merging.

After installing both occivink/mpv-gallery-view and this plugin, error will be thrown when gallery view is launched.

Traceback:

[mpv_thumbnail_script_client_osc]
[mpv_thumbnail_script_client_osc] stack traceback:
[mpv_thumbnail_script_client_osc]       .../.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua:1080: in function 'prop'
[mpv_thumbnail_script_client_osc]       mp.defaults:365: in function 'handler'
[mpv_thumbnail_script_client_osc]       mp.defaults:458: in function 'call_event_handlers'
[mpv_thumbnail_script_client_osc]       mp.defaults:495: in function 'dispatch_events'
[mpv_thumbnail_script_client_osc]       mp.defaults:451: in function <mp.defaults:450>
[mpv_thumbnail_script_client_osc]       [C]: in ?
[mpv_thumbnail_script_client_osc]       [C]: in ?
[mpv_thumbnail_script_client_osc] Lua error: .../.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua:1080: attempt to compare nil with number

This patch add nil check on duration variable and fix the issue.


Other than this issue, I got issue with thumbnail generation on short video (Videos that will generate less than 150 thumbnails, which is the thumbnail_count config)

Mpv log says output file missing while the log file for converter says the following:

[   0.080][v][mkv] EOF reached.
[   0.106][v][cplayer] video EOF reached
[   0.106][v][cplayer] playback restart complete
[   0.106][v][cplayer] EOF code: 1
[   0.106][v][vd] Uninit video.
[   0.107][v][cplayer] finished playback, no audio or video data played (reason 4)
[   0.107][i][cplayer]
[   0.107][i][cplayer]
[   0.107][i][cplayer] Exiting... (Errors when loading file)

I am not sure if that is my fault or issue with server module.

Thanks

@TheAMM
Copy link
Owner

TheAMM commented Feb 12, 2018

Hm. I'll have to look at this myself, later, because the state.ready should only be true when it truly is ready.
get_delta() returns nil if the duration is not available, and we ensure we have a delta on this line. Maybe the listeners are executed out of order, despite the docs.

What "short file" were you using? Some files are broken; seeking to their end will fail. I've ran into so few of them I kept the bail instead of padding them with black.

@Holi0317
Copy link
Author

Thanks.

I have tried some videos from youtube but only videos uploaded from this guy (Sorry but that channel is speaking Cantonese) in has this issue.

Sample video. Just download it using youtube-dl (not in streaming mode) and open with mpv. The bug will occur. Other "Short files" does not have the issue.

If you cannot reproduce it, I can sent you my copy of the video.

Gist for logs

@TheAMM
Copy link
Owner

TheAMM commented Nov 3, 2019

Merged #43 which deals with the same issue.

@TheAMM TheAMM closed this Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants