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

Show chapter name when hovering the seekbar #1

Closed
1Naim opened this issue Mar 21, 2022 · 15 comments
Closed

Show chapter name when hovering the seekbar #1

1Naim opened this issue Mar 21, 2022 · 15 comments

Comments

@1Naim
Copy link

1Naim commented Mar 21, 2022

as the title, show chapter name when hovering the seekbar, just like the default osc

image

@Zren
Copy link
Owner

Zren commented Mar 22, 2022

Hmm, I'd definitely be up for showing the chapter in a tooltip above the prev/next chapter buttons.

As for the seekbar, would it be okay to only show them as a tooltip over the "chapter tickmarks" if I turn them into buttons?

If not, then I guess I can make it a "subtitle" above or below the timestamp tooltip.

@lyturn
Copy link

lyturn commented Apr 2, 2022

Whether thumbnails can be displayed on the timeline.

Zren added a commit that referenced this issue Apr 6, 2022
See https://github.com/TheAMM/mpv_thumbnail_script

I'm hoping to have playlist thumbnails too so it needs to be semi
custom. I might eventually require the upstream mpv_thumbnail_scripts
however for now I want to play around with this slow/blocking before
adding in async worker scripts.

There's also a placeholder for the current chapter (Issue #1) once
I've implemented getChapter(videoPercent).

I may move the timestamp + chapter text out of the thumbnail frame
like how YouTube does it since the chapter can be wider than the
thumbnail.
@Zren
Copy link
Owner

Zren commented Apr 6, 2022

I've a work in progress thumbnail support with the chapter title underneath which looks like YouTube.

Screenshot_20220406_013050

Once I've polished the Thumbnail generation (based on mpv_thumbnail_script) to always work (currently assumes linux + ffmpeg), I'll merge it.

@lyturn
Copy link

lyturn commented Apr 8, 2022

You're good job. but I have a question, how do I set it up.
014

Zren added a commit that referenced this issue Apr 8, 2022
The mpv_tethys cache dir was probably not being created for these
users as they probably use Windows.
@Zren
Copy link
Owner

Zren commented Apr 8, 2022

I assume you're on Windows? I forgot to add the Windows "create directory" command, so it was failing to create %TEMP%\mpv_thethys\, which meant that it would error when trying to generate %TEMP%\mpv_thethys\thumb.bgra.

I've tested Windows in a VM and it seems to work now.

@lyturn
Copy link

lyturn commented Apr 9, 2022

On windows, the image still doesn't show. the cache folder "mpv_tethys" is empty.

Zren added a commit that referenced this issue Apr 10, 2022
Don't render again if there's an error the first time.
Set mpv thumb msg-level to show errors.

Add mpv_thumbnail_script's check_output to print error messages. It
also checks if the thumbnail file exists.
@Zren
Copy link
Owner

Zren commented Apr 10, 2022

Ah, I just noticed the thumb path is C:\Users\Admin\AppData\Local\Temp\mpv_tethys/thumb.bgra. Maybe that's it? It's weird that my Win7 VM works fine though.

I've added a bunch of mpv_thumbnail_script's error handling. Press the `/~ key to open the console and view the logs.

@lyturn
Copy link

lyturn commented Apr 10, 2022

I still don't work here.
012
013

@lyturn
Copy link

lyturn commented Apr 19, 2022

"mpv.exe" version can display thumbnails normally
However, the "mpvnet.exe" version cannot display thumbnails properly.

@Zren
Copy link
Owner

Zren commented Apr 19, 2022

@lyturn Thanks for the update!

Does changing preferMpv = true, to preferMpv = false, here in the script (in MPV.net) work?
https://github.com/Zren/mpv-osc-tethys/blob/thumb/osc_tethys.lua#L341

Does removing osc_tethys.lua and adding mpv_thumbnail_script.lua (in MPV.net) work?

@lyturn
Copy link

lyturn commented Apr 21, 2022

Now it works Change preferMpv "true" to "false" , you are awesome.

@Zren
Copy link
Owner

Zren commented Apr 21, 2022

... Of course. That makes sense, because the executable is mpvnet.exe not mpv.exe.

https://github.com/Zren/mpv-osc-tethys/blob/thumb/osc_tethys.lua#L737-L740

Looks like to get preferMpv = true working, I'd need to change

    local mpvCommand = {
        "mpv",
        "--msg-level=all=error",
        "--hwdec=no",
...

to

    local mpvCommand = {
        "mpvnet",
        "--msg-level=all=error",
        "--hwdec=no",
...

It seems I'll need to copy mpv_thumbnail_script's ExectuableFinder code to check if mpv exists, and if not, fallback to mpvnet. It's odd that mpv_thumbnail_script only checks if ffmpeg exists though.

@Zren
Copy link
Owner

Zren commented Apr 21, 2022

Glad you got it working! Once I've finished the mpv/mpvnet check, I'll merge this into master.

@lyturn
Copy link

lyturn commented Apr 22, 2022

I found that changing preferMpv=true to preferMpvnet=true also works.

Zren added a commit that referenced this issue Apr 23, 2022
This should fix users who use mpvnet and don't have mpv installed (#1)
Zren added a commit that referenced this issue Apr 23, 2022
Adds PictureInPicture toggle button, which doesn't work well in KDE.
Adds Hovered Chapter in Seekbar Tooltip (Issue #1).
Seekbar tooltip outline is white like Youtube.
@Zren
Copy link
Owner

Zren commented Apr 23, 2022

Chapter titles when hovering seekbar is in now merged into the master branch along with the thumbnails.

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

No branches or pull requests

3 participants